Subject: pkg/17467: zoularis gcc should include lib search path for gcc supplied libraries
To: None <gnats-bugs@gnats.netbsd.org>
From: None <ingolf.steinbach@jena-optronik.de>
List: netbsd-bugs
Date: 07/03/2002 04:01:01
>Number:         17467
>Category:       pkg
>Synopsis:       zoularis gcc should include lib search path for gcc supplied libraries
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 03 04:02:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Ingolf Steinbach
>Release:        pkgsrc (zoularis) as of 2002-06-17
>Organization:
Jena-Optronik GmbH
>Environment:
SunOS ray-1 5.8 Generic_108528-05 sun4u sparc SUNW,UltraAX-i2

>Description:
Under zoularis, the lang/gcc package does not include the path to the
gcc supplied libraries (e.g. libstdc++) in the run-time library search
path which is compiled into a binary.
If I remember correctly, it is not necessary on a NetBSD system to set
some environment variable or to specify some extra -R compiler options
when compiling a C++ program with the compiler from the lang/gcc pkg.
However, in a zoularis environment, it is necessary to either set the
LD_RUN_PATH (which I dislike very much) or add a -R option with the
directory containing libstdc++.so.
>How-To-Repeat:
cat <<EOF >testprog.cpp
#include <iostream>
int main();
int main() {
    std::cout << "Hello World!\n";
    return 0;
}
EOF
g++ -o testprog testprog.cpp
ldd testprog

The latter produces "libstdc++.so.2.10.0nb1 =>        (file not found)
"
>Fix:
Make lang/gcc include ${PREFIX}/lib in the library search path of
programs it generates. I have no idea how this can be done though.
>Release-Note:
>Audit-Trail:
>Unformatted: