|
Boost-Build : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2006-03-10 07:22:21
On Friday 10 March 2006 15:06, Markus Schöpflin wrote:
> Vladimir Prus wrote:
> > On Friday 10 March 2006 13:32, Markus Schöpflin wrote:
> >> Because if you have multiple gcc versions installed side-by-side, you
> >> have to make sure that the dynamic libs matching the compiler version
> >> are loaded.
> >>
> >> For example:
> >> > ldd bind_visit_test
> >>
> >> Main => bind_visit_test
> >> libstdc++.so.6 => /opt/gcc-4.0.2/lib/libstdc++.so.6 (*)
> >> libm.so => /usr/shlib/libm.so
> >> libgcc_s.so.1 => /opt/gcc-4.0.2/lib/libgcc_s.so.1 (*)
> >> libc.so => /usr/shlib/libc.so
> >>
> >> The libs marked by (*) are dependent on the compiler version, hence the
> >> library loader path must be adjusted depending on the compiler version.
> >
> > Are there libraries with the same name in different locations? It seems
> > Debian somehow solves this problem...
> >
> > find /opt/ -name libstdc++.so.6
>
> /opt/gcc-3.4.3/lib/libstdc++.so.6
> /opt/gcc-4.0.2/lib/libstdc++.so.6
> /opt/gcc-4.1.0/lib/libstdc++.so.6
>
> > find /opt/ -name libgcc_s.so.1
>
> /opt/gcc-3.3.4/lib/libgcc_s.so.1
> /opt/gcc-3.4.3/lib/libgcc_s.so.1
> /opt/gcc-4.0.2/lib/libgcc_s.so.1
> /opt/gcc-4.1.0/lib/libgcc_s.so.1
>
> It would be interesting to know how debian does solve this problem.
Well, for gcc 3.3 vs 4.0, they use sonames:
$ g++-3.3 a.cpp
a.cpp:4:2: warning: no newline at end of file
ghost_at_ghostwalk:/tmp$ ldd a.out
linux-gate.so.1 => (0xffffe000)
libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x40029000)
libm.so.6 => /lib/tls/libm.so.6 (0x400e3000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x40109000)
libc.so.6 => /lib/tls/libc.so.6 (0x40114000)
/lib/ld-linux.so.2 (0x40000000)
ghost_at_ghostwalk:/tmp$ g++-4.0 a.cpp
a.cpp:4:2: warning: no newline at end of file
ghost_at_ghostwalk:/tmp$ ldd a.out
linux-gate.so.1 => (0xffffe000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x40029000)
libm.so.6 => /lib/tls/libm.so.6 (0x40106000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x4012c000)
libc.so.6 => /lib/tls/libc.so.6 (0x40137000)
/lib/ld-linux.so.2 (0x40000000)
See, libstdc++.so.5 is used in one case and libstd++.so.6 is used in another
case. For libgcc_s.so.1 -- I actually don't know. It seems like only one
version can be installed at a time, so probably they just sure that all
versions are binary compatible.
> >>> BTW, can you also tell how you configure gcc-4.0.2 with V1? That is,
> >>> what's the content of the toolset file?
> >>
> >> {
> >> local GCC_ROOT_DIRECTORY = "/opt/gcc-4.0.2" ;
> >
> > Anyway, OS differences do not matter. I've checked in a patch that should
> > make this work automatically with V2. Can you try again?
>
> Works perfect now, thanks.
Great.
- Volodya
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk