From owner-freebsd-gnome@FreeBSD.ORG Thu Jul 1 05:12:24 2010 Return-Path: Delivered-To: gnome@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9C3B1066A80 for ; Thu, 1 Jul 2010 05:12:16 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from gw.catspoiler.org (adsl-75-1-14-242.dsl.scrm01.sbcglobal.net [75.1.14.242]) by mx1.freebsd.org (Postfix) with ESMTP id 920808FC22 for ; Thu, 1 Jul 2010 05:12:16 +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 o615C6b6058761; Wed, 30 Jun 2010 22:12:10 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <201007010512.o615C6b6058761@gw.catspoiler.org> Date: Wed, 30 Jun 2010 22:12:06 -0700 (PDT) From: Don Lewis To: mezz7@cox.net MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Cc: gnome@FreeBSD.org Subject: Re: ports/148101: x11/startup-notification Makefile missing library dependencies [patch] X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2010 05:12:24 -0000 On 24 Jun, To: mezz7@cox.net wrote: > On 24 Jun, Jeremy Messenger wrote: >> On Thu, 24 Jun 2010 17:14:57 -0500, Don Lewis wrote: > > >> The startup-notification does not depend on libSM, libICE and etc. It's >> just grab from one of silly *.la or *.pc files. > > libSM and libICE are getting added to the linker command line by > configure, which for some reason thinks that those are needed presumably > because libXau is getting linked in, but I don't know why it thinks > that. libxcb pulls libXau in, but I don't know how configure knows > about that. In any case configure adds -lSM and -lICE, but it doesn't > add -lXau. I figured out why this problem isn't caught by pointyhat. It turns out that configure looks for libICE and if it finds that, then it assumes that libSM is also installed and adds both libraries to the linker command line. Since pointyhat only installs the libraries that are listed as dependencies and neither of these libraries is a listed dependency, the configure test for the presence of libICE fail and the build doesn't try to link to either of these libraries. When I was rebuilding all of my ports from scratch because I was upgrading from 7-STABLE to 8-STABLE, libICE must have gotten installed before startup-notification, which caused configure to want to link both libSM and libICE. This failed because libSM was not yet installed. I wonder how many other ports have this bug ... Here's a patch: --- configure.orig 2009-04-13 03:58:13.000000000 -0700 +++ configure 2010-06-30 21:56:25.000000000 -0700 @@ -12792,87 +12792,6 @@ fi fi - - # Check for libraries that X11R6 Xt/Xaw programs need. - ac_save_LDFLAGS=$LDFLAGS - test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" - # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to - # check for ICE first), but we must link in the order -lSM -lICE or - # we get undefined symbols. So assume we have SM if we have ICE. - # These have to be linked with before -lX11, unlike the other - # libraries we check for below, so use a different variable. - # John Interrante, Karl Berry - { $as_echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5 -$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; } -if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lICE $X_EXTRA_LIBS $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char IceConnectionNumber (); -int -main () -{ -return IceConnectionNumber (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_ICE_IceConnectionNumber=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_ICE_IceConnectionNumber=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 -$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } -if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then - X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" -fi - - LDFLAGS=$ac_save_LDFLAGS - fi