Compile...

Ricardo Costa webrkcpwd@hotmail.com
Tue Sep 26 11:20:00 GMT 2000


I thing you're right.
The path in gcc is diferent of gcj...
Take a look: from gcc...

GNU assembler version 2.10.90 (i686-pc-linux) using BFD version 2.10.0.18
/usr/lib/gcc-lib/i386-conectiva-linux/egcs-2.91.66/collect2 -m elf_i386 
-dynamic-linker /lib/ld-linux.so.2 -o cc/malloc/exe28FuncC /usr/lib/crt1.o 
/usr/lib/crti.o 
/usr/lib/gcc-lib/i386-conectiva-linux/egcs-2.91.66/crtbegin.o 
-L/usr/lib/qt2/lib -L/usr/lib/gcc-lib/i386-conectiva-linux/egcs-2.91.66 
-L/usr/i386-conectiva-linux/lib /tmp/ccobJeHm.o -lgcc -lc -lgcc 
/usr/lib/gcc-lib/i386-conectiva-linux/egcs-2.91.66/crtend.o /usr/lib/crtn.o

from gcj:

GNU assembler version 2.10.90 (i686-pc-linux) using BFD version 2.10.0.18
ld -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 /usr/lib/crt1.o 
/usr/lib/crti.o crtbegin.o -L/usr/lib/qt2/lib 
-L/usr/lib/gcc-lib/i386-conectiva-linux/2.95.2 
-L/usr/i386-conectiva-linux/lib /tmp/cc4l6RQ3.o -lgcc -lgcj -lm -lgcjgc 
-lpthread -lzgcj -ldl -lc -lgcc crtend.o /usr/lib/crtn.o
ld: cannot open crtbegin.o: Arquivo ou diretório não encontrado

Thanks for the help of all.
I'll try to fix it like you said.
By.

>From: Jeff Sturm <jeff.sturm@commerceone.com>
>To: Ricardo Costa <webrkcpwd@hotmail.com>
>CC: java-discuss@sources.redhat.com
>Subject: Re: Compile...
>Date: Tue, 26 Sep 2000 10:40:59 -0400
>
>Ricardo Costa wrote:
> > I'm using Conectiva Linux, it's a very similar distribution of Redhat.
> > The RPM that I used was from the distribution.
> > And with gcc I can compile normaly.
>
>OK.  The short answer is that it is a problem with your distribution.  If 
>you
>want to look more closely, examine the output of both "gcc -v" and "gcj 
>-v".
>The important command here is collect2, which should be in the last line of
>output.
>
>On my system, I see (some lines omitted for brevity):
>
>[jsturm@toronto tmp]$ gcc -v hello.c -o hello
>...
>/opt/gcj/lib/gcc-lib/alphapca56-unknown-linux-gnu/2.96/collect2 \
>   -m elf64alpha -O1 -dynamic-linker /lib/ld-linux.so.2 -o hello \
>   /usr/lib/crt1.o /usr/lib/crti.o \
>   /opt/gcj/lib/gcc-lib/alphapca56-unknown-linux-gnu/2.96/crtbegin.o \
>...
>
>[jsturm@toronto tmp]$ gcj -v Hello.java --main=Hello -o hello
>...
>/opt/gcj/lib/gcc-lib/alphapca56-unknown-linux-gnu/2.96/collect2 \
>   -m elf64alpha -O1 -dynamic-linker /lib/ld-linux.so.2 -o hello \
>   /usr/lib/crt1.o /usr/lib/crti.o \
>   /opt/gcj/lib/gcc-lib/alphapca56-unknown-linux-gnu/2.96/crtbegin.o \
>...
>
>The linker scripts are similar.  Both use the same crtbegin.o.  If your gcc 
>and
>gcj are different versions or are installed in different ${prefix} the 
>paths
>will not be the same, but you can see where it is looking for crtbegin.o.
>
>If you can't get it to work, you have other options:
>
>1) build gcj/libgcj from source (as explained on
> http://sources.redhat.com/java/ )
>2) find another binary RPM for Linux/x86
>3) complain to your distribution vendor
>
>--
>Jeff Sturm
>jeff.sturm@commerceone.com

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com .

Share information about yourself, create your own public profile at 
http://profiles.msn.com .



More information about the Java mailing list