Question

Hi. 64-bit Linux system. I dloaded the stable tarball of libraries for x86_64. Attempting to link to them produces a stream of undefined reference errors from GPSTk code indicating that the linker couldn't resolve references to standard C++ functions/classes, e.g.:

librxio.a(EphReader.o): In function `gpstk::EphReader::read_fic_data(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
EphReader.cpp:(.text+0x27c): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long)'
EphReader.cpp:(.text+0x4e8): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long)'

I'm not really a C++ programmer, but this looks to me like it can't find the standard library. Doing some more research, I got the following when I looked at librxio's dependency for the standard library:

$ ldd librxio.so.16.0
./librxio.so.16.0: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by ./librxio.so.16.0)
   libm.so.6 => /lib64/libm.so.6 (0x00002aaaaad45000)
   libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00002aaaaafc8000)
   libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00002aaaab2c8000)
   libc.so.6 => /lib64/libc.so.6 (0x00002aaaab4d7000)
   /lib64/ld-linux-x86-64.so.2 (0x0000555555554000)

So I read that as saying that librxio requires at least v3.4.9 of the standard library. But the version I have installed is 4.1.2:

$ rpm -qa | grep libstdc
compat-libstdc++-33-3.2.3-61.x86_64
libstdc++-devel-4.1.2-14.el5.i386
libstdc++-devel-4.1.2-14.el5.x86_64
libstdc++-4.1.2-14.el5.x86_64
libstdc++-4.1.2-14.el5.i386

Shouldn't this work? The shared object major number is 6, same as for v3.4.9. At this level, shouldn't this be backward compatible? It seems like GPSTk is looking for an earlier version of the library than what I have installed; but isn't there backward compatibility between versions with the same major number for the shared library? Again, I'm not really a C++ programmer; but I don't see what the problem is.

Any advice greatly appreciated. Thanks.

-- ChrisMetzler - 13 Mar 2010

Answer

ALERT! If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.

No such template def TMPL:DEF{PROMPT:supportquery}

Topic revision: r1 - 13 Mar 2010, ChrisMetzler
 

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback