This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Solved: libtool-CVS and Cygwin

Jan Nieuwenhuizen <> writes:

> Here's the error that I get:
>     /bin/sh ../libtool --mode=link gcc -I/home/cygwin/cygwin-1.3.10/usr/include -L/home/cygwin/cygwin-1.3.10/usr/lib -L/home/cygwin/cygwin-1.3.10/usr/lib/w32api -L/home/cygwin/cygwin-1.3.10/usr/bin  -O2 -g -Wall -Wmissing-prototypes   -o guile.exe -dlpreopen force guile.o -lm 
> libtool: link: not configured to extract global symbols from dlpreopened files
>     gcc -I/home/cygwin/cygwin-1.3.10/usr/include -O2 -g -Wall -Wmissing-prototypes -o guile.exe guile.o  -L/home/cygwin/cygwin-1.3.10/usr/lib -L/home/cygwin/cygwin-1.3.10/usr/lib/w32api -L/home/cygwin/cygwin-1.3.10/usr/bin ./.libs/libguile.a /home/fred/cvs/guile/cygwin/libltdl/.libs/libltdl.a
> guile.o: In function `main':
>     /home/fred/cvs/guile/cygwin/libguile/../../guile-core-1.6/libguile/guile.c:90: undefined reference to `lt_preloaded_symbols'
> Who is supposed to provide this symbol, or how do I avoid needing it?

It so happens, that libtool gets distressed when the cross build
loader is in PATH.  Having the cross ld in PATH yields a ./libtool
script that has:

    # Commands used to build and install a shared archive.
    archive_cmds="\$CC -o \$lib \$libobjs \$compiler_flags \\\`echo \\\"\$deplibs\\\" | sed -e 's/ -lc\$//'\\\` -link -dll~linknames="

which will obviously fail.  ld says:

   cannot find -link

So, after installing the cross binutils to be packaged, I got rid of it:

    mv -f $installroot/$CROSS_PREFIX/$TARGET_PLATFORM/bin/ld ld-in-path-breaks-libtool

Then, you'll get a valid ./libtool script.

However, to determine linkage for Cygwin, libtool needs LD to be set
to the cross loader; and it also needs a C++ compiler that is capable
of linking.  

So, here is what did it for me:

    CPPFLAGS="-I$PREFIX/include -L$PREFIX/lib -L$PREFIX/lib/w32api -L$PREFIX/bin" \
     ./configure  --host=$TARGET_PLATFORM

Guile packages coming up now, I'll look at tetex-beta after that (but
no promises).
Jan Nieuwenhuizen <> | GNU LilyPond - The music typesetter       |

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]