Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 363033

Summary: [gnome-overlay] x11-terms/gnome-terminal-3.0.0 (and -9999) fails to link due to --with-smclient=xsmp in G2CONF
Product: Gentoo Linux Reporter: Alexandre Rostovtsev (RETIRED) <tetromino>
Component: [OLD] GNOMEAssignee: Gentoo Linux Gnome Desktop Team <gnome>
Status: RESOLVED FIXED    
Severity: normal CC: gamerh2o, robin
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 353071    

Description Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-04-11 06:11:31 UTC
The gnome-terminal ebuilds in Gnome overlay were recently modified (see http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commitdiff;h=7cc742ccfd38af1b093634631e831e34eae6c959) to pass --with-smclient=xsmp to configure. As a result, gnome-terminal fails to link:

# emerge gnome-terminal
[...]
Merging translations into gnome-terminal.schemas.
  CCLD   gnome-terminal
Wrote profile-preferences.ui
gnome_terminal-eggsmclient-xsmp.o: In function `set_properties':
eggsmclient-xsmp.c:(.text+0x40b): undefined reference to `SmcSetProperties'
gnome_terminal-eggsmclient-xsmp.o: In function `xsmp_shutdown_cancelled':
eggsmclient-xsmp.c:(.text+0x84d): undefined reference to `SmcSaveYourselfDone'
gnome_terminal-eggsmclient-xsmp.o: In function `delete_properties':
eggsmclient-xsmp.c:(.text+0x926): undefined reference to `SmcDeleteProperties'
gnome_terminal-eggsmclient-xsmp.o: In function `do_save_yourself':
eggsmclient-xsmp.c:(.text+0xe73): undefined reference to `SmcSaveYourselfDone'
gnome_terminal-eggsmclient-xsmp.o: In function `fix_broken_state':
eggsmclient-xsmp.c:(.text+0xfe7): undefined reference to `SmcInteractDone'
eggsmclient-xsmp.c:(.text+0xffb): undefined reference to `SmcSaveYourselfDone'
gnome_terminal-eggsmclient-xsmp.o: In function `sm_client_xsmp_disconnect':
eggsmclient-xsmp.c:(.text+0x10df): undefined reference to `SmcCloseConnection'
gnome_terminal-eggsmclient-xsmp.o: In function `process_ice_messages':
eggsmclient-xsmp.c:(.text+0x112e): undefined reference to `IceProcessMessages'
eggsmclient-xsmp.c:(.text+0x1184): undefined reference to `IceGetConnectionContext'
gnome_terminal-eggsmclient-xsmp.o: In function `sm_client_xsmp_end_session':
eggsmclient-xsmp.c:(.text+0x11f5): undefined reference to `SmcGetIceConnection'
eggsmclient-xsmp.c:(.text+0x1227): undefined reference to `SmcSaveYourselfDone'
eggsmclient-xsmp.c:(.text+0x1275): undefined reference to `SmcVendor'
eggsmclient-xsmp.c:(.text+0x12e1): undefined reference to `SmcRequestSaveYourself'
gnome_terminal-eggsmclient-xsmp.o: In function `sm_client_xsmp_will_quit':
eggsmclient-xsmp.c:(.text+0x13a3): undefined reference to `SmcInteractDone'
eggsmclient-xsmp.c:(.text+0x13da): undefined reference to `SmcInteractDone'
eggsmclient-xsmp.c:(.text+0x13fd): undefined reference to `SmcSaveYourselfDone'
gnome_terminal-eggsmclient-xsmp.o: In function `sm_client_xsmp_startup':
eggsmclient-xsmp.c:(.text+0x15a3): undefined reference to `IceSetIOErrorHandler'
eggsmclient-xsmp.c:(.text+0x15ad): undefined reference to `IceSetErrorHandler'
eggsmclient-xsmp.c:(.text+0x15b9): undefined reference to `IceAddConnectionWatch'
eggsmclient-xsmp.c:(.text+0x15c3): undefined reference to `SmcSetErrorHandler'
eggsmclient-xsmp.c:(.text+0x1659): undefined reference to `SmcOpenConnection'
gnome_terminal-eggsmclient-xsmp.o: In function `ice_connection_watch':
eggsmclient-xsmp.c:(.text+0x17b1): undefined reference to `IceConnectionNumber'
gnome_terminal-eggsmclient-xsmp.o: In function `xsmp_save_yourself':
eggsmclient-xsmp.c:(.text+0x1a25): undefined reference to `SmcSaveYourselfDone'
gnome_terminal-eggsmclient-xsmp.o: In function `do_save_yourself':
eggsmclient-xsmp.c:(.text+0xec2): undefined reference to `SmcInteractRequest'
collect2: ld returned 1 exit status
make[3]: *** [gnome-terminal] Error 1
make[3]: Leaving directory `/var/tmp/portage/x11-terms/gnome-terminal-3.0.0/work/gnome-terminal-3.0.0/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/var/tmp/portage/x11-terms/gnome-terminal-3.0.0/work/gnome-terminal-3.0.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/x11-terms/gnome-terminal-3.0.0/work/gnome-terminal-3.0.0'
make: *** [all] Error 2
emake failed


To see why this is happening, have a look at configure.ac:

AC_ARG_WITH([smclient],
  [AS_HELP_STRING([--with-smclient-backend],[which smclient backend to use (xsmp/win32/quartz)])],
  [],
  [case "$GDK_TARGET" in
    x11) with_smclient=xsmp SMCLIENT_PKGS="sm ice" ;;
    win32|quartz) with_smclient=$GDK_TARGET ;;
    *) with_smclient=no ;;
   esac])
AC_MSG_RESULT([$with_smclient])

if test "$with_smclient" != "no"; then
  AC_DEFINE([WITH_SMCLIENT],[1],[Define if smclient is enabled])
fi

if test -n "$SMCLIENT_PKGS"; then
  PKG_CHECK_MODULES([SMCLIENT],[$SMCLIENT_PKGS])
  AC_SUBST([SMCLIENT_CFLAGS])
  AC_SUBST([SMCLIENT_LIBS])
fi


When --with-smclient=xsmp is passed to configure, SMCLIENT_PKGS does not get set, so PKG_CHECK_MODULES([SMCLIENT],[$SMCLIENT_PKGS]) does not get run and SMCLIENT_LIBS never gets defined. As a result, -lSM is not passed to the linker and linking fails.

The simplest solution is to remove the "--with-smclient=xsmp" line from the ebuild entirely; it should not be needed on x11-based systems, since if the x11 gdk backend is detected, configure will automatically select the xsmp smclient).

Alternatively, if there really is some good reason for manually choosing xsmp (OSX compatibility?), the ebuild needs to define SMCLIENT_LIBS=`pkg-config --libs sm ice` in src_configure.
Comment 1 Gilles Dartiguelongue gentoo-dev 2011-04-12 07:04:33 UTC
Fixed in overlay. Thanks for reporting.