-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot build the experimental LLVM 6.0 Compiler #97
Comments
Hey, that's wonderful you are interested in helping out! Basically, everything in the README should be the sum total of our knowledge — I update it so I don't have to remember things! If you take a look at #91, that was the most recent work we did to upgrade, and I'm pretty sure a handful of us were able to compile with that. @dylanmckay, will you have time to rebase on Rust master anytime soon? Otherwise, I vote that we merge #91 as-is and then rebase again "soon" for good measure. |
For what it's worth, I rebased @dylanmckay's branch myself: https://github.com/shepmaster/rust/tree/avr-support-rust-2018-04-24-190a6c I then built with:
I was then able to use Xargo to build my blink program (which may have local changes):
|
You can also check out the official blink program |
Ugh, ignore what I said, I think I was sleepy and compiling with the wrong thing. I'll try to check back in the morning after I've rebuilt things. |
Ok, my hope is that you were right, that this is just a failure of mine to document a little detail 😉 I think the problem is that, by default, the AVR components of LLVM aren't built. I normally don't encounter this because I turn all the default components off for faster/smaller builds and set the experimental ones at the same time. You can check to see if you have files like this in your build directory, my guess is you don't:
You should be able to enable this with
I've also added I'm building this now and will check back in a while. If it works, I'll also force-push my branch to enable those by default. |
Ok, I've pushed:
Edit 1 — I realized I should also update the LLVM fork to match with Rust. Stay tuned for more pushes with that. |
I was wondering if it was LLVM's fault, based on that error message, but I had no clue how to fix it or what I was doing wrong. Your theory seems plausible. I indeed do not see those archives in my build dir -- even though I swear I did see object files go by during the compile with names along the lines of Anyway, I will be building off of your branch, with your directions, very soon. I'll make sure to let you know how it goes |
Sound good. I'll update the README with the two new details. Hopefully @dylanmckay can chime in to say if we should go ahead and use this newly-rebased code or not. |
It compiled, and AVR is now a recognized target! 🎉 ...but Xargo isn't quite happy with libcore, because of some language updates. Example:
I have figured out a couple of obvious ones, but others (such as the above) need a little more thought than I can provide tonight. Thanks for all your help, @shepmaster! |
Are you using the corresponding updated libcore? We can't compile the stock one. |
The moment I sat down to look at this today, I realized I didn't update the rust-src tree after installing the new compiler 😀 With that fixed, it works now. I'll be spending some time investigating Rust on AVR, and then take a crack at #93. I'll definitely update that issue when I'm ready to fully commit. Thanks again for all your help, and the links. Closing this issue. |
Feel free to do some half-baked thoughts in the issue; there's more lurkers than you know. Also, come hang out with us in the Gitter room |
Yeah that sounds good, I'll try get it building on my machine and then I should be able to push it. |
I see that there has been a recent rebase onto Rust master, and that @dylanmckay has things building with LLVM 7 and no custom patches. Good to see! I would be willing to close this issue once the README is updated to include the missing configure script parameter @shepmaster identified. |
We've recently upgraded to LLVM 8 🎉 I'm going to close any bug that is reported against an older version of LLVM. If you are still having this issue with the LLVM-8 based code, please ping me and I can reopen the issue! |
And I updated the README with those details. |
I am actually interesting in solving issue #93... but I know I will want a more recent compiler than master, which is last November.
So I dug into getting the experimental branch of AVR Rust with LLVM 6.0 working (which is late January). The process was simple, I thought:
And, to my surprise, all that worked! But then:
cd hello_avr && cargo build --target=avr-unknown-unknown
Got me this response:
Which is not the error I was expecting at all. And even if I take my extra LLVM patches out, it still does that.
I know this is experimental, but the issues opened here imply that more than one person has succeeded in getting this compiler built, and at least trying to compile Rust code. There appears to be some shared knowledge I am missing. What is that? And can the README.md be updated with it?
EDIT: I know it's not a path issue, because:
rustc --print target-list
Gets me the correct response:
[...]
armv7-unknown-linux-musleabihf
asmjs-unknown-emscripten
avr-unknown-unknown
i586-pc-windows-msvc
i586-unknown-linux-gnu
[...]
The text was updated successfully, but these errors were encountered: