Date: Sat, 5 Jul 2008 01:13:11 +0400 From: Dmitry Marakasov <amdmi3@amdmi3.ru> To: freebsd-ports@freebsd.org Cc: lx@FreeBSD.org, gerald@FreeBSD.org, ade@FreeBSD.org Subject: non-system gcc + libtool + -L/usr/lib complex problem Message-ID: <20080704211311.GA14157@hades.panopticon>
next in thread | raw e-mail | index | archive | help
Hi! I'm investigating complex build problem of my graphics/gnash port. The problem is that graphics/gnash doesn't build on FreeBSD 6.3 if=20 ftp/curl (which it depends on) is built with LIBSSH2 support :) The cause is as follows: 1) # cat /usr/local/lib/libssh2.la | grep depende dependency_libs=3D' -L/usr/lib -lcrypto -lz' as you can see, there's -L/usr/lib in there.=20 2) This causes -L/usr/lib to be added to libcurl.la as well 3) graphics/gnash has USE_GCC=3D4.2+. That's why gcc42 is used on 6.3 instead of default 3.4. But! libtool adds -L/usr/lib from libcurl.la to linkflags, so gcc42 tries to use libstdc++.so from /usr/lib instead of /usr/local/lib/gcc-4.2.4!! This leads to many libstdc++ - related linkage errors: -- /bin/sh ../libtool --tag=3DCXX --mode=3Dlink g++42 -O2 -fno-strict-alias= ing -pipe -march=3Dnocona -pthread -D_THREAD_SAFE -pthread -W -Wall= -Wcast-align -Wcast-qual -Wpointer-arith -Wreturn-type = -fvisibility-inlines-hidden -export-dynamic -lltdl -L/usr/local/lib -lx= ml2 -lz -L/usr/local/lib -liconv -lm -L/usr/local/lib -lcurl -L/usr/local/l= ib -lboost_thread -lboost_date_time -lpthread /usr/local/lib/libintl.so /us= r/local/lib/libiconv.so -Wl,-rpath -Wl,/usr/local/lib -L/usr/local/lib -Wl= ,--as-needed -o gprocessor gprocessor-processor.o ../server/libgnashserver.= la ../libamf/libgnashamf.la ../libnet/libgnashnet.la ../libbase/libgnashbas= e.la ../libmedia/libgnashmedia.la -lavcodec -lz -la52 -lfaad -lx264 -ltheo= ra -lvorbisenc -lavutil -lvorbis -lm -logg -lvorbisenc -lvorbis -lm -logg= -lavformat -lavcodec -lz -la52 -lfaad -lx264 -ltheora -lvorbisenc -lavut= il -lvorbis -lm -logg -lavutil -ltheora -logg -lavcodec -lz -la52 -lf= aad -lx264 -ltheora -lvorbisenc -lavutil -lvorbis -lm -logg -L/usr/local= /lib -lglib-2.0 -liconv -lX11 -lXi -lm=20 g++42 -O2 -fno-strict-aliasing -pipe -march=3Dnocona -pthread -D_THREAD_SAF= E -pthread -W -Wall -Wcast-align -Wcast-qual -Wpointer-arith -Wreturn-type = -fvisibility-inlines-hidden /usr/local/lib/libintl.so /usr/local/lib/libico= nv.so -Wl,-rpath -Wl,/usr/local/lib -Wl,--as-needed -o .libs/gprocessor gpr= ocessor-processor.o -Wl,--export-dynamic -L/usr/local/lib -L/usr/lib ../se= rver/.libs/libgnashserver.so /usr/work/usr/ports/graphics/gnash/work/gnash-= 0.8.3/libnet/.libs/libgnashnet.so /usr/work/usr/ports/graphics/gnash/work/g= nash-0.8.3/libmedia/.libs/libgnashmedia.so /usr/local/lib/libfontconfig.so = /usr/local/lib/libfreetype.so /usr/local/lib/libexpat.so ../libamf/.libs/li= bgnashamf.so ../libnet/.libs/libgnashnet.so /usr/work/usr/ports/graphics/gn= ash/work/gnash-0.8.3/libamf/.libs/libgnashamf.so /usr/work/usr/ports/graphi= cs/gnash/work/gnash-0.8.3/libbase/.libs/libgnashbase.so /usr/local/lib/libx= ml2.so ../libbase/.libs/libgnashbase.so ../libmedia/.libs/libgnashmedia.so = /usr/local/lib/libjpeg.so /usr/local/lib/libcurl.so /usr/local/lib/libssh2.= so -lssl -lcrypto /usr/local/lib/libltdl.so -lboost_thread -lboost_date_tim= e -lpthread /usr/local/lib/libSDL.so /usr/local/lib/libXrandr.so /usr/local= /lib/libXrender.so /usr/local/lib/libaa.so -lncurses -lusbhid -lavformat -l= avcodec -lz /usr/local/lib/liba52.so -ldjbfft /usr/local/lib/libfaad.so -pt= hread -lx264 /usr/local/lib/libtheora.so /usr/local/lib/libvorbisenc.so -la= vutil /usr/local/lib/libvorbis.so /usr/local/lib/libogg.so /usr/local/lib/l= ibglib-2.0.so /usr/local/lib/libintl.so /usr/local/lib/libpcre.so /usr/loca= l/lib/libiconv.so /usr/local/lib/libXi.so /usr/local/lib/libXext.so /usr/lo= cal/lib/libX11.so /usr/local/lib/libXdmcp.so -lrpcsvc /usr/local/lib/libXau= =2Eso -lm -Wl,--rpath -Wl,/usr/local/lib/gnash -Wl,--rpath -Wl,/usr/local/= lib gprocessor-processor.o(.gnu.linkonce.t._ZN5boost2io6detail3putIcSt11char_tr= aitsIcESaIcERKSsEEvT2_RKNS1_11format_itemIT_T0_T1_EERNS_12basic_formatISA_S= B_SC_E11string_typeERNSH_20internal_streambuf_tEPSt6locale+0x1d8): In funct= ion `void boost::io::detail::put<char, std::char_traits<char>, std::allocat= or<char>, std::basic_string<char, std::char_traits<char>, std::allocator<ch= ar> > const&>(std::basic_string<char, std::char_traits<char>, std::allocato= r<char> > const&, boost::io::detail::format_item<char, std::char_traits<cha= r>, std::allocator<char> > const&, boost::basic_format<char, std::char_trai= ts<char>, std::allocator<char> >::string_type&, boost::basic_format<char, s= td::char_traits<char>, std::allocator<char> >::internal_streambuf_t&, std::= locale*)': * more similar errors * -- I'm not even sure which is the culprit: - libssh2 (for using -L/usr/lib in .la) First of all, does it actually need it (for example, to explicitly not link to libcrypto from ports' openssl)? If it does, it's most likely gcc42 problem. If it does not, it should be fixed as well as other ports with the same problem (here I see /usr/lib used at least in neon and wireshark) - libtool (for adding -L/usr/lib for libssh2) - gcc42 for not searching libs in /usr/local/lib/gcc-4.2.4 before all other libdirs. Any ideas? PS. Many thanks to Andriy Gapon <avg@icyb.net.ua> for nailing it. --=20 Dmitry Marakasov . 55B5 0596 FF1E 8D84 5F56 9510 D35A 80DD F9D2 F77D amdmi3@amdmi3.ru ..: jabber: amdmi3@jabber.ru http://www.amdmi3.ru
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080704211311.GA14157>