public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/35197] New: Native linker can't locate file for -lstdc++ with --enable-version-specific-runtime-libs
@ 2008-02-14 18:11 skunk at iskunk dot org
2008-02-15 7:28 ` [Bug libstdc++/35197] " Ralf dot Wildenhues at gmx dot de
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: skunk at iskunk dot org @ 2008-02-14 18:11 UTC (permalink / raw)
To: gcc-bugs
I have a build of GCC 4.2.3 compiled with
--enable-version-specific-runtime-libs. It fails to link a trivial C++ program,
because the (non-GNU) linker does not know about libstdc++, and the GCC
frontend is not passing an appropriate -L... flag to the linker so that it can
find the library.
$ g++ -o hello hello.cxx
/usr/bin/ld:
Can't locate file for: -lstdc++
collect2: ld returned 1 exit status
$ g++ -v -o hello hello.cxx
[superfluous verbiage elided]
mips-tfile (GCC) 4.2.3
/opt/tg/bin/../libexec/gcc/alphaev56-dec-osf4.0g/4.2.3/collect2 -G 8 -O1 -S
-call_shared -o hello /usr/lib/cmplrs/cc/crt0.o
-L/opt/tg/bin/../lib/gcc/alphaev56-dec-osf4.0g/4.2.3 -L/opt/tg/bin/../lib/gcc
-L/opt/tg/lib/gcc/alphaev56-dec-osf4.0g/4.2.3 -L/usr/lib/cmplrs/cc
-L/opt/tg/bin/../lib/gcc/alphaev56-dec-osf4.0g/4.2.3/../../..
-L/opt/tg/lib/gcc/alphaev56-dec-osf4.0g/4.2.3/../../.. /tmp//ccu9eHi9.o
-lstdc++ -lm -lgcc -lc -lgcc
/usr/bin/ld:
Can't locate file for: -lstdc++
collect2: ld returned 1 exit status
(I notice that libstdc++ is present immediately under
/opt/tg/lib/gcc/alphaev56-dec-osf4.0g/, which the -L... flags narrowly miss.)
--
Summary: Native linker can't locate file for -lstdc++ with --
enable-version-specific-runtime-libs
Product: gcc
Version: 4.2.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: skunk at iskunk dot org
GCC build triplet: alphaev56-dec-osf4.0g
GCC host triplet: alphaev56-dec-osf4.0g
GCC target triplet: alphaev56-dec-osf4.0g
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35197
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libstdc++/35197] Native linker can't locate file for -lstdc++ with --enable-version-specific-runtime-libs
2008-02-14 18:11 [Bug libstdc++/35197] New: Native linker can't locate file for -lstdc++ with --enable-version-specific-runtime-libs skunk at iskunk dot org
@ 2008-02-15 7:28 ` Ralf dot Wildenhues at gmx dot de
2008-02-15 7:53 ` skunk at iskunk dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Ralf dot Wildenhues at gmx dot de @ 2008-02-15 7:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from Ralf dot Wildenhues at gmx dot de 2008-02-15 07:28 -------
> $ g++ -v -o hello hello.cxx
> [superfluous verbiage elided]
Please don't elide that. It shows how exactly you configured GCC, so please
show that.
--
Ralf dot Wildenhues at gmx dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |Ralf dot Wildenhues at gmx
| |dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35197
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libstdc++/35197] Native linker can't locate file for -lstdc++ with --enable-version-specific-runtime-libs
2008-02-14 18:11 [Bug libstdc++/35197] New: Native linker can't locate file for -lstdc++ with --enable-version-specific-runtime-libs skunk at iskunk dot org
2008-02-15 7:28 ` [Bug libstdc++/35197] " Ralf dot Wildenhues at gmx dot de
@ 2008-02-15 7:53 ` skunk at iskunk dot org
2008-02-15 15:31 ` Ralf dot Wildenhues at gmx dot de
2008-02-16 18:43 ` skunk at iskunk dot org
3 siblings, 0 replies; 5+ messages in thread
From: skunk at iskunk dot org @ 2008-02-15 7:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from skunk at iskunk dot org 2008-02-15 07:53 -------
Not-so-superfluous verbiage restored:
$ g++ -v -o hello hello.cxx
Using built-in specs.
Target: alphaev56-dec-osf4.0g
Configured with: /tg/freeport/src/gcc/gcc--4.2.3/configure --prefix=/opt/tg
--disable-dependency-tracking --disable-maintainer-mode --disable-shared
--disable-nls --enable-languages=c,c++ --enable-version-specific-runtime-libs
--with-pic
Thread model: posix
gcc version 4.2.3
/opt/tg/bin/../libexec/gcc/alphaev56-dec-osf4.0g/4.2.3/cc1plus -quiet -v
-iprefix /opt/tg/bin/../lib/gcc/alphaev56-dec-osf4.0g/4.2.3/ hello.cxx -quiet
-dumpbase hello.cxx -mcpu=ev56 -auxbase hello -version -o /tmp//ccd6P9Gc.s
ignoring nonexistent directory
"/opt/tg/bin/../lib/gcc/alphaev56-dec-osf4.0g/4.2.3/../../../../alphaev56-dec-osf4.0g/include"
ignoring duplicate directory
"/opt/tg/lib/gcc/alphaev56-dec-osf4.0g/4.2.3/include/c++"
ignoring duplicate directory
"/opt/tg/lib/gcc/alphaev56-dec-osf4.0g/4.2.3/include/c++/alphaev56-dec-osf4.0g"
ignoring duplicate directory
"/opt/tg/lib/gcc/alphaev56-dec-osf4.0g/4.2.3/include/c++/backward"
ignoring nonexistent directory
"/opt/tg/lib/gcc/alphaev56-dec-osf4.0g/4.2.3/../../../../alphaev56-dec-osf4.0g/include"
#include "..." search starts here:
#include <...> search starts here:
/opt/tg/bin/../lib/gcc/alphaev56-dec-osf4.0g/4.2.3/include/c++
/opt/tg/bin/../lib/gcc/alphaev56-dec-osf4.0g/4.2.3/include/c++/alphaev56-dec-osf4.0g
/opt/tg/bin/../lib/gcc/alphaev56-dec-osf4.0g/4.2.3/include/c++/backward
/opt/tg/bin/../lib/gcc/alphaev56-dec-osf4.0g/4.2.3/include
/usr/local/include
/opt/tg/include
/opt/tg/lib/gcc/alphaev56-dec-osf4.0g/4.2.3/include
/usr/include
End of search list.
GNU C++ version 4.2.3 (alphaev56-dec-osf4.0g)
compiled by GNU C version 4.2.3.
GGC heuristics: --param ggc-min-expand=65 --param ggc-min-heapsize=65536
Compiler executable checksum: 19341a267fc991710d8c03ed2d8f4731
as -g -nocpp -O0 -o /tmp//cc9AP5DF.o /tmp//ccd6P9Gc.s
/opt/tg/bin/../libexec/gcc/alphaev56-dec-osf4.0g/4.2.3/mips-tfile -v -o
/tmp//cc9AP5DF.o /tmp//ccd6P9Gc.s
mips-tfile (GCC) 4.2.3
/opt/tg/bin/../libexec/gcc/alphaev56-dec-osf4.0g/4.2.3/collect2 -G 8 -O1 -S
-call_shared -o hello /usr/lib/cmplrs/cc/crt0.o
-L/opt/tg/bin/../lib/gcc/alphaev56-dec-osf4.0g/4.2.3 -L/opt/tg/bin/../lib/gcc
-L/opt/tg/lib/gcc/alphaev56-dec-osf4.0g/4.2.3 -L/usr/lib/cmplrs/cc
-L/opt/tg/bin/../lib/gcc/alphaev56-dec-osf4.0g/4.2.3/../../..
-L/opt/tg/lib/gcc/alphaev56-dec-osf4.0g/4.2.3/../../.. /tmp//cc9AP5DF.o
-lstdc++ -lm -lgcc -lc -lgcc
/usr/bin/ld:
Can't locate file for: -lstdc++
collect2: ld returned 1 exit status
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35197
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libstdc++/35197] Native linker can't locate file for -lstdc++ with --enable-version-specific-runtime-libs
2008-02-14 18:11 [Bug libstdc++/35197] New: Native linker can't locate file for -lstdc++ with --enable-version-specific-runtime-libs skunk at iskunk dot org
2008-02-15 7:28 ` [Bug libstdc++/35197] " Ralf dot Wildenhues at gmx dot de
2008-02-15 7:53 ` skunk at iskunk dot org
@ 2008-02-15 15:31 ` Ralf dot Wildenhues at gmx dot de
2008-02-16 18:43 ` skunk at iskunk dot org
3 siblings, 0 replies; 5+ messages in thread
From: Ralf dot Wildenhues at gmx dot de @ 2008-02-15 15:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from Ralf dot Wildenhues at gmx dot de 2008-02-15 15:30 -------
OK. Well, libstdc++ should not be present in
/opt/tg/lib/gcc/alphaev56-dec-osf4.0g
but instead in
/opt/tg/lib/gcc/alphaev56-dec-osf4.0g/4.2.3
Do you still have the build tree or a build log? If the former, could you
please look up the value of glibcxx_toolexeclibdir in
alphaev56-dec-osf4.0g/libstdc++-v3/src/Makefile
to find out why it's not being installed there?
I should note that I'm seeing a related problem on x86_64-unknown-linux-gnu
with --enable-version-specific-runtime-libs not finding -lgcc_s which is in
$libdir/gcc/x86_64-unknown-linux-gnu/lib64. But I think that is a separate
bug (and I will open a PR for it later).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35197
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libstdc++/35197] Native linker can't locate file for -lstdc++ with --enable-version-specific-runtime-libs
2008-02-14 18:11 [Bug libstdc++/35197] New: Native linker can't locate file for -lstdc++ with --enable-version-specific-runtime-libs skunk at iskunk dot org
` (2 preceding siblings ...)
2008-02-15 15:31 ` Ralf dot Wildenhues at gmx dot de
@ 2008-02-16 18:43 ` skunk at iskunk dot org
3 siblings, 0 replies; 5+ messages in thread
From: skunk at iskunk dot org @ 2008-02-16 18:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from skunk at iskunk dot org 2008-02-16 18:42 -------
Argh... now I see what's going on here.
$ grep glibcxx_toolexeclibdir.= alphaev56-dec-osf4.0g/libstdc++-v3/src/Makefile
glibcxx_toolexeclibdir = ${toolexecdir}/${gcc_version}$(MULTISUBDIR)
$ grep gcc_version.:= alphaev56-dec-osf4.0g/libstdc++-v3/src/Makefile
gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
This is another manifestation of bug #35199. I'll update my patch to cover this
instance of $(shell cat /path/to/BASE-VER), and any others in the tree.
Sorry for the trouble, gentlemen.
*** This bug has been marked as a duplicate of 35199 ***
--
skunk at iskunk dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35197
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-02-16 18:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-14 18:11 [Bug libstdc++/35197] New: Native linker can't locate file for -lstdc++ with --enable-version-specific-runtime-libs skunk at iskunk dot org
2008-02-15 7:28 ` [Bug libstdc++/35197] " Ralf dot Wildenhues at gmx dot de
2008-02-15 7:53 ` skunk at iskunk dot org
2008-02-15 15:31 ` Ralf dot Wildenhues at gmx dot de
2008-02-16 18:43 ` skunk at iskunk dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).