Date: Tue, 16 Dec 2014 17:17:18 -0800 (PST) From: Don Lewis <truckman@FreeBSD.org> To: ports@FreeBSD.org Subject: pkgconf and /usr/local/lib/gcc48/libstdc++.so Message-ID: <201412170117.sBH1HIhg054021@gw.catspoiler.org>
next in thread | raw e-mail | index | archive | help
I'm trying to get x11-fm/sushi and mail/evolution to build on FreeBSD 8. I've applied the patch from <https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196031> 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?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201412170117.sBH1HIhg054021>