From: Matt H. <ma...@ms...> - 2022-04-29 17:33:15
|
On Fri, Apr 29, 2022 at 2:00 AM Alberto Garcia Mena < alb...@cn...> wrote: > I tried to install xmipp in Ubuntu 22.04 from scratch and I get an error > like "undefined reference to 'std::...". By default Ubuntu installed gcc-11 > ( sudo apt build-essential). I installed gcc/g++-10, updated the symbolic > links and removed and reinstalled libopenmpi-dev. After that, I was able to > install Xmipp successively. > Yes, those are the errors I got with GCC 11.2.0, the default version in Ubuntu 22.04. For example: <artificial>:(.text+0x4e86): 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_micrograph_scissor] Error 1 > scons: building terminated because of errors. Some error occurred during the compilation of 'xmipp' > ('bin/xmipp_micrograph_scissor'). Good to know that it works with GCC 10. We had a facility maintenance window overlap with the release of Ubuntu 22.04, so I did the upgrade last week. I reverted to 20.04 yesterday because I was in a hurry. I'll revisit this during the next maintenance window, but that won't be for a long time. It's curious that the linker couldn't find parts of the standard library related to exceptions, but presumably the linker could find the rest of the standard library such as the ubiquitous std::vector. Matt |