public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* gcc-3.4.3 and libstdc++.so.(5|6)
@ 2008-02-25  3:16 Jens Müller
  2008-02-25 15:03 ` Andrew Haley
  2008-02-26 19:41 ` Jens Müller
  0 siblings, 2 replies; 3+ messages in thread
From: Jens Müller @ 2008-02-25  3:16 UTC (permalink / raw)
  To: gcc-help

Hi,

I have a library version problem.

I have to use gcc 3.4.3 because I am developing using the LEDA library, 
and we only have the library for that compiler and no subscription 
including compiler upgrades :-|

Well, I am using boost-1.33.1 for libboost_program_options-gcc-mt-d.so.
I got that compiled with gcc34/g++34 (the name of the gcc 3.4 binaries 
on the system I am using).

But when linking with my program, I get

/usr/lib64/../x86_64-suse-linux/bin/ld: warning: libstdc++.so.5, needed 
by 
/home/jmueller/software-gcc34-64bit/boost/lib/libboost_program_options-gcc-mt-d.so, 
may conflict with libstdc++.so.6

ldd confirms the version mismatch:

$ ldd 
/home/jmueller/software-gcc34-64bit/boost/lib/libboost_program_options-gcc-mt-d.so
         librt.so.1 => /lib64/tls/librt.so.1 (0x00002aaaaac54000)
         libstdc++.so.5 => /usr/lib64/libstdc++.so.5 (0x00002aaaaad5c000)
         libm.so.6 => /lib64/tls/libm.so.6 (0x00002aaaaaf38000)
         libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00002aaaab090000)
         libpthread.so.0 => /lib64/tls/libpthread.so.0 (0x00002aaaab19b000)
         libc.so.6 => /lib64/tls/libc.so.6 (0x00002aaaab2b0000)
         /lib64/ld-linux-x86-64.so.2 (0x0000555555554000)


jmueller@compute4:~/separator_devel/separator_jens$ ldd separator
         libboost_program_options-gcc-mt-d-1_33_1.so.1.33.1 => 
/home/jmueller/software-gcc34-64bit/boost/lib/libboost_program_options-gcc-mt-d-1_33_1.so.1.33.1 
(0x00002aaaaabc2000)
         libexpat.so.1 => 
/home/jmueller/software-gcc34-64bit/expat/lib/libexpat.so.1 
(0x00002aaaaad3b000)
         libxerces-c.so.27 => 
/home/jmueller/software-gcc34-64bit/xerces-2.7.0/lib/libxerces-c.so.27 
(0x00002aaaaae5e000)
         libbz2.so.1 => /usr/lib64/libbz2.so.1 (0x00002aaaab3a7000)
         liblog4cplus.so.2 => 
/home/mholzer/Linux/log4cplus-1.0.2_gcc3.4.3_64bit/src/.libs/liblog4cplus.so.2 
(0x00002aaaab4b7000)
         libstdc++.so.6 => /sw/linux/gcc34/usr/lib64/libstdc++.so.6 
(0x00002aaaab622000)
         libm.so.6 => /lib64/tls/libm.so.6 (0x00002aaaab814000)
         libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00002aaaab96c000)
         libc.so.6 => /lib64/tls/libc.so.6 (0x00002aaaaba77000)
         librt.so.1 => /lib64/tls/librt.so.1 (0x00002aaaabc9d000)
         libstdc++.so.5 => /usr/lib64/libstdc++.so.5 (0x00002aaaabda6000)
         libpthread.so.0 => /lib64/tls/libpthread.so.0 (0x00002aaaabf82000)
         /lib64/ld-linux-x86-64.so.2 (0x00002aaaaaaab000)


When running the binary, I get a SIGSEGV.

So, my first question on this issue is: Shouldn't gcc normally have the 
paths to its C++ stdlib hard-coded into the binary?

And what is the libstdc++ version used in gcc 3.4.3?

I don't really understand what's happing here ...

The setup of the system I use for compiling is unfortunately quite a 
mess, so maybe it'll get ugly.

But first I would be really grateful for some hints on the questions 
above ...

Jens

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: gcc-3.4.3 and libstdc++.so.(5|6)
  2008-02-25  3:16 gcc-3.4.3 and libstdc++.so.(5|6) Jens Müller
@ 2008-02-25 15:03 ` Andrew Haley
  2008-02-26 19:41 ` Jens Müller
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Haley @ 2008-02-25 15:03 UTC (permalink / raw)
  To: Jens Müller; +Cc: gcc-help

Jens Müller wrote:
> 
> I have to use gcc 3.4.3 because I am developing using the LEDA library, 
> and we only have the library for that compiler and no subscription 
> including compiler upgrades :-|

OK.

> Well, I am using boost-1.33.1 for libboost_program_options-gcc-mt-d.so.
> I got that compiled with gcc34/g++34 (the name of the gcc 3.4 binaries 
> on the system I am using).

This won't work.  You will need to compile it with gcc 3.4.3 if you want
to link your against the LEDA library.

> But when linking with my program, I get [ a libstdc++ version conflict ]

> 
> When running the binary, I get a SIGSEGV.
> 
> So, my first question on this issue is: Shouldn't gcc normally have the 
> paths to its C++ stdlib hard-coded into the binary?

No.  It is possible to do this, but in general it's a really bad idea.

> And what is the libstdc++ version used in gcc 3.4.3?
> 
> I don't really understand what's happing here ...

I do.  You are trying to link against a binary that has been linked
against an incompatible version of libstdc++.

You can't link a single program against two versions of libstdc++.  Your
best bet is to have two programs, communicating through shared files or
pipes.

Andrew.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: gcc-3.4.3 and libstdc++.so.(5|6)
  2008-02-25  3:16 gcc-3.4.3 and libstdc++.so.(5|6) Jens Müller
  2008-02-25 15:03 ` Andrew Haley
@ 2008-02-26 19:41 ` Jens Müller
  1 sibling, 0 replies; 3+ messages in thread
From: Jens Müller @ 2008-02-26 19:41 UTC (permalink / raw)
  To: gcc-help

Jens Müller wrote:
> I don't really understand what's happing here ...

Args ...

The environment variable to use for the Boost configure process is GXX, 
not CXX ...

So gcc 3.3.5 got used ...

Sorry for bothering ...

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-02-26 19:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-25  3:16 gcc-3.4.3 and libstdc++.so.(5|6) Jens Müller
2008-02-25 15:03 ` Andrew Haley
2008-02-26 19:41 ` Jens Müller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).