[Top][All Lists]

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

Re: problem when cross compiling with mingw32ce

From: Vincent Torri
Subject: Re: problem when cross compiling with mingw32ce
Date: Sun, 5 Oct 2008 20:00:15 +0200 (CEST)


* Vincent Torri wrote on Fri, Oct 03, 2008 at 08:52:54AM CEST:

I'm cross-compiling using the cegcc toolchain and the mingw32ce
compiler. I have 2 problems:

1) I use Windows sockets, hence i have to link against libws2 and I
pass -lws2. I have the following (usual...) message:

*** Warning: linker path does not have real file for library -lws2.
*** 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 and none of the candidates passed a file format test
*** using a file magic. Last file checked:

This should only happen if the logic in libtool cannot determine that
libws2.a is an import library.  The logic for this is quite involved:
it uses 'file' to determine the file type, and may use the
func_win32_libid shell function in libtool, which itself uses $NM and
$OBJDUMP to find out more.  So you have to have these set correctly to
the cross tools (arm-mingw32ce-objdump or so), for example.  Normally,
the configure script should get that right (please check that!).

I have verified, and the names are correct (even in the libtool script:
NM="/home/torri/local/opt/mingw32ce/bin/arm-mingw32ce-nm -B"

If with those settings, things still fail, you should surround the
func_win32_libid code in your libtool script with 'set -x', 'set +x'
and look at the commands called, when 'libtool --mode=link' is run.
Call them manually and inspect their output.  The comments in the
function explain what is expected.

I have run manually the commands of func_win32_libid():

file -L libws2.a:

/home/torri/local/opt/mingw32ce/arm-mingw32ce/lib/libws2.a: current ar archive

$OBJDUMP -f libws2.a | sed  -e '10q' | /bin/grep -E 'file format 
pe-i386(.*architecture: i386)?'

returns nothing. But:

$OBJDUMP -f libws2.a | sed  -e '10q'

In archive /home/torri/local/opt/mingw32ce/arm-mingw32ce/lib/libws2.a:

duewbt.o:     file format pe-arm-wince-little
architecture: armv4, flags 0x00000038:
start address 0x00000000

duewbh.o:     file format pe-arm-wince-little
architecture: armv4, flags 0x00000039:

But grep is used to check "i386", and not arm-wince-little.

I think that the problem is here. But I have no idea on how to fix it.

What is even more strange is that there is no problem with the cegcc toolchain. There should be the same problem as the library is also an arm one.


reply via email to

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