1

I got following error while compiling library that computes some stuff with molecules. It is mostly academic project.

/usr/bin/ld: trajectory_manager.o: undefined reference to symbol '_ZSt24__throw_out_of_range_fmtPKcz@@GLIBCXX_3.4.20'
//usr/lib/x86_64-linux-gnu/libstdc++.so.6: error adding symbols: DSO missing from command line

It occurs to me that linker is trying to use some specific version of GLIBC but fails to find it or something but I am unable to find any solution to this at all.

The code was compiled using g++ (gcc version 5.3). Linker I have in version ldd (Ubuntu EGLIBC 2.19-0ubuntu6.7) 2.19. If necessary please tell me in comment section and I will provide any further information.

Edit: Each src is compiled using:

mpiCC -pthread -ansi -Wno-long-long -g -D_DEBUG -I /home/asd/tunnel_analyzer/boost_lib/include  -I ../../../src/lib -o main.o -c ../../../src/main/main.cpp 
mpiCC -pthread -ansi -Wno-long-long -g -D_DEBUG -I /home/asd/tunnel_analyzer/boost_lib/include  -o cache.o -c ../../../src/lib/cache.cpp

etc. and linked

mpiCC -pthread -ansi -Wno-long-long -g -D_DEBUG -I /home/asd/tunnel_analyzer/boost_lib/include -L/home/asd/tunnel_analyzer/boost_lib/lib -L. -o caverdock main.o cache.o coords.o current_weights.o everything.o grid.o szv_grid.o manifold.o model.o monte_carlo.o mutate.o my_pid.o naive_non_cache.o non_cache.o parallel_mc.o parse_pdbqt.o pdb.o quasi_newton.o quaternion.o random.o ssd.o terms.o weighted_terms.o constraint.o scheduler.o trajectory_manager.o -l boost_system -l boost_thread -l boost_serialization -l boost_filesystem -l boost_program_options

Note that mpiCC is just alias for g++.

Jendas
  • 3,359
  • 3
  • 27
  • 55
  • Maybe it helps http://stackoverflow.com/questions/19901934/strange-linking-error-dso-missing-from-command-line – wesley.mesquita Feb 26 '16 at 10:54
  • How are you compiling the project? Which commands did you use? – VLL Feb 26 '16 at 10:59
  • Commands were added. Unfortunately linked question deals with wrong ordering of lib flags and this doesn't feel like that kind of problem. – Jendas Feb 26 '16 at 11:09

1 Answers1

3

it seems to be a G++ bug; installing libstdc++6 (4.9) apparently helps solve this.

Pandrei
  • 4,843
  • 3
  • 27
  • 44
  • According to aptitude for `libstdc++6-4.9` there is only `libstdc++6-4.9-dbg` package. – Jendas Feb 26 '16 at 11:11
  • I tried installing that `dbg` package but it didn't solve the problem :-/ – Jendas Feb 26 '16 at 11:21
  • well debugging this sort of issue is never easy; I'd start by trying to find out where the missing symbol is defined....it has to be somewhere – Pandrei Feb 26 '16 at 13:30