-
Notifications
You must be signed in to change notification settings - Fork 733
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
Can't compile for armv6 or v7 #578
Comments
It looks like I can compile correctly directly on a raspberry pi 3. Is there someone different about cross-compiling for this? |
That panic suggests the |
I think I've found the problem. Every other crate compiles just fine, ring is the only exception but it looks they are correctly using the compiler defined in The workaround for now seems to be symlinking the name it expects and adding it to path. I would propose this be fixed in a later version of ring though. |
Hmm. Do you have |
It looks like setting [target.arm-unknown-linux-gnueabihf]
linker = "/usr/x-tools/x-tools7h/arm-unknown-linux-gnueabihf/bin/arm-unknown-linux-gnueabihf-gcc" Ok, I just realized that it's also the linker. Well, I suppose that isn't a bug then, sorry about that. Hopefully this will be useful for anyone else looking for an answer. |
Great, thanks! I am curious, you said other project compile fine even when |
@Lindenk: also curious about the answer to @briansmith's question. |
I suppose I haven't used a crate with native C until now. Although I do seem to have another problem where ring is passing -m64 to a 32-bit compiler. https://pastebin.com/fHBZYXTp |
Are you passing a |
Yes. Curiously, it seems to work if I first build it natively then cross compile. If I remove the entire |
I am having the same problem trying to cross-compile with My horrible workaround is to run the build first with This may be related to rust-lang/cargo#4741 |
@mckaymatt @Lindenk I was also having the |
@Mcat12 Thanks, that sounds promising. Concretely, what can I do to make cross-compiling easier or automatic? When I started the ring project I was regularly cross-compiling it by setting |
@briansmith Thanks for your interest. I have not previously looked into too much of the fine details of library build scripts, especially in this type of situation where there's different compilers for parts. However, it sounds very interesting. I guess, my first suggestion is to look at what other libraries are doing, though I'm not sure how applicable that is to this one. I'll look into your build scripts and see what I can come up with. I ran into this issue through compiling Rocket |
It seems like I don't think we should try to automate the setting of |
me too |
Thanks for the information here. It helps understand the difficulties people have. Here are the most common problems people have:
I would like cross-compiling to work better and I'm actively investigating how to do that. But, keeping this issue open won't help, so I'm closing it. |
Possibly a duplicate of #516.
I've tried the suggested workaround of adding
-march armv6
to the compile flags to no avail. I'm not entirely convienced this is the same problem though as it seems to be failing when looking for some assembly related file and not finding it.I'm currently using the x-tools arm_unknown_linux_gnueabi toolchain in the arch linux aur.
If anyone has a workaround, it would be appreciated!
https://ptpb.pw/FEUl
The text was updated successfully, but these errors were encountered: