michellab / Sire

Sire Molecular Simulations Framework
http://siremol.org
GNU General Public License v3.0
95 stars 26 forks source link

Compiling the wrapper doesn't find the boost/python.hpp #352

Closed bieniekmateusz closed 3 years ago

bieniekmateusz commented 3 years ago

Hi there,

I used the compile_sire.sh script and on my computer it is having problems with finding the boost files. I had to manually set export CPLUS_INCLUDE_PATH=...conda/include in order to make it work.

I am logging it here in case this if of use.


[  0%] Building CXX object python/CMakeFiles/sire_python.dir/main.cpp.o
cd /src/build/wrapper/python && /opt/vsite_vanish/bin/x86_64-conda_cos6-linux-gnu-g++ -DQT_CORE_LIB -DQT_NO_DEBUG -I/opt/vsite_vanish/pkgs/sire-2021.1.0/include/Sire -I/src/build/wrapper -I/src/wrapper -I/opt/vsite_vanish/Library/include -I/opt/vsite_vanish/include/python3.7m -isystem /opt/vsite_vanish/include/qt -isystem /opt/vsite_vanish/include/qt/QtCore -isystem /opt/vsite_vanish/./mkspecs/linux-g++ -Os -DNDEBUG -Wall -Wno-attributes -pipe -DSIRE_ALWAYS_INLINE=inline -D_GLIBCXX_USE_CXX11_ABI=0 -Wno-strict-aliasing -DSIRE_VISIBILITY_AVAILABLE -fvisibility=hidden -fvisibility-inlines-hidden  -std=c++14 -DSIRE_HAS_CPP_14 -DSIRE_HAS_CPP_1Y -DSIRE_HAS_CPP_11 -Os  -w -fPIC -o CMakeFiles/sire_python.dir/main.cpp.o -c /src/wrapper/python/main.cpp
In file included from /src/wrapper/Helpers/objectregistry.cpp:2:0:
/src/wrapper/Helpers/objectregistry.hpp:5:10: fatal error: boost/python.hpp: No such file or directory
 #include <boost/python.hpp>
          ^~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [Helpers/CMakeFiles/SirePython.dir/build.make:82: Helpers/CMakeFiles/SirePython.dir/objectregistry.cpp.o] Error 1
make[2]: Leaving directory '/src/build/wrapper'
make[1]: *** [CMakeFiles/Makefile2:561: Helpers/CMakeFiles/SirePython.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/src/wrapper/python/main.cpp:8:10: fatal error: tbb/task_scheduler_init.h: No such file or directory
 #include "tbb/task_scheduler_init.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [python/CMakeFiles/sire_python.dir/build.make:82: python/CMakeFiles/sire_python.dir/main.cpp.o] Error 1
make[2]: Leaving directory '/src/build/wrapper'
make[1]: *** [CMakeFiles/Makefile2:1074: python/CMakeFiles/sire_python.dir/all] Error 2
make[1]: Leaving directory '/src/build/wrapper'
make: *** [Makefile:149: all] Error 2
SOMETHING WENT WRONG WHEN COMPILING WRAPPER!```
lohedges commented 3 years ago

Thanks for the workaround. I've seen this issue intermittently but it has never been fully reproducible for me. Normally I've seen it with a rebuild after making some edits, where the previous clean build worked. Usually trashing the environment and starting again solves things. When I get a chance, I'll update the docs with your workaround. (The problem never occurs in the Azure build, which passes without issue.)

bieniekmateusz commented 3 years ago

Thanks, I agree. I don't recall having this issue when installing it on Ubuntu, or some of the clusters. It's only on Arch Linux I found this so far. Feel free to close.

lohedges commented 3 years ago

I'm on Arch too, so I'm glad it's not just me. I assumed it was some weird Cmake caching issue. The paths are the same for the corelib and wrappers build, so it's really strange that it forgets where things are when building the wrappers. (I've even got CMake to print out the paths and they are correct.)

lohedges commented 3 years ago

Closing since this appears to be a non-standard issue. Users can search the issues if they experience the same problem and we now have a documented workaround.