[gobolinux-users] configure bug

Andy Feldman nereusren at gmail.com
Fri Dec 22 23:52:08 UTC 2006

I came across what seems to be a bug in an autoconf configure script
when compiling k3b 1.0rc2. When it tests to see if kde libs reside in
a special suffix, it uses ldd to test for the location of libc.so, and
gets tripped up by something... it looks to me like it's because
libc.so doesn't reside in a path that contains 'lib', but my sed-fu is
weak so I'm not sure :-).

The workaround is to pass --enable-libsuffix=none to configure. The
check used to be performed in a different way that worked fine (e.g.
in k3b 0.12.17, the current stable version).

I'm not sure how many apps this will affect going forward, since this
same configure option (--enable-libsuffix) seems to be used in many
projects. If this is a change that was made to autoconf, we may want
to report it as a bug so we don't have to add --enable-libsuffix=none
to the recipes of a bunch of programs as soon as they adopt the new

Here's the problematic code from ./configure so someone else can take
a look and judge for themselves:

    # Check whether --enable-libsuffix was given.
if test "${enable_libsuffix+set}" = set; then
  enableval=$enable_libsuffix; kdelibsuff=$enableval

    if test "$kdelibsuff" = "auto"; then

cat > conftest.c << EOF
#include <stdio.h>
int main() {
 return 0;
        kdelibsuff=`$CC conftest.c -o conftest.out; ldd conftest.out
|sed -ne '/libc.so/{

    rm -rf conftest.*

Since ldd returns something with an unexpected format, kdelibsuff gets
set to a strange value and these kind of errors come out in

checking for X... ./configure: eval: line 31485: syntax error near
unexpected token `('
./configure: eval: line 31485: `have_x=yes          kde_x_includes=.
kde_x_libraries=/usr/lib   libc.so.6 =>
/System/Links/Libraries/libc.so.6 (0xb7ddc000)'

checking for IceConnectionNumber in -lICE... no
checking for libXext... no
configure: error: We need a working libXext to proceed. Since configure
can't find it itself, we stop here assuming that make wouldn't find
them either.
PrepareProgram: configure failed.
Compile: Preparation step failed.

If I force it to skip the check for libXext (by commenting out lines
in configure), it fails after a few more lines claiming it can't find
Zlib. If I add --enable-libsuffix=none, configure/make works fine
without these errors.


More information about the gobolinux-users mailing list