libtool
[Top][All Lists]
Advanced

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

Re: cygwin libtool breakage


From: Gary V . Vaughan
Subject: Re: cygwin libtool breakage
Date: Mon, 4 Jun 2001 02:25:21 +0100

On Saturday 02 June 2001  5:43 pm, Robert Collins wrote:
> Scratch my prior problem: adding AC_LIBTOOL_WIN32_DLL to configure.in
> (missed that step in the autobook ) worked wonders.

:-o

> however, back to the failing tests.
>
> the first failure, demo-make.test fails because ar is called with no
> object files.

There was a bug in ltmain.in for a day where I had mismerged the 
pic-objects-in-.libs patch, perhaps you are seeing this.  Anyway, with a 
freshly setup.exe'ed cygwin-1.3.2 and a freshly pservered libtool HEAD, I get 
the following:

address@hidden ~/libtool$ export CC=gcc
address@hidden ~/libtool$ ./configure
loading cache ./config.cache
checking for Cygwin environment... yes
checking for mingw32 environment... no
checking how to run the C preprocessor... gcc -E
checking for a BSD compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... yes
checking for working aclocal... found
checking for working autoconf... found
checking for working automake... found
checking for working autoheader... found
checking for working makeinfo... found
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking host system type... i586-pc-cygwin
checking build system type... i586-pc-cygwin
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking for /usr/bin/ld option to reload object files... -r
checking how to recognise dependant libraries... file_magic file format 
pei*-i386(.*architecture: i386)?
checking for object suffix... o
checking for executable suffix... .exe
checking command to parse /usr/bin/nm -B output... ok
checking for dlltool... dlltool
checking for as... as
checking for objdump... objdump
checking if libtool should supply DllMain function... no
checking for dlfcn.h... yes
checking for ranlib... ranlib
checking for strip... strip
checking for gcc option to produce PIC... -DDLL_EXPORT
checking whether the linker (/usr/bin/ld) supports shared libraries... yes
checking command to parse /usr/bin/nm -B output... (cached) ok
checking if gcc PIC flag -DDLL_EXPORT works... yes
checking if gcc static flag -static works... yes
checking the maximum length of command line arguments... 786433
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking if gcc supports -c -o file.o... yes
checking for objdir... .libs
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking dynamic linker characteristics... Win32 ld.exe
checking if libtool supports shared libraries... yes
updating cache ./config.cache
creating ./config.status
creating Makefile
creating doc/Makefile
creating tests/Makefile
configuring in libltdl
running /bin/sh ./configure  --enable-ltdl-install 
--cache-file=.././config.cache --srcdir=.
loading cache .././config.cache
checking for Cygwin environment... (cached) yes
checking for mingw32 environment... (cached) no
checking how to run the C preprocessor... (cached) gcc -E
checking for a BSD compatible install... (cached) /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... (cached) yes
checking for working aclocal... found
checking for working autoconf... found
checking for working automake... found
checking for working autoheader... found
checking for working makeinfo... found
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... (cached) gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for working const... yes
checking for inline... inline
checking host system type... i586-pc-cygwin
checking build system type... i586-pc-cygwin
checking for ld used by GCC... (cached) /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... (cached) yes
checking for /usr/bin/ld option to reload object files... (cached) -r
checking for BSD-compatible nm... (cached) /usr/bin/nm -B
checking whether ln -s works... (cached) yes
checking how to recognise dependant libraries... (cached) file_magic file 
format pei*-i386(.*architecture: i386)?
checking for object suffix... (cached) o
checking for executable suffix... (cached) .exe
checking command to parse /usr/bin/nm -B output... (cached) ok
checking for dlltool... (cached) dlltool
checking for as... (cached) as
checking for objdump... (cached) objdump
checking if libtool should supply DllMain function... (cached) no
checking for dlfcn.h... (cached) yes
checking for ranlib... (cached) ranlib
checking for strip... (cached) strip
checking for gcc option to produce PIC... (cached)  -DDLL_EXPORT
checking whether the linker (/usr/bin/ld) supports shared libraries... yes
checking command to parse /usr/bin/nm -B output... (cached) ok
checking if gcc PIC flag  -DDLL_EXPORT works... (cached) yes
checking if gcc static flag -static works... (cached) yes
checking the maximum length of command line arguments... (cached) 786433
checking if gcc supports -fno-rtti -fno-exceptions... (cached) yes
checking if gcc supports -c -o file.o... (cached) yes
checking for objdir... (cached) .libs
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking dynamic linker characteristics... Win32 ld.exe
checking if libtool supports shared libraries... yes
checking for ANSI C header files... yes
checking which extension is used for shared libraries... .dll.a
checking which variable specifies run-time library path... PATH
checking for the default library search path... /lib /usr/lib
checking for objdir... .libs
checking whether libtool supports -dlopen/-dlpreopen... yes
checking for dlopen in -ldl... no
checking for dlopen... yes
checking for shl_load... no
checking for shl_load in -ldld... no
checking for dld_link in -ldld... no
checking for dlerror... yes
checking for _ prefix in compiled symbols... yes
checking whether we have to add an underscore for dlsym... unknown
checking whether deplibs are loaded by dlopen... unknown
checking for malloc.h... yes
checking for memory.h... yes
checking for stdlib.h... yes
checking for stdio.h... yes
checking for ctype.h... yes
checking for dl.h... no
checking for sys/dl.h... no
checking for dld.h... no
checking for string.h... yes
checking for strchr... yes
checking for strrchr... yes
checking for memcpy... yes
checking for strcmp... yes
updating cache .././config.cache
creating ./config.status
creating Makefile
creating config.h
address@hidden ~/libtool$ make
Making all in .
make[1]: Entering directory `/home/gary/libtool'
rm -f ltmain.shT
date=`/bin/sh ./mkstamp < ./ChangeLog` && \
sed -e 's/@''PACKAGE@/libtool/' -e 's/@''VERSION@/1.4/' \
    -e "s%@""address@hidden" ./ltmain.in > ltmain.shT
mv -f ltmain.shT ltmain.sh || \
(rm -f ltmain.sh && cp ltmain.shT ltmain.sh && rm -f ltmain.shT)
/bin/sh ./config.status --recheck
running /bin/sh ./configure  --enable-ltdl-install --no-create --no-recursion
loading cache ./config.cache
[[snippage]]
chmod +x libtool
CONFIG_FILES=libtoolize CONFIG_HEADERS= /bin/sh ./config.status
creating libtoolize
chmod +x libtoolize
make[1]: Leaving directory `/home/gary/libtool'
Making all in libltdl
make[1]: Entering directory `/home/gary/libtool/libltdl'
/bin/sh ./config.status --recheck
running /bin/sh ./configure  --enable-ltdl-install 
--cache-file=.././config.cache --srcdir=. --no-create --no-recursion
[[more snippage]]
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.     -g -O2 
-c ltdl.c
mkdir .libs
gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c ltdl.c  -DDLL_EXPORT -o .libs/ltdl.o
gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -c ltdl.c -o ltdl.o >/dev/null 2>&1
/bin/sh ./libtool --mode=link gcc  -g -O2  -o libltdl.la -rpath 
/usr/local/lib -no-undefined -version-info 3:0:0 ltdl.lo
generating symbol list for `libltdl.la'
 dlltool --export-all --exclude-symbols 
address@hidden,address@hidden,address@hidden,address@hidden,address@hidden 
--output-def .libs/cygltdl-3.dll-def  .libs/ltdl.o
 sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < 
.libs/cygltdl-3.dll-def > .libs/libltdl.exp
if test "x`head -1 .libs/libltdl.exp`" = xEXPORTS; then cp .libs/libltdl.exp 
.libs/cygltdl-3.dll-def; else echo EXPORTS > .libs/cygltdl-3.dll-def; 
_lt_hint=1; cat .libs/libltdl.exp | while read symbol; do set dummy $symbol; 
case $# in 2) echo " $2 @ $_lt_hint ; " >> .libs/cygltdl-3.dll-def;; *) echo 
" $2 @ $_lt_hint $3 ; " >> .libs/cygltdl-3.dll-def;; esac; _lt_hint=`expr 1 + 
$_lt_hint`; done; fi
 gcc -Wl,--base-file,.libs/cygltdl-3.dll-base -Wl,--dll -nostartfiles 
-Wl,-e,address@hidden -o .libs/cygltdl-3.dll  .libs/ltdl.o
 dlltool --as=as --dllname cygltdl-3.dll --exclude-symbols 
address@hidden,address@hidden,address@hidden,address@hidden,address@hidden 
--def .libs/cygltdl-3.dll-def --base-file .libs/cygltdl-3.dll-base 
--output-exp .libs/cygltdl-3.dll-exp
 gcc -Wl,--base-file,.libs/cygltdl-3.dll-base .libs/cygltdl-3.dll-exp 
-Wl,--dll -nostartfiles -Wl,-e,address@hidden -o .libs/cygltdl-3.dll  
.libs/ltdl.o
 dlltool --as=as --dllname cygltdl-3.dll --exclude-symbols 
address@hidden,address@hidden,address@hidden,address@hidden,address@hidden 
--def .libs/cygltdl-3.dll-def --base-file .libs/cygltdl-3.dll-base 
--output-exp .libs/cygltdl-3.dll-exp --output-lib .libs/libltdl.dll.a
 gcc .libs/cygltdl-3.dll-exp -Wl,--dll -nostartfiles 
-Wl,-e,address@hidden -o .libs/cygltdl-3.dll  .libs/ltdl.o
ar cru .libs/libltdl.a  ltdl.o
ranlib .libs/libltdl.a
creating libltdl.la
(cd .libs && rm -f libltdl.la && ln -s ../libltdl.la libltdl.la)
make[1]: Leaving directory `/home/gary/libtool/libltdl'
Making all in doc
make[1]: Entering directory `/home/gary/libtool/doc'
cd .. \
  && CONFIG_FILES=doc/Makefile CONFIG_HEADERS= /bin/sh ./config.status
creating doc/Makefile
make[1]: Leaving directory `/home/gary/libtool/doc'
make[1]: Entering directory `/home/gary/libtool/doc'
Updating ./version.texi
cd . \
  && makeinfo `echo libtool.texi | sed 's,.*/,,'`
make[1]: Leaving directory `/home/gary/libtool/doc'
Making all in tests
make[1]: Entering directory `/home/gary/libtool/tests'
cd .. \
  && CONFIG_FILES=tests/Makefile CONFIG_HEADERS= /bin/sh ./config.status
creating tests/Makefile
make[1]: Leaving directory `/home/gary/libtool/tests'
make[1]: Entering directory `/home/gary/libtool/tests'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/gary/libtool/tests'
address@hidden ~/libtool$ ls libltdl/.libs/
total 683
 532 cygltdl-3.dll          5 cygltdl-3.dll-exp     1 libltdl.exp    57 ltdl.o
   3 cygltdl-3.dll-base    58 libltdl.a             1 libltdl.la
   1 cygltdl-3.dll-def     24 libltdl.dll.a         1 libltdl.lai
address@hidden ~/libtool$ make check TESTS='demo-static.test demo-make.test'
cd . \
  && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status
creating Makefile
Making check in .
make[1]: Entering directory `/home/gary/libtool'
make[1]: Nothing to be done for `check-am'.
make[1]: Leaving directory `/home/gary/libtool'
Making check in libltdl
make[1]: Entering directory `/home/gary/libtool/libltdl'
cd . \
  && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status
creating Makefile
make[1]: Leaving directory `/home/gary/libtool/libltdl'
make[1]: Entering directory `/home/gary/libtool/libltdl'
cd . \
  && CONFIG_FILES= CONFIG_HEADERS=config.h \
     /bin/sh ./config.status
creating config.h
config.h is unchanged
make[1]: Leaving directory `/home/gary/libtool/libltdl'
Making check in doc
make[1]: Entering directory `/home/gary/libtool/doc'
make[1]: Nothing to be done for `check'.
make[1]: Leaving directory `/home/gary/libtool/doc'
Making check in tests
make[1]: Entering directory `/home/gary/libtool/tests'
make  check-TESTS
make[2]: Entering directory `/home/gary/libtool/tests'
PASS: demo-static.test
PASS: demo-make.test
==================
All 2 tests passed
==================
make[2]: Leaving directory `/home/gary/libtool/tests'
make[1]: Leaving directory `/home/gary/libtool/tests'


> Here, pointers would be useful. This test works on at least one other
> cygwin machine, with the 1.4 libtool. (I'm running CVS HEAD).

It can only be some oddity in your setup.  You caould check your output 
against mine and look for discrepancies.

I didn't run the entire test suite yet (my cygwin box is a cyrix pr200, and 
takes several hours to run the whole lot), I've left it running and should 
have some reults in the morning.

> Rob
>
> $ make
> /bin/sh ./libtool --mode=compile
> gcc -DPACKAGE=\"hell\" -DVERSION=\"1.0\" -DHAVE_DLFCN_H=1
>  -DHAVE_STRING_H=1 -DHAVE_MATH_H=1  -I. -I/usr/src/libtool/tests/../demo
>      -g -O2 -c -o
> hello.lo `test -f /usr/src/libtool/tests/../demo/hello.c || echo
> '/usr/src/libtool/tests/.
> ./demo/'`/usr/src/libtool/tests/../demo/hello.c
> mkdir .libs
> gcc -DPACKAGE=\"hell\" -DVERSION=\"1.0\" -DHAVE_DLFCN_H=1 -DHAVE_STRING_
> H=1 -DHAVE_MATH_H=
> 1 -I. -I/usr/src/libtool/tests/../demo -g -O2 -c
> /usr/src/libtool/tests/../demo/hello.c  -
> DDLL_EXPORT -o .libs/hello.o
> /bin/sh ./libtool --mode=compile
> gcc -DPACKAGE=\"hell\" -DVERSION=\"1.0\" -DHAVE_DLFCN_H=1
>  -DHAVE_STRING_H=1 -DHAVE_MATH_H=1  -I. -I/usr/src/libtool/tests/../demo
>      -g -O2 -c -o
> foo.lo `test -f /usr/src/libtool/tests/../demo/foo.c || echo
> '/usr/src/libtool/tests/../de
> mo/'`/usr/src/libtool/tests/../demo/foo.c
> gcc -DPACKAGE=\"hell\" -DVERSION=\"1.0\" -DHAVE_DLFCN_H=1 -DHAVE_STRING_
> H=1 -DHAVE_MATH_H=
> 1 -I. -I/usr/src/libtool/tests/../demo -g -O2 -c
> /usr/src/libtool/tests/../demo/foo.c  -DD
> LL_EXPORT -o .libs/foo.o
> /bin/sh ./libtool --mode=link gcc  -g -O2   -o libhello.la -rpath
> /usr/src/libtool/build/t
> ests/_inst/lib -version-info 3:12:1 hello.lo foo.lo
> libtool: link: warning: undefined symbols not allowed in i686-pc-cygwin
> shared libraries
> ar cru .libs/libhello.a
> ranlib .libs/libhello.a
> creating libhello.la
> (cd .libs && rm -f libhello.la && ln -s ../libhello.la libhello.la)
> gcc -DPACKAGE=\"hell\" -DVERSION=\"1.0\" -DHAVE_DLFCN_H=1 -DHAVE_STRING_
> H=1 -DHAVE_MATH_H=
> 1  -I. -I/usr/src/libtool/tests/../demo     -g -O2 -c `test -f
> /usr/src/libtool/tests/../d
> emo/main.c || echo
> '/usr/src/libtool/tests/../demo/'`/usr/src/libtool/tests/../demo/main.c
>
> /bin/sh ./libtool --mode=link gcc  -g -O2   -o hell.exe  main.o
> libhello.la
> gcc -g -O2 -o hell.exe main.o  ./.libs/libhello.a
> main.o: In function `main':
> /usr/src/libtool/tests/../demo/main.c:32: undefined reference to
> `nothing'
> /usr/src/libtool/tests/../demo/main.c:35: undefined reference to `foo'
> /usr/src/libtool/tests/../demo/main.c:38: undefined reference to `hello'
> collect2: ld returned 1 exit status
> make: *** [hell.exe] Error 1

Are you doing a VPATH build?  I don't see all those `test -f's in my output.

Sorry I can't be of more help =(O|

Cheers,
        Gary.

Time for bed now... kids back to school tomorrow, and me back to work... hey 
ho, it was fun while it lasted =)O|
-- 
  ())_.  Gary V. Vaughan     gary@(oranda.demon.co.uk|gnu.org)
  ( '/   Research Scientist  http://www.oranda.demon.co.uk        ,_())____
  / )=   GNU Hacker          http://www.gnu.org/software/libtool   \'      `&
`(_~)_   Tech' Author        http://sources.redhat.com/autobook    =`---d__/



reply via email to

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