Reputation: 1598
I am trying to cross compile numpy for an different platform using a clang-based cross compiler toolchain. I have built a custom version of python that runs on the target platform, and trying to use crossenv make a wheel of numpy. Even though the underlying compiler that I am using is clang (both host-python and build-python) the resulting numpy seems to have an gcc dependency libgcc_s.so.1.
I have some difficulty understanding why this happens and roughly what I can do to prevent this. I believe the problem is specific to numpy- I can't disclose specifics but I have a couple of packages like cffi that I was able to successfull cross compile.
Any suggestions of what I could try to prevent from linkking gcc dependencies, I assume it just thinks its using gcc because of crossenv.
Upvotes: 0
Views: 104
Reputation: 1598
The solution that worked for me is to inject configuration settings for setting native and cross compilers explictly. At the time of writing, numpy uses meson for building the relevant c/c++ modules so I explictly made relevant information for meson (https://mesonbuild.com/Cross-compilation.html), and injected the explicitly as arguments of pip in crossenv.
Upvotes: 0