← Back to team overview

team-xbmc team mailing list archive

XBMC configure script libmp3lame problem

 

Hello,
there seems to be a problem for the main configure script to detect the
lame library when building on Launchpad:
In the buildlog (for example
https://launchpadlibrarian.net/123987086/buildlog_ubuntu-precise-amd64.xbmc_2%3A12.0~git20121126.0200-ce34d17-0precise_BUILDING.txt.gz)
you can see this syntax error:

checking for libmp3lame soname... /usr/bin/ld: mode elf_x86_64
./configure: line 22710: [: too many arguments
no
configure: WARNING: Unable to determine soname of libmp3lame library
configure: WARNING: libmp3lame support disabled

This apparently is caused by this section in configure (line 22694 ff):
# Audio encoders
if test "x$use_libmp3lame" != "xno"; then

  if echo "$host" | grep -q freebsd ; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmp3lame soname" >&5
$as_echo_n "checking for libmp3lame soname... " >&6; }
    LAMEENC_SONAME=`ldconfig -r | sed -n "s;.* \(/.*libmp3lame\.so.*\)$;\1;p" | head -n 1`
    if test x$LAMEENC_SONAME != x ; then
      LAMEENC_SONAME=`basename $LAMEENC_SONAME`
    fi
  elif [ "$host_vendor" != "apple" ]; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmp3lame soname" >&5
$as_echo_n "checking for libmp3lame soname... " >&6; }
    LAMEENC_FILENAME=$($CC -nostdlib -o /dev/null $LDFLAGS -lmp3lame -Wl,-M 2>/dev/null | grep "^LOAD.*mp3lame" | awk '{V=2; print $V}')
    if [ -z $LAMEENC_FILENAME ]; then
      #try gold linker syntax
      LAMEENC_FILENAME=$($CC -nostdlib -o /dev/null $LDFLAGS -lmp3lame -Wl,-t 3>&1 1>&2 2>&3 | grep "mp3lame")
    fi
    if [ ! -z $LAMEENC_FILENAME ]; then
      LAMEENC_SONAME=$($OBJDUMP -p $LAMEENC_FILENAME | grep "SONAME.*mp3lame" | awk '{V=2; print $V}')
    fi
  else

When running the commands to get LAMEENC_FILENAME locally (with
installed Package libmp3lame-dev) it seems that the first command
matches correctly because of the installed local lib:
gcc -nostdlib -o /dev/null $LDFLAGS -lmp3lame -Wl,-M 2>/dev/null | grep
"^LOAD.*mp3lame" | awk '{V=2; print $V}'
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/libmp3lame.so
But when running the second command
gcc -nostdlib -o /dev/null $LDFLAGS -lmp3lame -Wl,-M 2>/dev/null | grep
"^LOAD.*mp3lame" | awk '{V=2; print $V}'
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/libmp3lame.so
It returns two lines which would cause the syntax error as shown in the
buildlog:
/usr/bin/ld: mode elf_x86_64
-lmp3lame
(/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/libmp3lame.so)

Any ideas how to solve this?

Best regards,

Alexander Grothe