RUNPATH missing from c++ executables
tools - gate/build tools
When built with gcc, the RUNPATH is missing from executables compiled from c++ source. The errors in mail_msg are like this:
==== Check ELF runtime attributes ==== usr/bin/audioconvert: libstdc++.so.6 => (file not found) <no -zdefs?> usr/bin/audioconvert: libgcc_s.so.1 => (file not found) <no -zdefs?>
I'm using this compiler:
32-bit compiler /opt/onbld/bin/i386/cw -_gcc cw version 1.29 (SHADOW MODE DISABLED) primary: /opt/gcc/4.4.4/bin/gcc gcc (Illumos gcc-4.4.4-il-3) 4.4.4
Here are the dynamic settings of the executable:
$ dump -Lv proto/root_i386/usr/bin/audioconvert | egrep 'PATH|NEED'  NEEDED libstdc++.so.6  NEEDED libgcc_s.so.1  NEEDED libm.so.2  NEEDED libc.so.1  VERNEED 0x80567d8  VERNEEDNUM 0x3
This used to work. With a version of illumos obtained on Feb 10 20:17, there were no errors. The executable had:
$ dump -Lv proto/root_i386/usr/bin/audioconvert | egrep 'PATH|NEED'  NEEDED libstdc++.so.6  NEEDED libgcc_s.so.1  NEEDED libm.so.2  NEEDED libc.so.1  RUNPATH /opt/gcc/4.4.4/lib  RPATH /opt/gcc/4.4.4/lib  VERNEED 0x80567ec  VERNEEDNUM 0x3
I first noticed the problem with a version of illumos obtained on Tue Oct 22. Here's the change that caused the problem:
$ diff ../illumos-gate-feb/usr/src/Makefile.master usr/src/Makefile.master ... 690c725 < $(__GNUC)CCNEEDED = -L$(GCCLIBDIR) -R$(GCCLIBDIR) -lstdc++ -lgcc_s --- > $(__GNUC)CCNEEDED = -L$(GCCLIBDIR) -lstdc++ -lgcc_s
My understanding is that whenever `-L' is needed, `-R' is also needed. The OS on this server is oi_151a8 . The gcc compiler was installed from the illumos-gcc package. Builds with the Studio compiler as primary work correctly.
Updated by Rich Lowe over 9 years ago
- Status changed from New to Closed
This is because of Keith's changes for #3915 Add adjuncts support to the build, which was accompanied by a flag day mentioning that the compiler runtime had to be in the paths now.