This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
Re: Cross compilation issues with MinGW
- From: Dan Witte <dwitte at mozilla dot com>
- To: Luis Lavena <luislavena at gmail dot com>
- Cc: libffi-discuss at sourceware dot org
- Date: Tue, 9 Mar 2010 11:18:27 -0800 (PST)
- Subject: Re: Cross compilation issues with MinGW
I had the same problem in Mozilla, which we fixed by locally patching out the offending line.
The problem is that this occurs in a file generated by autotools, which means the bug lies there. autotools have a very high amount of cruft, mostly wrong or highly configuration-dependent, relating to MSVC.
I'd love to see a fix in autotools, so if you're willing to push that it'd be awesome. :)
Regards,
Dan.
----- "Luis Lavena" <luislavena@gmail.com> wrote:
> Hello,
>
> I'm trying to compile latest libffi from Git [1] in OSX 10.5
> targeting
> i386-mingw32 (mingw port package).
>
> The command I've used is the following:
>
> mkdir -p builds/mingw32 && cd builds/mingw32
> ../../configure --enable-static --with-pic --build=i386-mingw32
>
> The problem is that the generated libtool file contains this:
>
> fix_srcfile_path="\`cygpath -w \"\$srcfile\"\`"
>
> And this generates the following error during make:
>
> make
> make "AR_FLAGS=" "CC_FOR_BUILD=" "CFLAGS=-g -O2" "CXXFLAGS="
> "CFLAGS_FOR_BUILD=" "CFLAGS_FOR_TARGET=" "INSTALL=/usr/bin/install
> -c"
> "INSTALL_DATA=/usr/bin/install -c -m 644"
> "INSTALL_PROGRAM=/usr/bin/install -c"
> "INSTALL_SCRIPT=/usr/bin/install
> -c" "JC1FLAGS=" "LDFLAGS=" "LIBCFLAGS=" "LIBCFLAGS_FOR_TARGET="
> "MAKE=make" "MAKEINFO=/bin/sh /Users/luis/projects/oss/libffi/missing
> --run makeinfo " "PICFLAG=" "PICFLAG_FOR_TARGET=" "RUNTESTFLAGS="
> "SHELL=/bin/sh" "exec_prefix=/usr/local"
> "infodir=/usr/local/share/info" "libdir=/usr/local/lib"
> "prefix=/usr/local" "AR=ar" "AS=as" "CC=gcc" "CXX=g++"
> "LD=/usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld" "NM=/usr/bin/nm -p"
> "RANLIB=ranlib" "DESTDIR=" all-recursive
> Making all in include
> make[2]: Nothing to be done for `all'.
> Making all in testsuite
> make[2]: Nothing to be done for `all'.
> Making all in man
> make[2]: Nothing to be done for `all'.
> depbase=`echo src/debug.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
> /bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I.
> -I../.. -I. -I../../include -Iinclude -I../../src -Wall -g
> -fexceptions -g -O2 -MT src/debug.lo -MD -MP -MF $depbase.Tpo -c -o
> src/debug.lo ../../src/debug.c &&\
> mv -f $depbase.Tpo $depbase.Plo
> ./libtool: line 1825: cygpath: command not found
> libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I.
> -I../../include
> -Iinclude -I../../src -Wall -g -fexceptions -g -O2 -MT src/debug.lo
> -MD -MP -MF src/.deps/debug.Tpo -c "" -DDLL_EXPORT -DPIC -o
> src/.libs/debug.o
> i686-apple-darwin9-gcc-4.0.1: no input files
> make[2]: *** [src/debug.lo] Error 1
> make[1]: *** [all-recursive] Error 1
> make: *** [all] Error 2
>
> ===
>
> Under MinGW there is no cygpath (not even with MSYS installed) and
> even less chance there is cygpath when cross compiling.
>
> I'm doing this wrong? What shall be using to properly cross compile
> libffi?
>
> Thank you.
>
> --
> Luis Lavena
> AREA 17
> -
> Perfection in design is achieved not when there is nothing more to
> add,
> but rather when there is nothing more to take away.
> Antoine de Saint-ExupÃry