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

xmipp not compile with gcc-11 in Ubuntu 22.04 #583

Closed
albertmena opened this issue May 4, 2022 · 4 comments
Closed

xmipp not compile with gcc-11 in Ubuntu 22.04 #583

albertmena opened this issue May 4, 2022 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@albertmena
Copy link
Collaborator

Message as undefined reference to std:...
Fixed installing gcc/++-10

usr/bin/ld: /tmp/ccY3P97U.ltrans0.ltrans.o: in function `std::vector<MDObject*, std::allocator<MDObject*> >::operator=(std::vector<MDObject*, std::allocator<MDObject*> > const&)':
<artificial>:(.text+0x2346): undefined reference to `std::__throw_bad_array_new_length()'
/usr/bin/ld: lib/libXmipp.so: undefined reference to `std::__exception_ptr::exception_ptr::_M_release()'
/usr/bin/ld: lib/libXmipp.so: undefined reference to `std::__exception_ptr::exception_ptr::_M_addref()'
collect2: error: ld returned 1 exit status
scons: *** [bin/xmipp_transform_mask] Error 1
/usr/bin/ld: /tmp/ccCnXBqG.ltrans0.ltrans.o: in function `std::vector<MDObject*, std::allocator<MDObject*> >::vector(std::vector<MDObject*, std::allocator<MDObject*> > const&)':
<artificial>:(.text+0x1f9e): undefined reference to `std::__throw_bad_array_new_length()'
/usr/bin/ld: /tmp/ccCnXBqG.ltrans0.ltrans.o: in function `std::vector<MDObject*, std::allocator<MDObject*> >::vector(std::vector<MDObject*, std::allocator<MDObject*> > const&, std::allocator<MDObject*> const&)':
<artificial>:(.text+0x204e): undefined reference to `std::__throw_bad_array_new_length()'
/usr/bin/ld: /tmp/ccCnXBqG.ltrans0.ltrans.o: in function `std::vector<MDObject*, std::allocator<MDObject*> >::operator=(std::vector<MDObject*, std::allocator<MDObject*> > const&)':
<artificial>:(.text+0x2346): undefined reference to `std::__throw_bad_array_new_length()'
/usr/bin/ld: lib/libXmipp.so: undefined reference to `std::__exception_ptr::exception_ptr::_M_release()'
/usr/bin/ld: lib/libXmipp.so: undefined reference to `std::__exception_ptr::exception_ptr::_M_addref()'
collect2: error: ld returned 1 exit status
scons: *** [bin/xmipp_angular_continuous_assign] Error 1
/usr/bin/ld: /tmp/cc8R1uj3.ltrans0.ltrans.o: in function `std::vector<MDObject*, std::allocator<MDObject*> >::vector(std::vector<MDObject*, std::allocator<MDObject*> > const&)':
<artificial>:(.text+0x93ce): undefined reference to `std::__throw_bad_array_new_length()'
/usr/bin/ld: /tmp/cc8R1uj3.ltrans0.ltrans.o: in function `std::vector<MDObject*, std::allocator<MDObject*> >::vector(std::vector<MDObject*, std::allocator<MDObject*> > const&, std::allocator<MDObject*> const&)':
<artificial>:(.text+0x947e): undefined reference to `std::__throw_bad_array_new_length()'
/usr/bin/ld: /tmp/cc8R1uj3.ltrans0.ltrans.o: in function `std::vector<MDObject*, std::allocator<MDObject*> >::operator=(std::vector<MDObject*, std::allocator<MDObject*> > const&)':
<artificial>:(.text+0x9776): undefined reference to `std::__throw_bad_array_new_length()'
/usr/bin/ld: lib/libXmipp.so: undefined reference to `std::__exception_ptr::exception_ptr::_M_release()'
/usr/bin/ld: lib/libXmipp.so: undefined reference to `std::__exception_ptr::exception_ptr::_M_addref()'
collect2: error: ld returned 1 exit status
scons: *** [bin/xmipp_reconstruct_significant] Error 1
scons: building terminated because of errors.
Some error occurred during the compilation of 'xmipp' ('bin/xmipp_reconstruct_significant').
Traceback (most recent call last):
  File "/home/erney/software/miniconda3/envs/scipion3/bin/emprogram", line 8, in <module>
    sys.exit(main())
  File "/home/erney/software/miniconda3/envs/scipion3/lib/python3.8/site-packages/pwem/cmd/program.py", line 43, in main
    runProgram(program, params)
  File "/home/erney/software/miniconda3/envs/scipion3/lib/python3.8/site-packages/pwem/utils.py", line 73, in runProgram
    pwutils.runJob(None, program, params, env=env)
  File "/home/erney/software/miniconda3/envs/scipion3/lib/python3.8/site-packages/pyworkflow/utils/process.py", line 52, in runJob
    return runCommand(command, env, cwd)
  File "/home/erney/software/miniconda3/envs/scipion3/lib/python3.8/site-packages/pyworkflow/utils/process.py", line 67, in runCommand
    check_call(command, shell=True, stdout=sys.stdout, stderr=sys.stderr,
  File "/home/erney/software/miniconda3/envs/scipion3/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ' xmipp-bundle/xmipp ' returned non-zero exit status 1.
@albertmena albertmena added the bug Something isn't working label May 4, 2022
@albertmena albertmena self-assigned this May 4, 2022
@albertmena
Copy link
Collaborator Author

albertmena commented Jun 2, 2022

Explanation of the issue: stan-dev/pystan#294 (comment)
Version of libstdc++ of the system newer than the one used by conda

@albertmena
Copy link
Collaborator Author

FIXED: two ways to fix

  1. Change the symbolic link of libstdc++ in your scipion enviroment of conda:

cd $CONDA_PREFIX/envs/your_env/lib

Verify that _ZSt28__throw_bad_array_new_lengthv is missing in the target shared object
objdump -T libstdc++.so.6.0.28 | grep throw_bad_array

Back-up the target shared object
mv libstdc++.so.6.0.28 libstdc++.so.6.0.28.old

Change the target to point on the system's
ln -s /usr/lib64/libstdc++.so.6.0.29 libstdc++.so.6.0.28

  1. Install compiler toolchain in conda:

conda install c-compiler cxx-compiler

@JoelTV2021
Copy link

Hi! Can you help me with Scipion's installation on ubuntu 22.04?

@Ratolon
Copy link
Collaborator

Ratolon commented Sep 10, 2023

Hello, Joel!

This is not the place to ask for the community support. You can check out our official Scipion installation guide on github or you could also join our community server, where you can discuss and ask for help

Scipion3 official install guide

Scipion official Discord server

Cheers :)
Mikel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants