This is the mail archive of the java@gcc.gnu.org mailing list for the Java 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]

Re: mingw compilation problems


Marco Trudel wrote:
Hello all

I try to compile a build=Linux, host=mingw, target=mingw gcj and run into this error:
/bin/sh ./libtool --mode=compile /home/Marco/Desktop/compile-win-win/gcc-build/gcc/gcj -B/home/Marco/Desktop/compile-win-win/gcc-build/gcc/ -ffloat-store -fomit-frame-pointer -fno-omit-frame-pointer -fclasspath= -fbootclasspath=/usr/local/src/gcc/libjava/classpath/lib --encoding=UTF-8 -Wno-deprecated -fbootstrap-classes -g -O2 -c -o java/lang/Object.lo -fsource-filename=/usr/local/src/gcc/libjava/java/lang/Object.java /usr/local/src/gcc/libjava/classpath/lib/java/lang/Object.class
/home/Marco/Desktop/compile-win-win/gcc-build/gcc/gcj -B/home/Marco/Desktop/compile-win-win/gcc-build/gcc/ -ffloat-store -fomit-frame-pointer -fno-omit-frame-pointer -fclasspath= -fbootclasspath=/usr/local/src/gcc/libjava/classpath/lib --encoding=UTF-8 -Wno-deprecated -fbootstrap-classes -g -O2 -c -fsource-filename=/usr/local/src/gcc/libjava/java/lang/Object.java /usr/local/src/gcc/libjava/classpath/lib/java/lang/Object.class -o java/lang/Object.o
./libtool: line 1261: /home/Marco/Desktop/compile-win-win/gcc-build/gcc/gcj: No such file or directory
make[3]: *** [java/lang/Object.lo] Error 1
make[3]: Leaving directory `/home/Marco/Desktop/compile-win-win/gcc-build/i686-pc-mingw32/libjava'


Well, of course "/home/Marco/Desktop/compile-win-win/gcc-build/gcc/gcj" does not exist because it is gcj.exe. I then tried to configure gcc with "--with-gcj=i686-pc-mingw32-gcj" (which is in path) but it won't be used.

Ok, as a very ugly workaround, I just linked /home/Marco/Desktop/compile-win-win/gcc-build/gcc/gcj to i686-pc-mingw32-gcj and I was able to compile gcj.


I think this problem means that all cross-compilations where build != host will fail because make tries to use the generated gcj which won't run on the build system. Also my workaround only works for Windows because there we have the luck that all binaries have an ending. So "gcj" is free to be linked to the native gcj.
I tried to track the problem in the Makefile, but I'm just not that experienced in Makefiles and have too little idea what happens how. So, for the happiness of all cross-compilers out there, I'd be very glad if someone could take a look at this. I'm here to test patches...



Marco


So I run into the same error. This worked with gcc 4.2 so I guess it's a regression. But of course it also might be an error from my side or some newly needed configuration I miss...

Can I provide more informations?


thanks Marco



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