-
Notifications
You must be signed in to change notification settings - Fork 105
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
Build script error while cross-compiling for Android #54
Comments
Please do not omit the actual error messages from the compiler. |
Sorry for that. Here is the full output
|
It seems entirely like an issue with your toolchain. Does running something like this: echo -e '#include<pthread.h>\nint main(void) { return 0; }' | /home/aston/rust-keylock-android/android-toolchain/bin/arm-linux-androideabi-gcc -xc - work for you? This tests compilation of a trivially correct program and should definitely work on any POSIX system with gcc toolchain. |
The command is executed with no errors and
|
Just for reference, does building this file manually (outside of cargo, without any additional flags other than just the file specified) also work fine? What if you also copy all the flags?
|
Thanks for the help and fast responses! The command
produces the same errors with cargo I guess:
In the case it helps, I use ndk-r10e and I build the toolchain to support platform-16 as a minimum:
|
Hey, without any flags:
It succeeds.
|
I think the reason why this might be happening is because you invoke rustc/cargo like this (assuming bash shell):
and cargo is really building for your host target (
or perhaps
|
You are right, but this is weird I guess, because I specify already the compiler in the cargo build. This is the command that I use:
Generally, my concern is that before
Maybe it is needed something more to configure correctly the |
Ok, so here is the thing: libloading is used both from my actual code and from the build script. The build script compiles I am not sure if when |
Is this maybe related? Please have a look at this comment specifically. |
Yeah specifying Try perhaps
0.4.3 did not depend on the C file that 0.5 series depend on and therefore |
Using If you believe there is nothing to further do or improve for your project regarding this, feel free to close the issue. Thanks for the help and for the |
Hi,
my crate has a dependency on rust_libloading 0.5.1 and when cross-compiling for Android, I get the following error:
Using the 0.4.3 release there is not an issue, since only after 0.50 there is building of global_static.
Do I need to do something special to build global_static for Android? Can I do something to correct/avoid this error?
The text was updated successfully, but these errors were encountered: