From owner-freebsd-ports@FreeBSD.ORG Fri Jul 4 21:13:03 2008 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 013C41065773 for ; Fri, 4 Jul 2008 21:13:03 +0000 (UTC) (envelope-from amdmi3@amdmi3.ru) Received: from smtp.timeweb.ru (smtp.timeweb.ru [92.53.96.3]) by mx1.freebsd.org (Postfix) with ESMTP id 754418FC17 for ; Fri, 4 Jul 2008 21:13:02 +0000 (UTC) (envelope-from amdmi3@amdmi3.ru) Received: from [213.148.20.85] (helo=hive.panopticon) by smtp.timeweb.ru with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1KEsaS-0002ZO-F3; Sat, 05 Jul 2008 01:13:00 +0400 Received: from hades.panopticon (hades.panopticon [192.168.0.32]) by hive.panopticon (Postfix) with ESMTP id ED4F5939D; Sat, 5 Jul 2008 01:11:24 +0400 (MSD) Received: by hades.panopticon (Postfix, from userid 1000) id DB0A417030; Sat, 5 Jul 2008 01:13:11 +0400 (MSD) Date: Sat, 5 Jul 2008 01:13:11 +0400 From: Dmitry Marakasov To: freebsd-ports@freebsd.org Message-ID: <20080704211311.GA14157@hades.panopticon> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Mutt/1.5.18 (2008-05-17) Cc: lx@FreeBSD.org, gerald@FreeBSD.org, ade@FreeBSD.org Subject: non-system gcc + libtool + -L/usr/lib complex problem X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jul 2008 21:13:03 -0000 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, std::allocat= or, std::basic_string, std::allocator > const&>(std::basic_string, std::allocato= r > const&, boost::io::detail::format_item, std::allocator > const&, boost::basic_format, std::allocator >::string_type&, boost::basic_format, std::allocator >::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 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