Closed qpwodlsqp closed 8 months ago
Hi @qpwodlsqp , sorry for not getting to this earlier.
The linking error you're referring to is caused, as correctly spotted in https://github.com/CGAL/cgal-testsuite-dockerfiles/pull/138 , by the static linking of Boost library here. I currently don't see any advantage in linking Boost statically, but will leave this open to see if @KernelA has some comments on it. If not, I'll do a PR with a fix.
Hi, @qpwodlsqp.
Dou you compile boost with position-independent code generation?
boost is compiling with -fPIC
flag in the GitHub Actions.
@RedLeader962 Is the Python workflow currently used in the CI/CD system?
@KernelA Typically, you'd install boost on Linux / MacOS through your package manager, e.g., sudo apt-get install libboost1.37-dev
. What's your motivation for building the library from source?
@boxanm, because without -fPIC
full compilation process does not work. GitHub Actions compiles wheel package which we can install except some problems with manylinux:
https://peps.python.org/pep-0600/
@boxanm No the python binding compilation and testing logic are not implemented yet on the libpointmatcher-build-system
running on the norlab-teamcity-server
. We have decided to postpone the python binding integration to latter this year. However they are build via github action on merge to the master branch.
@KernelA while I understand the need to install Boost statically to ship wheel packages and eventually publish libpointmatcher
on PyPi or elsewhere, I believe that it only needs to be done as part of Github actions. Most libpointmatcher
users already have Boost (and Eigen) installed and shared between multiple projects. We should not complicate libpointmatcher
's installation by requiring Boost to be built from source.
So I suggest setting the Boost_USE_STATIC_LIBS
to OFF by default and only triggering it in the Github actions pipeline.
I'm a big fan of publishing the library on PyPi, however, the current Python bindings installation is unnecessarily complicated in my opinion. As compared to simply setting a cmake flag, you need the extra step to call pip build
. Again, ok for the build system, but user installations should have the least requirements possible.
Hi, @boxanm. The necessary changes in the pull request #530
Hi, @qpwodlsqp. We merged into develop branch necessary changes. Boost linking is dynamic, by default.
I followed the instruction to build with python but got the below error message during compilation.
I checked whether my
libboost_filesystem.a
had an issue with linking following this page, but it printed below messages so it seems my static library is not a problem.I made sure that the version of pybind11 is 2.5.0 and designated the python executable of my conda environment (
cmake -DPYTHON_EXECUTABLE=$(python3.8 -c "import sys; print(sys.executable)") ..
while activating conda env).This is my variable configurations of cmake. My OS is Ubuntu 18.04.5 LTS.