0

I'am trying build boost 1.69 on Solaris 11.3 with gcc 4.8.2. Then build is complete i'am see (with ldd libname.so) that linker using relative path in dynamic section tag NEEDED bin.v2/libs/atomic/build/gcc-4.8.2/release/threading-multi/visibility-hidden/libboost_atomic.so.1.69.0 It is not good. I want to linker use only libname without any path (absolute or relative). How i can set short name link?

So: outut ldd from solaris and ldd from RHEL 6

Solaris

ldd libboost_thread.so.1.69.0

    **bin.v2/libs/system/build/gcc-4.8.2/release/threading-multi/visibility-hidden/libboost_system.so.1.69.0** =>        bin.v2/libs/system/build/gcc-4.8.2/release/threading-multi/visibility-hidden/libboost_system.so.1.69.0

.........

linux

ldd libboost_thread.so.1.69.0

    linux-gate.so.1 =>  (0x00ba6000)
    **libboost_system.so.1.69.0** => /usr/lib/libboost_system.so.1.69.0 (0x00a53000)

........

Why on Solaris boost building with using crasy path in dependency name, but on Linux - it normal - only libname without any path. How i can say to b2 or other tool to use only short dependency name?

Shampoo
  • 417
  • 5
  • 8
  • What does `elfdump -d libboost_thread.so.1.69.0` show on Solaris? Is it actually part of the NEEDED entry or from the RPATH? – alanc Apr 17 '19 at 20:58
  • [0] NEEDED 0x3c13 bin.v2/libs/system/build/gcc-4.8.2/release/threading-multi/visibility-hidden/libboost_system.so.1.69.0 [1] NEEDED 0x3b63 librt.so.1 [2] NEEDED 0x3b77 libstdc++.so.6 [3] NEEDED 0x3c7a libm.so.2 [4] NEEDED 0x3bbb libgcc_s.so.1 [5] NEEDED 0x3bd1 libpthread.so.1 [6] NEEDED 0x3bf3 libc.so.1 On [0] linker used relative path but on other dependencies use only name (that i need). WHY? – Shampoo May 06 '19 at 17:14

1 Answers1

0

The Solaris linker is simply recording what it was told - it appears the command to link the software passed bin.v2/libs/system/build/gcc-4.8.2/release/threading-multi/visibility-hidden/libboost_system.so.1.69.0 to the linker, instead of the normal -Lbin.v2/libs/system/build/gcc-4.8.2/release/threading-multi/visibility-hidden/ -lboost_system. You'll have to look into the build scripts/Makefiles to determine why it's doing that.

alanc
  • 4,102
  • 21
  • 24