bug-libtool
[Top][All Lists]
Advanced

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

OBJDUMP incorrect on cross-compiles to mingw32


From: Simon Josefsson
Subject: OBJDUMP incorrect on cross-compiles to mingw32
Date: Wed, 21 Jun 2006 15:48:08 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux)

Hi!  I'm using Debian's mingw32 packages to build native win32
DLL/EXE's with libtool.  I'm configuring with:

--host=i586-mingw32msvc --build=i686-pc-linux-gnu

However, when linking a shared library, I get this error:

*** Warning: linker path does not have real file for library -lws2_32.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with libws2_32 and none of the candidates passed a file format test
*** using a file magic. Last file checked: 
/usr/lib/gcc/i586-mingw32msvc/3.4.5/. 
./../../../i586-mingw32msvc/lib//libws2_32.a
*** The inter-library dependencies that have been dropped here will be
*** automatically added whenever a program is linked with this library
*** or is declared to -dlopen it.

The cause seem to be that the deplibs-check-method uses the wrong
OBJDUMP in its test:

                      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
                         | ${SED} 10q \
                         | $EGREP "$file_magic_regex" > /dev/null; then

The $file_magic_cmd is:

file_magic_cmd="\$OBJDUMP -f"

and

# Used on cygwin: object dumper.
OBJDUMP="objdump"

This is incorrect on my system, the "objdump" binary is the
i686-pc-linux-gnu objdump, which doesn't understand the Windows DLLs.
The "correct" objdump would be called i586-mingw32msvc-objdump.

OBJDUMP is defined close to where DLLTOOL is defined to:

# Used on cygwin: DLL creation program.
DLLTOOL="dlltool"

I changed both of these to i586-mingw32msvc-objdump and
i586-mingw32msvc-dlltool, and libtool now produce a DLL for GnuTLS.

I'm not sure if the DLLTOOL change was required.  There is no command
"dlltool" in my path.

Thanks,
Simon

PS. The comments talk about cygwin, perhaps that should be changed to
'MinGW/Cygwin'?




reply via email to

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