pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/46802: lang/clang: path issue due to being built on system compiler



>Number:         46802
>Category:       pkg
>Synopsis:       lang/clang: path issue due to being built on system compiler
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Aug 15 09:40:00 +0000 2012
>Originator:     John Marino
>Release:        DragonFly 3.1
>Organization:
>Environment:
>Description:
Clang apparently doesn't bootstrap itself, but builds with the system compiler.

The DragonFly compilers will automatically insert an rpath of "/usr/lib/gcc41" 
or "/usr/lib/gcc44" to every built executable.  And it's doing it for clang.

> readelf -a /usr/pkg/bin/clang++ | grep -i rpath
 0x000000000000000f (RPATH)  Library rpath: [/usr/lib/gcc44:/usr/pkg/lib]

> ldd /usr/pkg/bin/clang++
/usr/pkg/bin/clang++:
        libpthread.so.0 => /usr/lib/libpthread.so.0 (0x802359000)
        libstdc++.so.9 => /usr/lib/gcc44/libstdc++.so.9 (0x802570000)
        libm.so.3 => /usr/lib/libm.so.3 (0x802884000)
        libc.so.7 => /usr/lib/libc.so.7 (0x802aa3000)

The result is that clang tries to use system gcc libstd++ which doesn't end 
well.
>How-To-Repeat:
Build clang on any compiler that automatically inserts a base runpath.  Perhaps 
DragonFly is unique here.

>Fix:
Clang needs to build itself, and it needs to specify it's own libstd++ inside 
the build directory rather than relying on system libstdc++.  



Home | Main Index | Thread Index | Old Index