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: FYI: Article "Building GCJ on Windows" Relocated


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

TEIXOEIRA@terra.es wrote:
> Yes, I did. 
> I extracted the binaries contained in "w32api" and "mingw-runtime" both into "crossgcc/i686-pc-mingw32" and "wingcc/i686-pc-mingw32" and I 
> tryed to build "wingcc" outside the souces directory (the same process as for "crossgcc"). At the moment of failing I think it had just 
> started linking g++.exe

Well, this just shows that I haven't worked on GCJ/MinGW
for *ages* and the article and scripts I linked to are
therefore in danger of being rather inaccurate for mainline. :-(

I tried building a crossed-native GCC for MinGW after
seeing your message and sure enough I was able to reproduce
your error. It seems that after this patch:

  http://gcc.gnu.org/ml/gcc-patches/2005-08/msg00122.html

went in, the headers must be in "/mingw/include". You
can use "--with-sysroot" to work around this problem.
That is, extract "mingw-runtime" into $WINGCC_DIR/mingw,
add "--with-sysroot=$PREFIX" to the flags that cfgwingcc.sh
passes to GCC's configure script and then configure and
build as usual.

However, the build fails later in libgcj as follows:
- --------------------------- 8< ---------------------------
i686-pc-mingw32-gcj -B/home/ranmath/tmp/mingw/i686-pc-mingw32/libjava/ \
- -ffloat-store -fomit-frame-pointer -fno-omit-frame-pointer -fclasspath= \
- -fbootclasspath=/home/ranmath/tmp/mingw/i686-pc-mingw32/libjava/classpath/lib \
- --encoding=UTF-8 -Wno-deprecated -fbootstrap-classes -g -O2 -MT \
java/lang/Class.lo -MD -MP -MF java/lang/.deps/Class.Tpo -c \
/home/ranmath/src/gcc/gcc/libjava/java/lang/Class.java -o \
java/lang/Class.o java/lang/Object.java:0: fatal error: the \
'java.lang.Object' that was found in '' didn't have the special \
zero-length 'gnu.gcj.gcj-compiled' attribute.  This generally \
means that your classpath is incorrectly set.  Use 'info gcj \
"Input Options"' to see the info page describing how to set the \
classpath
compilation terminated.
make[3]: *** [java/lang/Class.lo] Error 1
make[3]: Leaving directory `/home/ranmath/tmp/mingw/i686-pc-mingw32/libjava'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/ranmath/tmp/mingw/i686-pc-mingw32/libjava'
make[1]: *** [all-target-libjava] Error 2
make[1]: Leaving directory `/home/ranmath/tmp/mingw'
make: *** [all] Error 2
- --------------------------- 8< ---------------------------
(Long lines have been manually broken into shorter lines.)

"/home/ranmath/tmp/mingw/i686-pc-mingw32/libjava/classpath/lib"
does have java.lang.Object, but it indeed does not have the
attribute "gnu.gcj.gcj-compiled" (as shown by jcf-dump), even
though the java.lang.Object built for i686-pc-linux-gnu
using the same GCC sources does have this attribute. For some
reason, the Linux->MinGW cross-compiler is not producing this
attribute. I haven't investigated this problem much, but I don't
understand why this should be the case.

Ranjit.



> ----Mensaje original----
> De: rmathew@gmail.com
> Recibido: 19/04/2006 10:57
> Para: <TEIXOEIRA@terra.es>
> CC: "GCJ"<java@gcc.gnu.org>
> Asunto: Re: FYI: Article &quot;Building GCJ on Windows&quot; Relocated
> 
> TEIXOEIRA@terra.es wrote:
>>> I could compile the "crossgcc" but not the "wingcc". This
>>> is the error log:
>>>
>>> The directory that should contain system headers does not exist:
>>>   /mingw/include
>>> make[2]: *** [stmp-fixinc] Error 1
>>>
>>> I think I've followed the steps given in http://rmathew.com/articles/gcj/bldgcj.html
>>> Any suggestions?
> 
> Did you remember to extract "mingw-runtime" and "w32api"
> packages into the $PREFIX/$TARGET folder first? (Before
> either configuration or building.) $PREFIX is the folder
> where you want to install "wingcc" and $TARGET is the
> target (e.g. "mingw32" or "i686-pc-mingw32") platform
> for your build. (The scripts assume "i686-pc-mingw32"
> by default.)
> 
> HTH,
> Ranjit.
> 
>>> ----Mensaje original----
>>> De: rmathew@gmail.com
>>> Recibido: 19/04/2006 5:56
>>> Para: <tromey@redhat.com>
>>> CC: <java@gcc.gnu.org>
>>> Asunto: Re: FYI: Article &quot;Building GCJ on Windows&quot; Relocated
>>>
>>> On 18 Apr 2006 18:05:12 -0600, Tom Tromey <tromey@redhat.com> wrote:
>>>>>>>>> "Ranjit" == Ranjit Mathew <rmathew@gmail.com> writes:
>>>> Ranjit>   Due to a recent overhaul of my website, the "Building GCJ
>>>> Ranjit> on Windows" article is now available as:
>>>> Ranjit>   http://rmathew.com/articles/gcj/bldgcj.html
>>>>
>>>> Perhaps this, or a link to it, should be on the gcj web page somewhere.
>>>> (The wiki would work for me, too.)
>>> For the moment, I've just added a link to it from the
>>> GCC Wiki entry on GCJ:
>>>
>>>   http://gcc.gnu.org/wiki/GCJ
>>>
>>> Thanks,
>>> Ranjit.
>>>
>>> --
>>> Ranjit Mathew      Email: rmathew AT gmail DOT com
>>>
>>> Bangalore, INDIA.    Web: http://rmathew.com/
>>>
>>>
>>> Prueba el correo Terra ( http://www.terra.es/correo ); Seguro, r&#65533;pido, fiable.
>>>
>>>
> 
> 
> --
> Ranjit Mathew      Email: rmathew AT gmail DOT com
> 
> Bangalore, INDIA.    Web: http://rmathew.com/
> 
> 

Prueba el correo Terra ( http://www.terra.es/correo ); Seguro, rÃpido, fiable.




- --
Ranjit Mathew      Email: rmathew AT gmail DOT com

Bangalore, INDIA.    Web: http://rmathew.com/


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFER3/YYb1hx2wRS48RAkFhAKCThrCVU/MxStz3x2/Hh0W1zkQDJwCfcoJ+
NvNL3nU4c91pi7UELk+PDGk=
=j4T4
-----END PGP SIGNATURE-----


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