From owner-freebsd-ports@FreeBSD.ORG Wed Mar 13 01:56:37 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B7F9BA67; Wed, 13 Mar 2013 01:56:37 +0000 (UTC) (envelope-from amdmi3@amdmi3.ru) Received: from smtp.timeweb.ru (smtp.timeweb.ru [92.53.116.15]) by mx1.freebsd.org (Postfix) with ESMTP id 67BE8899; Wed, 13 Mar 2013 01:56:37 +0000 (UTC) Received: from [213.148.20.85] (helo=hive.panopticon) by smtp.timeweb.ru with esmtpsa (TLS1.0:DHE_RSA_CAMELLIA_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1UFavj-0005QQ-72; Wed, 13 Mar 2013 05:56:35 +0400 Received: from hades.panopticon (hades.panopticon [192.168.0.32]) by hive.panopticon (Postfix) with ESMTP id 81B50B84D; Wed, 13 Mar 2013 05:56:34 +0400 (MSK) Received: by hades.panopticon (Postfix, from userid 1000) id 67613616; Wed, 13 Mar 2013 05:56:34 +0400 (MSK) Date: Wed, 13 Mar 2013 05:56:34 +0400 From: Dmitry Marakasov To: David Southwell , freebsd-ports@freebsd.org, fluffy@FreeBSD.org Subject: Re: devel/lprof-devel build fail - libvigraimpex.so undefined reference Message-ID: <20130313015634.GB93610@hades.panopticon> Mail-Followup-To: David Southwell , freebsd-ports@freebsd.org, fluffy@FreeBSD.org References: <513EFFE4.3060101@vizion2000.net> <20130312185747.GA93610@hades.panopticon> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20130312185747.GA93610@hades.panopticon> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2013 01:56:37 -0000 * Dmitry Marakasov (amdmi3@hades.panopticon) wrote: > > Errors on build: > > > > [100%] Building CXX Object src/CMakefiles/lprof.dir/qrc_lprof.o > > Linking CXX executable lprof > > /usr/lib/libvigraimpex.so: undefined reference to > > '_ZNKSt5ctypeIcE13_M_widen_initEv@GLIBCXX_3.4.11' > > *** Error code 1 > > 1 error > > *** Error Code 2 > > 1 error > > *** Error Code 2 > > 1 error > > *** Error code 1 > > > > Stop in /usr/ports/graphics/lprof-devel. > > > > Thanks in advance for any help with this > > This really is a result of us sticking with a rotten gcc in the base > system for so long. And I expect more and more similar breakages to > follow. > > Here, graphics/vigra uses gcc46 (since r307701) to build, and > combiled vigra library depends code only present in libstdc++ from > gcc46 (and not in libstdc++ in our base system). > > To compile lprof, adding USE_GCC=4.6+ to it's Makefile would be enough, > however it won't run: > > % lprof > /usr/lib/libstdc++.so.6: version GLIBCXX_3.4.11 required by /usr/local/lib/libvigraimpex.so.4 not found > > To fix that, one needs to add LD_LIBRARY_PATH=/usr/local/lib/gcc46 > into environement. The same thing will be required for all vigra > consumers. > > If gcc46 is optional for vigra, the problem may be temporary fixed by > reverting r307701 (fluffy@?), however there will be more and more > software depending on newer libstdc++, and we need a way to address that > until all supported FreeBSD releases have switched to clang and new c++ > stack. Further digging showed that vigra is built with corresponding -Wl,-rpath=/usr/local/lib/gcc46 which makes it use correct libstdc++. However, that rpath is removed by cmake on installation: -- Installing: /usr/local/lib/libvigraimpex.so.4.190 -- Installing: /usr/local/lib/libvigraimpex.so.4 -- Installing: /usr/local/lib/libvigraimpex.so -- Removed runtime path from "/usr/local/lib/libvigraimpex.so.4.190" I have a fix for that: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/176901 With it, no LD_LIBRARY_PATH will be needed, but USE_GCC=4.6+ will still be required for ALL ports which depend on graphics/vigra as long as it has USE_GCC=4.6+ itself. -- Dmitry Marakasov . 55B5 0596 FF1E 8D84 5F56 9510 D35A 80DD F9D2 F77D amdmi3@amdmi3.ru ..: jabber: amdmi3@jabber.ru http://www.amdmi3.ru