public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/42756] New: Build fails if gold is used as linker and some libraries reside is /usr/local/lib
@ 2010-01-15 11:06 aanisimov at inbox dot ru
2010-01-15 14:46 ` [Bug other/42756] " d dot g dot gorbachev at gmail dot com
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: aanisimov at inbox dot ru @ 2010-01-15 11:06 UTC (permalink / raw)
To: gcc-bugs
I have PPL and CLooG installed in /usr/local/lib.
The configure script finds these two libraries and generates makefiles that
link with them simply by adding -lppl_c -lppl -lcloog. For example,
i686-slackware-linux-gcc -g -fkeep-inline-functions -DIN_GCC -W -Wall
-Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
-Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros
-Wno-overlength-strings -Wold-style-definition -Wc++-compat -DHAVE_CONFIG_H
-o cc1-dummy c-lang.o stub-objc.o attribs.o c-errors.o c-lex.o c-pragma.o
c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-opts.o c-format.o
c-semantics.o c-ppoutput.o c-cppbuiltin.o c-objc-common.o c-dump.o c-pch.o
c-parser.o i386-c.o c-gimplify.o tree-mudflap.o c-pretty-print.o c-omp.o \
dummy-checksum.o main.o libbackend.a ../libcpp/libcpp.a
../libdecnumber/libdecnumber.a ../libcpp/libcpp.a ../libiberty/libiberty.a
../libdecnumber/libdecnumber.a -lcloog -lppl_c -lppl -lgmpxx
-L/home/artem/testing/gcc-build/./gmp/.libs
-L/home/artem/testing/gcc-build/./mpfr/.libs -lmpc -lmpfr -lgmp -rdynamic -ldl
-lz -lelf
This works well when GNU ld is used, because it can be taught to look for
libraries in /usr/local/bin by editing /etc/ld.so.conf.
However, GNU gold doesn't have such an option and requires that all library
paths be passed in the command line explicitly (at least a brief look at
options.cc shows no other way to specify additional library paths).
The program can be partially resolved by saying LDFLAGS=-L/usr/local/lib
../gcc/configure ......, which makes stage1 compiler to build successfully.
However, building stage2 compiler fails because -L/usr/local/lib does not get
added to the command line during compilation of stage2.
I used the following options to configure GCC:
../gcc/configure --prefix=/usr/local/gcc-current
--libdir=/usr/local/gcc-current/lib --enable-shared --enable-bootstrap
--enable-languages=c,c++ --enable-threads=posix --enable-checking=release
--with-system-zlib --disable-libunwind-exceptions --enable-__cxa_atexit
--enable-libssp --enable-gold --enable-lto --verbose --with-arch=i686
--target=i686-slackware-linux --build=i686-slackware-linux
--host=i686-slackware-linux
--
Summary: Build fails if gold is used as linker and some libraries
reside is /usr/local/lib
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: other
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: aanisimov at inbox dot ru
GCC build triplet: i686-slackware-linux
GCC host triplet: i686-slackware-linux
GCC target triplet: i686-slackware-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42756
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug other/42756] Build fails if gold is used as linker and some libraries reside is /usr/local/lib
2010-01-15 11:06 [Bug other/42756] New: Build fails if gold is used as linker and some libraries reside is /usr/local/lib aanisimov at inbox dot ru
@ 2010-01-15 14:46 ` d dot g dot gorbachev at gmail dot com
2010-01-15 14:58 ` d dot g dot gorbachev at gmail dot com
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: d dot g dot gorbachev at gmail dot com @ 2010-01-15 14:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from d dot g dot gorbachev at gmail dot com 2010-01-15 14:45 -------
Try to set LIBRARY_PATH, i.e.:
export LIBRARY_PATH=/usr/local/lib
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42756
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug other/42756] Build fails if gold is used as linker and some libraries reside is /usr/local/lib
2010-01-15 11:06 [Bug other/42756] New: Build fails if gold is used as linker and some libraries reside is /usr/local/lib aanisimov at inbox dot ru
2010-01-15 14:46 ` [Bug other/42756] " d dot g dot gorbachev at gmail dot com
@ 2010-01-15 14:58 ` d dot g dot gorbachev at gmail dot com
2010-01-15 16:32 ` aanisimov at inbox dot ru
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: d dot g dot gorbachev at gmail dot com @ 2010-01-15 14:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from d dot g dot gorbachev at gmail dot com 2010-01-15 14:57 -------
Well, and LD_LIBRARY_PATH=/usr/local/lib , too.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42756
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug other/42756] Build fails if gold is used as linker and some libraries reside is /usr/local/lib
2010-01-15 11:06 [Bug other/42756] New: Build fails if gold is used as linker and some libraries reside is /usr/local/lib aanisimov at inbox dot ru
2010-01-15 14:46 ` [Bug other/42756] " d dot g dot gorbachev at gmail dot com
2010-01-15 14:58 ` d dot g dot gorbachev at gmail dot com
@ 2010-01-15 16:32 ` aanisimov at inbox dot ru
2010-01-16 17:22 ` d dot g dot gorbachev at gmail dot com
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: aanisimov at inbox dot ru @ 2010-01-15 16:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from aanisimov at inbox dot ru 2010-01-15 16:32 -------
(In reply to comment #1)
> Try to set LIBRARY_PATH, i.e.:
>
> export LIBRARY_PATH=/usr/local/lib
>
This worked much better ;-) -- stage2 finished successfully, but building
libstdc++ in stage3 failed with a bunch of
/usr/bin/ld: error: unsupported symbol binding
Trying to rerun the command to link libstdc++ with -Xlinker --debug=all to see
what's going wrong gave no result, because the error message didn't change.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42756
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug other/42756] Build fails if gold is used as linker and some libraries reside is /usr/local/lib
2010-01-15 11:06 [Bug other/42756] New: Build fails if gold is used as linker and some libraries reside is /usr/local/lib aanisimov at inbox dot ru
` (2 preceding siblings ...)
2010-01-15 16:32 ` aanisimov at inbox dot ru
@ 2010-01-16 17:22 ` d dot g dot gorbachev at gmail dot com
2010-01-24 12:12 ` aanisimov at inbox dot ru
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: d dot g dot gorbachev at gmail dot com @ 2010-01-16 17:22 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from d dot g dot gorbachev at gmail dot com 2010-01-16 17:22 -------
This looks like a bug in gold rather then in GCC.
Try the latest development version of gold <http://sourceware.org/binutils/>.
If it still fails, please file a bug report with more details at
<http://sourceware.org/bugzilla/enter_bug.cgi?product=binutils>.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42756
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug other/42756] Build fails if gold is used as linker and some libraries reside is /usr/local/lib
2010-01-15 11:06 [Bug other/42756] New: Build fails if gold is used as linker and some libraries reside is /usr/local/lib aanisimov at inbox dot ru
` (3 preceding siblings ...)
2010-01-16 17:22 ` d dot g dot gorbachev at gmail dot com
@ 2010-01-24 12:12 ` aanisimov at inbox dot ru
2010-01-29 23:42 ` d dot g dot gorbachev at gmail dot com
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: aanisimov at inbox dot ru @ 2010-01-24 12:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from aanisimov at inbox dot ru 2010-01-24 12:11 -------
(In reply to comment #4)
> This looks like a bug in gold rather then in GCC.
>
> Try the latest development version of gold <http://sourceware.org/binutils/>.
> If it still fails, please file a bug report with more details at
> <http://sourceware.org/bugzilla/enter_bug.cgi?product=binutils>.
>
GCC builds successfully with gold from binutils 2.20.51.
However, the first bug described here still remains -- in my opinion, it's
necessary that the build scripts specify all library directories explicitely.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42756
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug other/42756] Build fails if gold is used as linker and some libraries reside is /usr/local/lib
2010-01-15 11:06 [Bug other/42756] New: Build fails if gold is used as linker and some libraries reside is /usr/local/lib aanisimov at inbox dot ru
` (4 preceding siblings ...)
2010-01-24 12:12 ` aanisimov at inbox dot ru
@ 2010-01-29 23:42 ` d dot g dot gorbachev at gmail dot com
2010-01-30 0:09 ` steven at gcc dot gnu dot org
2010-01-30 5:24 ` aanisimov at inbox dot ru
7 siblings, 0 replies; 9+ messages in thread
From: d dot g dot gorbachev at gmail dot com @ 2010-01-29 23:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from d dot g dot gorbachev at gmail dot com 2010-01-29 23:42 -------
> in my opinion, it's necessary that the build scripts
> specify all library directories explicitely.
Then use configure options --with-ppl / --with-ppl-include / --with-ppl-lib,
and --with-cloog / --with-cloog-include / --with-cloog-lib.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42756
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug other/42756] Build fails if gold is used as linker and some libraries reside is /usr/local/lib
2010-01-15 11:06 [Bug other/42756] New: Build fails if gold is used as linker and some libraries reside is /usr/local/lib aanisimov at inbox dot ru
` (5 preceding siblings ...)
2010-01-29 23:42 ` d dot g dot gorbachev at gmail dot com
@ 2010-01-30 0:09 ` steven at gcc dot gnu dot org
2010-01-30 5:24 ` aanisimov at inbox dot ru
7 siblings, 0 replies; 9+ messages in thread
From: steven at gcc dot gnu dot org @ 2010-01-30 0:09 UTC (permalink / raw)
To: gcc-bugs
--
steven at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2010-01-30 00:09:34
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42756
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug other/42756] Build fails if gold is used as linker and some libraries reside is /usr/local/lib
2010-01-15 11:06 [Bug other/42756] New: Build fails if gold is used as linker and some libraries reside is /usr/local/lib aanisimov at inbox dot ru
` (6 preceding siblings ...)
2010-01-30 0:09 ` steven at gcc dot gnu dot org
@ 2010-01-30 5:24 ` aanisimov at inbox dot ru
7 siblings, 0 replies; 9+ messages in thread
From: aanisimov at inbox dot ru @ 2010-01-30 5:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from aanisimov at inbox dot ru 2010-01-30 05:24 -------
(In reply to comment #6)
> > in my opinion, it's necessary that the build scripts
> > specify all library directories explicitely.
>
> Then use configure options --with-ppl / --with-ppl-include / --with-ppl-lib,
> and --with-cloog / --with-cloog-include / --with-cloog-lib.
>
I do not quite agree with you -- these options are supposed to be used when
ppl/cloog are installed in a location that only I know of. With /usr/local/lib
the situation is different -- the configure script knows about this dir and
must also teach the linker about it. Not passing /usr/local/lib in the explicit
libraries path means relying on GNU ld's behaviour.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42756
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2010-01-30 5:24 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-15 11:06 [Bug other/42756] New: Build fails if gold is used as linker and some libraries reside is /usr/local/lib aanisimov at inbox dot ru
2010-01-15 14:46 ` [Bug other/42756] " d dot g dot gorbachev at gmail dot com
2010-01-15 14:58 ` d dot g dot gorbachev at gmail dot com
2010-01-15 16:32 ` aanisimov at inbox dot ru
2010-01-16 17:22 ` d dot g dot gorbachev at gmail dot com
2010-01-24 12:12 ` aanisimov at inbox dot ru
2010-01-29 23:42 ` d dot g dot gorbachev at gmail dot com
2010-01-30 0:09 ` steven at gcc dot gnu dot org
2010-01-30 5:24 ` aanisimov at inbox dot ru
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).