Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install fail on Ubuntu 22.x: No module named boost_python_meta_ext #24

Open
iqphan opened this issue Nov 7, 2022 · 6 comments
Open

Comments

@iqphan
Copy link

iqphan commented Nov 7, 2022

Hello,

I work for a govt-funded project and as a contract requirement must install this software.

Back in 2014 when I last installed it on Ubuntu, the install threw the same error "No module named boost_python_meta_ext". At the time, this was solved by installing boost separately.

After the first attempt at installation failed, I installed boost with:

  1. sudo apt install libboost-all-dev => MolProbity installation fails again with "No module named boost_python_meta_ext".
  2. install boost from boost.org source distro => no change, MolProbity installation fails again with "No module named boost_python_meta_ext".

Boost installation is perhaps not the issue, searching hints at ccp4 or phenix issues...maybe?? there's no ccp4 or phenix installed on that machine, they are not listed as a requirement.

OS: Ubuntu 22.04
MolProbity: git clone from this repo
Command: bash ./install_via_bootstrap.sh 2
Error:

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/ubuntu/Downloads/MolProbity/modules/boost/boost/thread/exceptions.hpp:20,
from /home/ubuntu/Downloads/MolProbity/modules/boost/boost/thread/pthread/thread_data.hpp:10,
from /home/ubuntu/Downloads/MolProbity/modules/boost/boost/thread/thread_only.hpp:17,
from /home/ubuntu/Downloads/MolProbity/modules/boost/libs/thread/src/pthread/thread.cpp:11:
/home/ubuntu/Downloads/MolProbity/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.89 seconds
wall clock time: 45.42 seconds
Process failed with return code 2
Traceback (most recent call last):
File "modules/chem_data/cablam_data/rebuild_cablam_cache.py", line 8, in
from mmtbx.rotamer.n_dim_table import NDimTable
File "/home/ubuntu/Downloads/MolProbity/modules/cctbx_project/mmtbx/rotamer/n_dim_table.py", line 2, in
from scitbx.array_family import flex
File "/home/ubuntu/Downloads/MolProbity/modules/cctbx_project/scitbx/array_family/flex.py", line 7, in
import boost_adaptbx.boost.optional # import dependency
File "/home/ubuntu/Downloads/MolProbity/modules/cctbx_project/boost_adaptbx/boost/optional.py", line 2, in
import boost_adaptbx.boost.python as bp
File "/home/ubuntu/Downloads/MolProbity/modules/cctbx_project/boost_adaptbx/boost/python.py", line 40, in
ext = import_ext("boost_python_meta_ext")
File "/home/ubuntu/Downloads/MolProbity/modules/cctbx_project/boost_adaptbx/boost/python.py", line 33, in import_ext
+ [" "+p for p in sys.path]))
ImportError: import("boost_python_meta_ext"): No module named boost_python_meta_ext

@iqphan
Copy link
Author

iqphan commented Nov 7, 2022

FYI I modified the boost thread_data.hpp as discribed in this post: boostorg/thread#364 (comment)

Restarting install_via_bootstrap.sh failed with the error directory already exists, use --force.

Restarting install_via_bootstrap.sh --force has zero effect, I still got the error directory already exists, use --force :(

So I did a 'commit -a' from inside modules/boost/boost and ran:
./conda_base/bin/python2.7 bootstrap.py --builder=molprobity --use-conda 2
It failed with:

g++ -o boost_adaptbx/tests/tst_optional_copy -s -pthread boost_adaptbx/tests/tst_optional_copy.o -Llib -L/home/ubuntu/Downloads/MolProbity/modules/lib -L/home/ubuntu/Downloads/MolProbity/modules/cctbx_project/lib -L/home/ubuntu/Downloads/MolProbity/conda_base/lib -Llib -L/home/ubuntu/Downloads/MolProbity/modules/lib -L/home/ubuntu/Downloads/MolProbity/modules/cctbx_project/lib -lboost_thread -lboost_system
/usr/bin/ld: boost_adaptbx/tests/tst_optional_copy.o: in function void boost_adaptbx::tst_optional_copy::exercise<std::vector<int, std::allocator<int> > >(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&, bool)': tst_optional_copy.cpp.text.ZN13boost_adaptbx17tst_optional_copy8exerciseISt6vectorIiSaIiEEEEvRKT_S7_b[_ZN13boost_adaptbx17tst_optional_copy8exerciseISt6vectorIiSaIiEEEEvRKT_S7_b]+0x5a6): undefined reference to std::_throw_bad_array_new_length()'
/usr/bin/ld: tst_optional_copy.cpp.text.ZN13boost_adaptbx17tst_optional_copy8exerciseISt6vectorIiSaIiEEEEvRKT_S7_b[_ZN13boost_adaptbx17tst_optional_copy8exerciseISt6vectorIiSaIiEEEEvRKT_S7_b]+0x5ce): undefined reference to std::_throw_bad_array_new_length()' /usr/bin/ld: tst_optional_copy.cpp.text.ZN13boost_adaptbx17tst_optional_copy8exerciseISt6vectorIiSaIiEEEEvRKT_S7_b[_ZN13boost_adaptbx17tst_optional_copy8exerciseISt6vectorIiSaIiEEEEvRKT_S7_b]+0x5de): undefined reference to std::_throw_bad_array_new_length()'
/usr/bin/ld: tst_optional_copy.cpp.text.ZN13boost_adaptbx17tst_optional_copy8exerciseISt6vectorIiSaIiEEEEvRKT_S7_b[_ZN13boost_adaptbx17tst_optional_copy8exerciseISt6vectorIiSaIiEEEEvRKT_S7_b]+0x5ee): undefined reference to std::_throw_bad_array_new_length()' /usr/bin/ld: tst_optional_copy.cpp.text.ZN13boost_adaptbx17tst_optional_copy8exerciseISt6vectorIiSaIiEEEEvRKT_S7_b[_ZN13boost_adaptbx17tst_optional_copy8exerciseISt6vectorIiSaIiEEEEvRKT_S7_b]+0x5fe): undefined reference to std::_throw_bad_array_new_length()'
/usr/bin/ld: boost_adaptbx/tests/tst_optional_copy.o:tst_optional_copy.cpp.text.ZN13boost_adaptbx17tst_optional_copy8exerciseISt6vectorIiSaIiEEEEvRKT_S7_b[_ZN13boost_adaptbx17tst_optional_copy8exerciseISt6vectorIiSaIiEEEEvRKT_S7_b]+0x616): more undefined references to `std::_throw_bad_array_new_length()' follow
collect2: error: ld returned 1 exit status
scons: *** [boost_adaptbx/tests/tst_optional_copy] Error 1
scons: building terminated because of errors.

Please do you have a binary of molscript that runs on Ubuntu?

@chrissciwilliams
Copy link
Collaborator

chrissciwilliams commented Nov 8, 2022 via email

@iqphan
Copy link
Author

iqphan commented Nov 8, 2022

Thank you for the suggestion. This is odd, I am now getting:

SCons Error: option -j: invalid integer value: '--nproc=2'

@chrissciwilliams
Copy link
Collaborator

That is indeed odd.

It looks like my text formatting has not translated from my email to GitHub. Without formatting, it should look like:
python bootstrap.py --builder=molprobity --use-conda --nproc=2

It looks like the entire "--nproc=2" is being passed to scons, rather than just the "2". I can reproduce this if I try the command:
python bootstrap.py --builder=molprobity --use-conda --nproc=--nproc=2 build

Something like this will get run if you try: "python install_via_bootstrap.py --nproc=2"

bootstrap.py and install_via_bootstrap.py are not the same thing and they take different arguments.
bootstrap.py accepts many arguments, including --nproc=#
install_via_bootstrap.py accepts only a single argument, an integer, which it then uses to construct a --nproc=# flag for its internal invocation of bootstrap.py

Allocating additional processors to the build process in convenient, but not necessary. Perhaps we should skip that step for now.

@iqphan
Copy link
Author

iqphan commented Nov 8, 2022

Sorry I am now completely confused. I ran:

./conda_base/bin/python2.7 bootstrap.py --builder=molprobity --use-conda --nproc=2 --force

I cannot find install_via_bootstrap.py , only the install_via_bootstrap.sh shell script

@iqphan
Copy link
Author

iqphan commented Nov 8, 2022

Please can you close this thread and switch to: #25 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants