Replies: 1 comment
-
Please post the full log with the cross invocation, build and error message. As it stands, its very hard to help you because youve given a lot of information, but some crucial information to give it all some context is missing. Im also interested about the part where you say that it uses |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to cross-compile Rust code for x86_64 Android using Cross (I am running macOS 13 with M1 chip).
This code uses symbols from a static C library that I've built myself.
Upon reaching the link step, I am hit with the error :
I am 100% sure that the library is actually found, because -L/-l flags are properly set, and if I try to change them I get the error "cannot find library".
In order to cross-build the C library I use the following (using Android NDK on M1 mac) :
Here is some info about the resulting archive :
What can cause missing symbols even when the library is found and actually contains the symbols?
Here is the exact built library I am trying to link : https://drive.google.com/file/d/1y9YgkDMrfkpct4ee-ETvRmxXv1zBsSzz/view?usp=sharing
EDIT : Here are the command used for building/linking.
Note that I also tried without the
--config
, when doing so it changes the linker fromx86_64-linux-android33-clang
tocc
but gives the same result.Linker invocation (each argument have been put on newline for readability) :
Also asked on Stack Overflow : https://stackoverflow.com/questions/77464901/linker-cannot-find-symbols-in-static-c-library-when-cross-compiling-rust-to-andr
Beta Was this translation helpful? Give feedback.
All reactions