2009-05-30, 21:02
Hi,
I've recently tried to compile xbmc-9.04 on my gentoo system only to discover, that it failed when linking the final binary with the following error:
g++ -O2 -O2 -g -D_DEBUG -Wall -g -D_DEBUG -Wall -o xbmc.bin -Wl,--whole-archive guilib/guilib.a guilib/common/gui_common.a guilib/tinyXML/tinyxml.a xbmc/xbmc.a xbmc/cdrip/cdrip.a xbmc/cores/cores.a xbmc/cores/DllLoader/dllloader.a xbmc/cores/DllLoader/exports/exports.a xbmc/cores/DllLoader/exports/util/exports_utils.a xbmc/cores/dvdplayer/DVDPlayer.a xbmc/cores/dvdplayer/DVDCodecs/DVDCodecs.a xbmc/cores/dvdplayer/DVDCodecs/Audio/Audio.a xbmc/cores/dvdplayer/DVDCodecs/Overlay/Overlay.a xbmc/cores/dvdplayer/DVDCodecs/Video/Video.a xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxers.a xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreams.a xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitles.a xbmc/cores/paplayer/paplayer.a xbmc/cores/AudioRenderers/audiorenderers.a xbmc/cores/VideoRenderers/VideoRenderer.a xbmc/cores/VideoRenderers/VideoShaders/VideoShaders.a xbmc/cores/ExternalPlayer/ExternalPlayer.a xbmc/FileSystem/filesystem.a xbmc/FileSystem/MusicDatabaseDirectory/musicdatabasedirectory.a xbmc/FileSystem/VideoDatabaseDirectory/videodatabasedirectory.a xbmc/karaoke/karaoke.a xbmc/lib/libcmyth/libcmyth.a xbmc/lib/libhts/libhts.a xbmc/lib/libPython/python.a xbmc/lib/libPython/xbmcmodule/xbmcmodule.a xbmc/lib/libRTMP/librtmp.a xbmc/lib/libscrobbler/scrobbler.a xbmc/lib/libRTV/librtv-i486-linux.a xbmc/lib/libshout/libshout-i486-linux.a xbmc/lib/libUPnP/libupnp-i486-linux.a xbmc/lib/libXBMS/libxbms-i486-linux.a xbmc/lib/libXDAAP/libxdaap-i486-linux.a xbmc/lib/libGoAhead/libGoAhead-i486-linux.a xbmc/lib/sqLite/sqllite.a xbmc/lib/UnrarXLib/UnrarXLib.a xbmc/linux/linux.a xbmc/screensavers/screensaver.a xbmc/settings/settings.a xbmc/utils/utils.a xbmc/visualizations/visualization.a xbmc/xbox/xbox.a xbmc/lib/libsmb/libsmbclient-i486-linux.a -Wl,--no-whole-archive -lXrandr -lavahi-client -lavahi-common -lfaac -lpulse -lhal-storage -ldbus-1 -lcurl -lXinerama -lXmu -lXt -ljasper -lenca -lresolv -ldl -lSDL_mixer -lSDL_image -lSDL -lcdio -llzo2 -lpcre -ljpeg -lpng12 -lrt -lasound -lmysqlclient -lsqlite3 -lfribidi -lbz2 -lfontconfig -lfreetype -lvorbis -logg -lmad -lGLU -lGLEW -lGL -rdynamic
xbmc/lib/libsmb/libsmbclient-i486-linux.a(access.o): In function `string_match':
access.c.text+0x5c7): undefined reference to `yp_get_default_domain'
After some investigation it turned out, that the yp_get_default_domain function is present in the libnsl library instead of libc. I have written a patch for the configure.in which adds the checks for this function and fixes this issue:
--- a/configure.in 2009-04-19 08:00:34.000000000 +0200
+++ b/configure.in 2009-05-28 21:52:06.000000000 +0200
@@ -269,6 +269,10 @@
AC_MSG_ERROR($missing_library))
fi
+# Need to link with -lnsl if it contains yp_get_default_domain
+AC_SEARCH_LIBS(yp_get_default_domain, [nsl])
+AC_CHECK_FUNCS(yp_get_default_domain)
+
# PulseAudio
if test "$host_vendor" = "apple" ; then
use_pulse="no"
Please integrate it into the source if you find it useful.
I've recently tried to compile xbmc-9.04 on my gentoo system only to discover, that it failed when linking the final binary with the following error:
g++ -O2 -O2 -g -D_DEBUG -Wall -g -D_DEBUG -Wall -o xbmc.bin -Wl,--whole-archive guilib/guilib.a guilib/common/gui_common.a guilib/tinyXML/tinyxml.a xbmc/xbmc.a xbmc/cdrip/cdrip.a xbmc/cores/cores.a xbmc/cores/DllLoader/dllloader.a xbmc/cores/DllLoader/exports/exports.a xbmc/cores/DllLoader/exports/util/exports_utils.a xbmc/cores/dvdplayer/DVDPlayer.a xbmc/cores/dvdplayer/DVDCodecs/DVDCodecs.a xbmc/cores/dvdplayer/DVDCodecs/Audio/Audio.a xbmc/cores/dvdplayer/DVDCodecs/Overlay/Overlay.a xbmc/cores/dvdplayer/DVDCodecs/Video/Video.a xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxers.a xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreams.a xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitles.a xbmc/cores/paplayer/paplayer.a xbmc/cores/AudioRenderers/audiorenderers.a xbmc/cores/VideoRenderers/VideoRenderer.a xbmc/cores/VideoRenderers/VideoShaders/VideoShaders.a xbmc/cores/ExternalPlayer/ExternalPlayer.a xbmc/FileSystem/filesystem.a xbmc/FileSystem/MusicDatabaseDirectory/musicdatabasedirectory.a xbmc/FileSystem/VideoDatabaseDirectory/videodatabasedirectory.a xbmc/karaoke/karaoke.a xbmc/lib/libcmyth/libcmyth.a xbmc/lib/libhts/libhts.a xbmc/lib/libPython/python.a xbmc/lib/libPython/xbmcmodule/xbmcmodule.a xbmc/lib/libRTMP/librtmp.a xbmc/lib/libscrobbler/scrobbler.a xbmc/lib/libRTV/librtv-i486-linux.a xbmc/lib/libshout/libshout-i486-linux.a xbmc/lib/libUPnP/libupnp-i486-linux.a xbmc/lib/libXBMS/libxbms-i486-linux.a xbmc/lib/libXDAAP/libxdaap-i486-linux.a xbmc/lib/libGoAhead/libGoAhead-i486-linux.a xbmc/lib/sqLite/sqllite.a xbmc/lib/UnrarXLib/UnrarXLib.a xbmc/linux/linux.a xbmc/screensavers/screensaver.a xbmc/settings/settings.a xbmc/utils/utils.a xbmc/visualizations/visualization.a xbmc/xbox/xbox.a xbmc/lib/libsmb/libsmbclient-i486-linux.a -Wl,--no-whole-archive -lXrandr -lavahi-client -lavahi-common -lfaac -lpulse -lhal-storage -ldbus-1 -lcurl -lXinerama -lXmu -lXt -ljasper -lenca -lresolv -ldl -lSDL_mixer -lSDL_image -lSDL -lcdio -llzo2 -lpcre -ljpeg -lpng12 -lrt -lasound -lmysqlclient -lsqlite3 -lfribidi -lbz2 -lfontconfig -lfreetype -lvorbis -logg -lmad -lGLU -lGLEW -lGL -rdynamic
xbmc/lib/libsmb/libsmbclient-i486-linux.a(access.o): In function `string_match':
access.c.text+0x5c7): undefined reference to `yp_get_default_domain'
After some investigation it turned out, that the yp_get_default_domain function is present in the libnsl library instead of libc. I have written a patch for the configure.in which adds the checks for this function and fixes this issue:
--- a/configure.in 2009-04-19 08:00:34.000000000 +0200
+++ b/configure.in 2009-05-28 21:52:06.000000000 +0200
@@ -269,6 +269,10 @@
AC_MSG_ERROR($missing_library))
fi
+# Need to link with -lnsl if it contains yp_get_default_domain
+AC_SEARCH_LIBS(yp_get_default_domain, [nsl])
+AC_CHECK_FUNCS(yp_get_default_domain)
+
# PulseAudio
if test "$host_vendor" = "apple" ; then
use_pulse="no"
Please integrate it into the source if you find it useful.