libtool-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] disable de-duplication of postdeps on Solaris


From: Bob Friesenhahn
Subject: Re: [PATCH] disable de-duplication of postdeps on Solaris
Date: Mon, 30 Jul 2012 08:49:17 -0500 (CDT)
User-agent: Alpine 2.01 (GSO 1266 2009-07-14)

On Mon, 30 Jul 2012, Fabian Groffen wrote:

Unfortunately, this fix is not working for me (not fixing issue I
already encountered).  I do see libtool's exceptions test pass (for a
32-bit build) , but it does not work for my own C++ application as a
64-bit build.  It seems that GCC itself is causing the harm (or is
just plain not working).  With no specific request for any of these
libraries, this is the list of libraries that GCC 4.7.1 is passing to
collect2 while building my C++ test application:

-lstdc++ -lm -lc -lgomp -lgcc_s -lgcc -lpthread -lc -lgcc_s -lgcc

Can you be more specific here (e.g. post your compiler invocation line?)
You have gomp and pthread in here, which IMO are not standard.

Yes, but the same occurs without gomp and pthread and regardless of if the build is shared or static. I first noticed this about 6 years ago with 64-bit builds on Solaris x86. At that time, AMD64 FreeBSD had the same problem but the issue went away so something changed to fix it in FreeBSD. The problem is evident under Solaris 10 and OpenIndiana.

This is the behavior I am seeing with your patch applied under Solaris 10 with self-built GCC 4.7.1 and using the Sun linker. Based on your description of why things fail, the problem seems to be self-induced by the compiler:

Libtool link line:
/bin/bash ./libtool  --tag=CXX   --mode=link /usr/local64/bin/c++-64  
-march=native -O -g -g3 -ggdb -Wall -Winline -W -Wextra -Wno-unknown-pragmas 
-D_REENTRANT -pthreads -no-undefined -Wl,-zlazyload -L/usr/local64/lib 
-R/usr/local64/lib -L/usr/openwin/lib -R/usr/openwin/lib -L/usr/local64/lib 
-L/usr/lib -o Magick++/tests/exceptions Magick++/tests/exceptions.o 
Magick++/lib/libGraphicsMagick++.la
libtool: link: /usr/local64/bin/c++-64 -march=native -O -g -g3 -ggdb -Wall 
-Winline -W -Wextra -Wno-unknown-pragmas -D_REENTRANT -pthreads -Wl,-zlazyload 
-o Magick++/tests/exceptions Magick++/tests/exceptions.o  -L/usr/local64/lib 
-L/usr/openwin/lib -L/usr/lib Magick++/lib/.libs/libGraphicsMagick++.a 
/home/bfriesen/build/GM-16-static-64bit/magick/.libs/libGraphicsMagick.a 
-lpthread /usr/local64/lib/liblcms2.so /usr/local64/lib/libtiff.so -lc 
/usr/local64/lib/libjbig.so /usr/local64/lib/libfreetype.so 
/usr/local64/lib/libjasper.so /usr/local64/lib/libjpeg.so 
/usr/local64/lib/libwmflite.so -lXext -lSM -lICE -lX11 -lsocket -lnsl 
/usr/local64/lib/liblzma.so -lbz2 -lxml2 -lz 
/usr/local/lib/gcc/i386-pc-solaris2.10/4.7.1/amd64/libgomp.so -lrt 
/usr/local/lib/gcc/i386-pc-solaris2.10/4.7.1/amd64/libstdc++.so -lm -fopenmp 
-pthreads -Wl,-R -Wl,/usr/local64/lib -Wl,-R 
-Wl,/usr/local/lib/gcc/i386-pc-solaris2.10/4.7.1/amd64 -Wl,-R 
-Wl,/usr/local64/lib -Wl,-R -Wl,/usr/local/lib/gcc/i386-pc-!
solaris2.10/4.7.1/amd64 -Wl,-R -Wl,/usr/openwin/lib
ld: warning: file 
/usr/local/lib/gcc/i386-pc-solaris2.10/4.7.1/amd64/libstdc++.so: attempted 
multiple inclusion of file
ld: warning: file 
/usr/local/lib/gcc/i386-pc-solaris2.10/4.7.1/amd64/libgomp.so: attempted 
multiple inclusion of file

Verbose linker output
/usr/local64/bin/c++-64 -v -march=native -O -g -g3 -ggdb -Wall -Winline -W 
-Wextra -Wno-unknown-pragmas -D_REENTRANT -pthreads -Wl,-zlazyload -o 
Magick++/tests/exceptions Magick++/tests/exceptions.o  -L/usr/local64/lib 
-L/usr/openwin/lib -L/usr/lib Magick++/lib/.libs/libGraphicsMagick++.a 
/home/bfriesen/build/GM-16-static-64bit/magick/.libs/libGraphicsMagick.a 
-lpthread /usr/local64/lib/liblcms2.so /usr/local64/lib/libtiff.so -lc 
/usr/local64/lib/libjbig.so /usr/local64/lib/libfreetype.so 
/usr/local64/lib/libjasper.so /usr/local64/lib/libjpeg.so 
/usr/local64/lib/libwmflite.so -lXext -lSM -lICE -lX11 -lsocket -lnsl 
/usr/local64/lib/liblzma.so -lbz2 -lxml2 -lz 
/usr/local/lib/gcc/i386-pc-solaris2.10/4.7.1/amd64/libgomp.so -lrt 
/usr/local/lib/gcc/i386-pc-solaris2.10/4.7.1/amd64/libstdc++.so -lm -fopenmp 
-pthreads -Wl,-R -Wl,/usr/local64/lib -Wl,-R 
-Wl,/usr/local/lib/gcc/i386-pc-solaris2.10/4.7.1/amd64 -Wl,-R 
-Wl,/usr/local64/lib -Wl,-R -Wl,/usr/local/lib/gcc/i386-pc-solaris2.10/!
4.7.1/amd64 -Wl,-R -Wl,/usr/openwin/lib
Using built-in specs.
COLLECT_GCC=c++
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/i386-pc-solaris2.10/4.7.1/lto-wrapper
Target: i386-pc-solaris2.10
Configured with: /home/bfriesen/src/gnu/gcc-4.7.1/configure 
LDFLAGS='-L/usr/local/lib -R/usr/local/lib' --program-suffix=-4.7.1 
--enable-shared --enable-threads --enable-version-specific-runtime-libs 
--with-gnu-as --with-as=/usr/local/lib/binutils-2.22/bin/as --without-gnu-ld 
--with-ld=/usr/ccs/bin/ld --with-gmp=/usr/local --with-mpfr=/usr/local 
--with-mpc=/usr/local --with-ppl=/usr/local --with-cloog=/usr/local 
--with-cpu=opteron --enable-languages=c,c++,fortran
Thread model: posix
gcc version 4.7.1 (GCC)
COMPILER_PATH=/usr/local/libexec/gcc/i386-pc-solaris2.10/4.7.1/:/usr/local/libexec/gcc/i386-pc-solaris2.10/4.7.1/:/usr/local/libexec/gcc/i386-pc-solaris2.10/:/usr/local/lib/gcc/i386-pc-solaris2.10/4.7.1/:/usr/local/lib/gcc/i386-pc-solaris2.10/:/usr/ccs/bin/
LIBRARY_PATH=/usr/local/lib/gcc/i386-pc-solaris2.10/4.7.1/amd64/:/usr/local/lib/gcc/i386-pc-solaris2.10/4.7.1/../../../amd64/:/lib/amd64/:/usr/lib/amd64/:/usr/local/lib/gcc/i386-pc-solaris2.10/4.7.1/:/usr/local/lib/gcc/i386-pc-solaris2.10/4.7.1/../../../:/lib/:/usr/lib/
Reading specs from 
/usr/local/lib/gcc/i386-pc-solaris2.10/4.7.1/amd64/libgomp.spec
COLLECT_GCC_OPTIONS='-m64' '-march=opteron' '-v' '-march=native' '-O' '-g' 
'-g3' '-ggdb' '-Wall' '-Winline' '-Wextra' '-Wno-unknown-pragmas' '-D' 
'_REENTRANT' '-pthreads' '-o' 'Magick++/tests/exceptions' '-L/usr/local64/lib' 
'-L/usr/openwin/lib' '-L/usr/lib' '-fopenmp' '-pthreads' '-shared-libgcc' 
'-pthread'
 /usr/local/libexec/gcc/i386-pc-solaris2.10/4.7.1/collect2 -V -Y 
P,/lib/amd64:/usr/lib/amd64 -Qy -o Magick++/tests/exceptions 
/usr/lib/amd64/crt1.o /usr/lib/amd64/crti.o /usr/lib/amd64/values-Xa.o 
/usr/local/lib/gcc/i386-pc-solaris2.10/4.7.1/amd64/crtbegin.o 
-L/usr/local64/lib -L/usr/openwin/lib -L/usr/lib 
-L/usr/local/lib/gcc/i386-pc-solaris2.10/4.7.1/amd64 
-L/usr/local/lib/gcc/i386-pc-solaris2.10/4.7.1/../../../amd64 -L/lib/amd64 
-L/usr/lib/amd64 -L/usr/local/lib/gcc/i386-pc-solaris2.10/4.7.1 
-L/usr/local/lib/gcc/i386-pc-solaris2.10/4.7.1/../../.. -zlazyload 
Magick++/tests/exceptions.o Magick++/lib/.libs/libGraphicsMagick++.a 
/home/bfriesen/build/GM-16-static-64bit/magick/.libs/libGraphicsMagick.a 
-lpthread /usr/local64/lib/liblcms2.so /usr/local64/lib/libtiff.so 
/usr/local64/lib/libjbig.so /usr/local64/lib/libfreetype.so 
/usr/local64/lib/libjasper.so /usr/local64/lib/libjpeg.so 
/usr/local64/lib/libwmflite.so -lXext -lSM -lICE -lX11 -lsocket -lnsl 
/usr/local64/lib/liblzma!
.so -lbz2 -lxml2 -lz 
/usr/local/lib/gcc/i386-pc-solaris2.10/4.7.1/amd64/libgomp.so -lrt 
/usr/local/lib/gcc/i386-pc-solaris2.10/4.7.1/amd64/libstdc++.so -R 
/usr/local64/lib -R /usr/local/lib/gcc/i386-pc-solaris2.10/4.7.1/amd64 -R 
/usr/local64/lib -R /usr/local/lib/gcc/i386-pc-solaris2.10/4.7.1/amd64 -R 
/usr/openwin/lib -lstdc++ -lm -lc -lgomp -lgcc_s -lgcc -lpthread -lc -lgcc_s 
-lgcc /usr/local/lib/gcc/i386-pc-solaris2.10/4.7.1/amd64/crtend.o 
/usr/lib/amd64/crtn.o
ld: Software Generation Utilities - Solaris Link Editors: 5.10-1.1507
ld: warning: file 
/usr/local/lib/gcc/i386-pc-solaris2.10/4.7.1/amd64/libstdc++.so: attempted 
multiple inclusion of file
ld: warning: file 
/usr/local/lib/gcc/i386-pc-solaris2.10/4.7.1/amd64/libgomp.so: attempted 
multiple inclusion of file

--
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]