Problem with mingw32 cross-compiler

Fernando Martin fer20002@yahoo.com
Wed Nov 2 12:04:00 GMT 2005


Hello,

I'm doing a cross-compiler from Linux to mingw32.

With the snapshot gcc-4.0-20050811 everything is ok
and the cross-compiler works without problems.

But with the snapshot gcc-4.0-20050818 and above
(including 4.0.2) the compiler builds fine, but when I
try to compile a simple HelloWorld.java program this
is the output:

[root@localhost mycompile]#
/usr/local/mingw32/bin/i686-pc-mingw32-gcj
--main=HelloWorld -o HelloWorld.exe HelloWorld.java
/usr/local/mingw32/lib/gcc/i686-pc-mingw32/4.0.2/../../../../i686-pc-mingw32/lib/libgcj.a(natLogger.o):
In function
`_ZN4java4util7logging6Logger19getCallerStackFrameEv':
/mycompile/source/gcc-4.0-20050818/libjava/java/util/logging/natLogger.cc:29:
multiple definition of
`java::util::logging::Logger::getName()'
/usr/local/mingw32/lib/gcc/i686-pc-mingw32/4.0.2/../../../../i686-pc-mingw32/lib/libgcj.a(logging.o):logging.lolist:(.text+0x21f0):
first defined here
collect2: ld returned 1 exit status

Something was changed between 11 and 18 August 2005
that breaks libgcj.a linkage

The output of gcc -v is:

[root@localhost mycompile]#
/usr/local/mingw32/bin/i686-pc-mingw32-gcc -v
Using built-in specs.
Target: i686-pc-mingw32
Configured with:
/mycompile/source/gcc-4.0-20050818/configure -v
--prefix=/usr/local/mingw32 --target=i686-pc-mingw32
--with-headers=/usr/local/mingw32/i686-pc-mingw32/include
--with-gcc --with-gnu-ld --with-gnu-as
--enable-threads=win32 --disable-nls --disable-debug
--enable-languages=c,c++,java --disable-win32-registry
--disable-shared --enable-sjlj-exceptions
--enable-libgcj --disable-java-awt --without-x
--enable-java-gc=boehm --disable-libgcj-debug
--enable-libgcj-multifile
--enable-libgcj-mingw-osapi=ansi --enable-interpreter
--enable-hash-synchronization --without-newlib
Thread model: win32
gcc version 4.0.2 20050818 (prerelease)


I'm using cross binutils 2.16.1

Can someone help me with this, please?

Thanks in advanced


		
__________________________________ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com



More information about the Java mailing list