From owner-freebsd-ports@FreeBSD.ORG Wed Dec 17 01:17:28 2014 Return-Path: Delivered-To: ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6FA4CA4A for ; Wed, 17 Dec 2014 01:17:28 +0000 (UTC) Received: from gw.catspoiler.org (cl-1657.chi-02.us.sixxs.net [IPv6:2001:4978:f:678::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F0408E50 for ; Wed, 17 Dec 2014 01:17:27 +0000 (UTC) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.3/8.13.3) with ESMTP id sBH1HIhg054021 for ; Tue, 16 Dec 2014 17:17:22 -0800 (PST) (envelope-from truckman@FreeBSD.org) Message-Id: <201412170117.sBH1HIhg054021@gw.catspoiler.org> Date: Tue, 16 Dec 2014 17:17:18 -0800 (PST) From: Don Lewis Subject: pkgconf and /usr/local/lib/gcc48/libstdc++.so To: ports@FreeBSD.org MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Dec 2014 01:17:28 -0000 I'm trying to get x11-fm/sushi and mail/evolution to build on FreeBSD 8. I've applied the patch from to build www/webkit-gtk3 with gcc and libstdc++ from ports. When I try to build either sushi or evolution, I get errors like this: GISCAN Sushi-1.0.gir /usr/local/lib/libwebkitgtk-3.0.so: undefined reference to `_ZSt25__throw_bad_function_callv@GLIBCXX_3.4.14' /usr/local/lib/libwebkitgtk-3.0.so: undefined reference to `_ZNSt18condition_variable4waitERSt11unique_lockISt5mutexE@GLIBCXX_3.4.11' /usr/local/lib/libjavascriptcoregtk-3.0.so: undefined reference to `_ZNSt6chrono3_V212system_clock3nowEv@GLIBCXX_3.4.19' /usr/local/lib/libwebkitgtk-3.0.so: undefined reference to `_ZSt15__once_callable@GLIBCXX_3.4.11' /usr/local/lib/libwebkitgtk-3.0.so: undefined reference to `_ZNSt8__detail15_List_node_base7_M_hookEPS0_@GLIBCXX_3.4.15' /usr/local/lib/libwebkitgtk-3.0.so: undefined reference to `_ZSt11__once_call@GLIBCXX_3.4.11' /usr/local/lib/libwebkitgtk-3.0.so: undefined reference to `_ZNSt18condition_variableD1Ev@GLIBCXX_3.4.11' /usr/local/lib/libwebkitgtk-3.0.so: undefined reference to `_ZSt20__throw_system_errori@GLIBCXX_3.4.11' /usr/local/lib/libwebkitgtk-3.0.so: undefined reference to `_ZNSt18condition_variable10notify_oneEv@GLIBCXX_3.4.11' /usr/local/lib/libwebkitgtk-3.0.so: undefined reference to `_ZNSt18condition_variableC1Ev@GLIBCXX_3.4.11' /usr/local/lib/libjavascriptcoregtk-3.0.so: undefined reference to `_ZNSt18condition_variable10notify_allEv@GLIBCXX_3.4.11' /usr/local/lib/libwebkitgtk-3.0.so: undefined reference to `_ZNSt6chrono3_V212steady_clock3nowEv@GLIBCXX_3.4.19' /usr/local/lib/libwebkitgtk-3.0.so: undefined reference to `__once_proxy@GLIBCXX_3.4.11' Makefile:672: recipe for target 'sushi-start' failed My suspicion is that this is caused by using binutils from base instead of the newer version from ports. I tried getting around this by applying a big hammer and adding USES=compiler:c++11-lib to the Makefile and got this error: GISCAN Sushi-1.0.gir /libexec/ld-elf.so.1: /usr/lib/libstdc++.so.6: version GLIBCXX_3.4.14 required b y /usr/local/lib/libwebkitgtk-3.0.so.0 not found Command '['/wrkdirs/usr/ports/x11-fm/sushi/work/sushi-3.12.0/src/tmp-introspectj KttWB/Sushi-1.0', '--introspect-dump=/wrkdirs/usr/ports/x11-fm/sushi/work/sushi- 3.12.0/src/tmp-introspectjKttWB/functions.txt,/wrkdirs/usr/ports/x11-fm/sushi/wo rk/sushi-3.12.0/src/tmp-introspectjKttWB/dump.xml']' returned non-zero exit stat us 1 /usr/local/share/gobject-introspection-1.0/Makefile.introspection:153: recipe fo r target 'Sushi-1.0.gir' failed gmake[2]: *** [Sushi-1.0.gir] Error 1 The problem now appears to be that the older version of libstdc++ from base is being used instead of the newer version from the gcc port. That his happening because -L/usr/local/lib/gcc48 is not present in the linker flags. The proper value of LDFLAGS is getting passed to configure via CONFIGURE_ENV. From config.log: ac_cv_env_LDFLAGS_set=set ac_cv_env_LDFLAGS_value=' -L/usr/local/lib -Wl,-rpath=/usr/local/lib/gcc48 -L/us r/local/lib/gcc48' Unfortunately configure ends up ignoring it and using pkgconf to generate the linker command line: pkg_cv_SUSHI_LIBS='-lfreetype -lgirepository-1.0 -lgjs -lclutter-gtk-1.0 -lclutt er-gst-2.0 -lclutter-1.0 -lcogl-path -lcogl-pango -lcogl -lgmodule-2.0 -lEGL -lX randr -ljson-glib-1.0 -lX11 -lXext -lXdamage -lXfixes -lXcomposite -lXi -lgstbas e-1.0 -lgstpbutils-1.0 -lgsttag-1.0 -lgstreamer-1.0 -lmusicbrainz5 -levview3 -le vdocument3 -lgthread-2.0 -lgtksourceview-3.0 -lwebkitgtk-3.0 -lgtk-3 -lgdk-3 -lp angocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -pthread -lgdk_pixbu f-2.0 -lsoup-2.4 -lgio-2.0 -lgobject-2.0 -ljavascriptcoregtk-3.0 -L/usr/local/li b -lglib-2.0 -lintl ' SUSHI_LIBS='-lfreetype -lgirepository-1.0 -lgjs -lclutter-gtk-1.0 -lclutter-gst- 2.0 -lclutter-1.0 -lcogl-path -lcogl-pango -lcogl -lgmodule-2.0 -lEGL -lXrandr - ljson-glib-1.0 -lX11 -lXext -lXdamage -lXfixes -lXcomposite -lXi -lgstbase-1.0 - lgstpbutils-1.0 -lgsttag-1.0 -lgstreamer-1.0 -lmusicbrainz5 -levview3 -levdocume nt3 -lgthread-2.0 -lgtksourceview-3.0 -lwebkitgtk-3.0 -lgtk-3 -lgdk-3 -lpangocai ro-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -pthread -lgdk_pixbuf-2.0 - lsoup-2.4 -lgio-2.0 -lgobject-2.0 -ljavascriptcoregtk-3.0 -L/usr/local/lib -lgli b-2.0 -lintl ' What is the proper way to fix this? Should the .pc file for webkit-gtk3 record the extra library path because it was compiled with gcc from ports? Should configure concatenate the value of $LDFLAGS with the output of pkgconf?