Compiling with -fPIC flag required for highspy package?
Hello,
I'm a newcomer to HiGHS and just tried to get the highspy python interface working after compilation of the library (following the steps in the README.md file, you can also find my bash script here).
When building the highspy module, (using python3 setup.py build on the highspy folder with the appropriate packages installed in a virtual environment) I encountered the following error:
relocation R_X86_64_PC32 against symbol can not be used when making a shared object when fPIC was already used; recompile with -fPIC
Indeed, adding export CXXFLAGS="-fPIC" to my install script and recompiling HiGHS has solved the issue.
Because I am not an expert at cmake and do not understand the underlying issue, I am not sure if this is specific to my system, or indeed some bug. So this is mostly feedback for the developers, feel free to directly close this or ask for further details.
Greetings Benjamin Pampel
Thanks for this @bpampel, perhaps it will be valuable for @galabovaa
Hi @bpampel, would you please check if our latest updated fixed this?
The build of highspy has been updated, with a pre-release version already on PyPi and an official release coming up very soon.
"pip install . " already works from the "latest" branch and the code and new tagged version will be in master very soon too.
Please check it out and if you run into any further problems, open a new issue!