bug-libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

libtool doesn't attempt shared libraries on beos


From: shatty
Subject: libtool doesn't attempt shared libraries on beos
Date: Tue, 02 Jul 2002 03:08:40 -0700

I recognized this problem when trying to build the shared library
for the lame mp3 encoder on BeOS version 5.0.3.  LAME uses this
version of libtool:

ltconfig (GNU libtool) 1.3.4-freebsd-ports (1.385.2.196 1999/12/07 21:47:57)

The symptom is that libtool will print:

libtool: warning: undefined symbols not allowed in i686-pc-beos shared libraries

And the libmp3lame.so library is not built.  I tracked down the
problem to this part of ltconfig:

  beos*)
    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
      allow_undefined_flag=unsupported
      # Joseph Beckenbach <address@hidden> says some releases of gcc
      # support --undefined.  This deserves some investigation.  FIXME
       archive_cmds='$CC -nostart $libobjs $deplibs $linkopts ${wl}-soname 
$wl$soname -o $lib'
    else
      ld_shlibs=no
    fi
    ;;

The first thing I tried was simply setting allow_undefined_flag to supported.  
The libary built.  I tested it and it worked fine.  So, I tried it with various 
other gcc versions that I keep around.  I used gcc-2.9-beos-991026, 
gcc-2.9-beos-000224, and gcc-2.95.3.  All worked fine.  In light of this 
evidence I replaced the above with the below:

  beos*)
    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
      if $CC -v 2>&1 | egrep 'gcc version 2.9' > /dev/null; then
        allow_undefined_flag=supported
      else
      # Joseph Beckenbach <address@hidden> says some releases of gcc
      # support --undefined.  This deserves some investigation.  FIXME
        allow_undefined_flag=unsupported
      fi
       archive_cmds='$CC -nostart $libobjs $deplibs $linkopts ${wl}-soname 
$wl$soname -o $lib'
    else
      ld_shlibs=no
    fi
    ;;

This seems reasonable to me.  During my attempts to solve this problem I tried 
using the latest version of libtool and it has this same section of code in it 
and fails in the same way.  Unfortunately I don't really understand the build 
process for libtool so I can't give straight diffs.  I'm also a bit confused 
because this section of code seems replicated in acinclude.m4, aclocal.m4, and 
configure.  Now I assume configure is built from the other two, but I'm not 
really clear on the details.  I hope this is enough information for a patch to 
be made.  If  there is a need for additional information or testing, please 
contact me at this address.  Thanks.

Andrew Bachmann





reply via email to

[Prev in Thread] Current Thread [Next in Thread]