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

undefined reference to `__cxa_init_primary_exception@CXXABI_1.3.11' #20

Open
fishextinction opened this issue Jun 13, 2019 · 3 comments

Comments

@fishextinction
Copy link

fishextinction commented Jun 13, 2019

Hitting a general issue with install, despite following the directions.

As a friendly reminder, if developers expect (moderately) computationally literate biologists to use their software, they need to provide explicit lines of code in the README, not general instructions. Sometimes that's the difference between hundreds of citations or almost none.

user@computer:~$ git clone https://github.com/medvedevgroup/TwoPaCo
Cloning into 'TwoPaCo'...
remote: Enumerating objects: 38, done.
remote: Counting objects: 100% (38/38), done.
remote: Compressing objects: 100% (25/25), done.
remote: Total 3548 (delta 19), reused 28 (delta 13), pack-reused 3510
Receiving objects: 100% (3548/3548), 11.90 MiB | 5.98 MiB/s, done.
Resolving deltas: 100% (2325/2325), done.
user@computer:~$ cd TwoPaCo
user@computer:~/TwoPaCo$ mkdir build
user@computer:~/TwoPaCo$ cd build
user@computer:~/TwoPaCo/build$ cmake ../src
-- The C compiler identification is GNU 5.5.0
-- The CXX compiler identification is GNU 5.5.0
-- Check for working C compiler: /home/linuxbrew/.linuxbrew/bin/cc
-- Check for working C compiler: /home/linuxbrew/.linuxbrew/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /home/linuxbrew/.linuxbrew/bin/c++
-- Check for working CXX compiler: /home/linuxbrew/.linuxbrew/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/TwoPaCo/build
user@computer:~/TwoPaCo/build$  sudo apt-get install libtbb-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-4.15.0-48 linux-headers-4.15.0-48-generic linux-image-4.15.0-48-generic
  linux-modules-4.15.0-48-generic linux-modules-extra-4.15.0-48-generic python3-dateutil
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libtbb2
Suggested packages:
  tbb-examples libtbb-doc
The following NEW packages will be installed:
  libtbb-dev libtbb2
0 to upgrade, 2 to newly install, 0 to remove and 77 not to upgrade.
Need to get 342 kB of archives.
After this operation, 2,033 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://au.archive.ubuntu.com/ubuntu bionic/universe amd64 libtbb2 amd64 2017~U7-8 [110 kB]
Get:2 http://au.archive.ubuntu.com/ubuntu bionic/universe amd64 libtbb-dev amd64 2017~U7-8 [231 kB]
Fetched 342 kB in 0s (2,559 kB/s)   
Selecting previously unselected package libtbb2:amd64.
(Reading database ... 255576 files and directories currently installed.)
Preparing to unpack .../libtbb2_2017~U7-8_amd64.deb ...
Unpacking libtbb2:amd64 (2017~U7-8) ...
Selecting previously unselected package libtbb-dev:amd64.
Preparing to unpack .../libtbb-dev_2017~U7-8_amd64.deb ...
Unpacking libtbb-dev:amd64 (2017~U7-8) ...
Setting up libtbb2:amd64 (2017~U7-8) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Setting up libtbb-dev:amd64 (2017~U7-8) ...
user@computer:~/TwoPaCo/build$ make
[  7%] Building CXX object graphdump/CMakeFiles/graphdump.dir/graphdump.cpp.o
[ 14%] Building CXX object graphdump/CMakeFiles/graphdump.dir/__/common/dnachar.cpp.o
[ 21%] Building CXX object graphdump/CMakeFiles/graphdump.dir/__/common/streamfastaparser.cpp.o
[ 28%] Linking CXX executable graphdump
/usr/lib/x86_64-linux-gnu/libtbb.so: undefined reference to `__cxa_init_primary_exception@CXXABI_1.3.11'
/usr/lib/x86_64-linux-gnu/libtbb.so: undefined reference to `std::__exception_ptr::exception_ptr::exception_ptr(void*)@CXXABI_1.3.11'
collect2: error: ld returned 1 exit status
graphdump/CMakeFiles/graphdump.dir/build.make:146: recipe for target 'graphdump/graphdump' failed
make[2]: *** [graphdump/graphdump] Error 1
CMakeFiles/Makefile2:85: recipe for target 'graphdump/CMakeFiles/graphdump.dir/all' failed
make[1]: *** [graphdump/CMakeFiles/graphdump.dir/all] Error 2
Makefile:105: recipe for target 'all' failed
make: *** [all] Error 2
@iminkin
Copy link
Contributor

iminkin commented Jun 13, 2019

Thanks for reporting this. I pushed a quick fix to the 0.9.4 branch. However, I can't test it on my machine since the error seems to be caused by a specific version of GCC (https://stackoverflow.com/questions/20708165/g-undefined-reference-to-symbol-cxa-free-exceptioncxxabi-1-3-when-buildi)

Could you please checkout the 0.9.4 and try compiling it?

git fetch
git checkout 0.9.4

@fishextinction
Copy link
Author

You're going to need to provide a more precise series of commands, I'm afraid. I'm getting lots of 'fatal: not a git repository (or any of the parent directories): .git' when I try to add a remote URL prior to fetching.

(Once again, you want empiricists, not just other developers, to be able to use your software. You have to spell it out for us, unfortunately.)

@iminkin
Copy link
Contributor

iminkin commented Jun 18, 2019

Sorry for a late reply, to do the whole thing from scratch try the following:

mkdir TwoPaCo-0.9.4
git clone https://github.com/medvedevgroup/TwoPaCo
git checkout 0.9.4
mkdir build
cd build
cmake ..
make

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