cctbx / cctbx_project

Computational Crystallography Toolbox
https://cci.lbl.gov/docs/cctbx
Other
207 stars 111 forks source link

Is there any recommended environment for building a development version? #984

Open erjiaxiao opened 2 months ago

erjiaxiao commented 2 months ago

Hello! I follow the instructions in https://github.com/cctbx/cctbx_project to build a development version. But there are some errors that occur when I run the command python bootstrap.py --use-conda. I try it on Windows 11, WSL Ubuntu18, and WSL Ubuntu20. I wonder if there is any docker environment in which we can build a development version smoothly?

bkpoon commented 2 months ago

Can you provide the output from your bootstrap.py command?

erjiaxiao commented 2 months ago

Hello @bkpoon, I use wsl2 Ubuntu22.04 on windows11. Here is the error output when I run python bootstrap.py --use-conda:

g++ -o boost/libs/thread/src/pthread/thread.o -c -I/home/claude/3DED/modules/boost -fPIC -fno-strict-aliasing -w -DNDEBUG -O3 -funroll-loops -DBOOST_ALL_NO_LIB -DBOOST_SYSTEM_NO_DEPRECATED=1 -DBOOST_THREAD_BUILD_DLL=1 -I/home/claude/3DED/modules -I/home/claude/3DED/modules/cctbx_project -I/home/claude/3DED/build/../conda_base/include /home/claude/3DED/modules/boost/libs/thread/src/pthread/thread.cpp In file included from /usr/include/pthread.h:33, from /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h:35, from /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h:148, from /usr/include/c++/11/ext/atomicity.h:35, from /usr/include/c++/11/bits/basic_string.h:39, from /usr/include/c++/11/string:55, from /home/claude/3DED/modules/boost/boost/thread/exceptions.hpp:20, from /home/claude/3DED/modules/boost/boost/thread/pthread/thread_data.hpp:10, from /home/claude/3DED/modules/boost/boost/thread/thread_only.hpp:17, from /home/claude/3DED/modules/boost/libs/thread/src/pthread/thread.cpp:11: /home/claude/3DED/modules/boost/boost/thread/pthread/thread_data.hpp:60:5: error: missing binary operator before token "(" 60 | #if PTHREAD_STACK_MIN > 0 | ^~~~~ scons: *** [boost/libs/thread/src/pthread/thread.o] Error 1 scons: building terminated because of errors. usr+sys time: 1.52 seconds wall clock time: 34.00 seconds Process failed with return code 2

bkpoon commented 2 months ago

Can you delete the 3DED/modules/boost and 3DED/build directories then run

python bootstrap.py **build** --use-conda

This will skip the steps that update the sources (which will try to download Boost again) and only try building. The included Boost sources are only intended for earlier Linux distributions.

erjiaxiao commented 2 months ago

@bkpoon Thank you! I successfully build the development version.