Project

General

Profile

Actions

Bug #4267

closed

RUNPATH missing from c++ executables

Added by Gary Mills over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
tools - gate/build tools
Start date:
2013-10-24
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:
External Bug:

Description

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'
    [2]    NEEDED          libstdc++.so.6
    [4]    NEEDED          libgcc_s.so.1
    [6]    NEEDED          libm.so.2
    [7]    NEEDED          libc.so.1
    [21]    VERNEED         0x80567d8
    [22]    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'
    [2]    NEEDED          libstdc++.so.6
    [4]    NEEDED          libgcc_s.so.1
    [6]    NEEDED          libm.so.2
    [7]    NEEDED          libc.so.1
    [10]    RUNPATH         /opt/gcc/4.4.4/lib
    [11]    RPATH           /opt/gcc/4.4.4/lib
    [23]    VERNEED         0x80567ec
    [24]    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.

Actions #1

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.

http://www.listbox.com/member/archive/182179/2013/08/search/YWRqdW5jdHM/sort/time_rev/page/18/entry/0:1/20130816122950:0D0E0388-0691-11E3-81F4-BC81DE2C0CE4/

Actions

Also available in: Atom PDF