Tr : Re : Re : Re : Re : problem using gcj compiler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 







----- Message transféré ----
De : charfi asma <charfiasma@xxxxxxxx>
À : Andrew Haley <aph@xxxxxxxxxx>
Envoyé le : Jeudi, 18 Juin 2009, 12h42mn 26s
Objet : Re : Re : Re : Re : problem using gcj compiler





----- Message d'origine ----
De : Andrew Haley <aph@xxxxxxxxxx>
À : charfi asma <charfiasma@xxxxxxxx>
Envoyé le : Jeudi, 18 Juin 2009, 12h07mn 07s
Objet : Re: Re : Re : Re : problem using gcj compiler

charfi asma wrote:
> 
> 
> 
> 
> ----- Message d'origine ----
> De : Andrew Haley <aph@xxxxxxxxxx>
> À : charfi asma <charfiasma@xxxxxxxx>
> Cc : gcc-help@xxxxxxxxxxx
> Envoyé le : Jeudi, 18 Juin 2009, 11h11mn 22s
> Objet : Re: Re : Re : problem using gcj compiler
> 
> charfi asma wrote:
>>
>>
>>
>> ----- Message d'origine ----
>> De : Andrew Haley <aph@xxxxxxxxxx>
>> À : charfi asma <charfiasma@xxxxxxxx>
>> Cc : gcc-help@xxxxxxxxxxx
>> Envoyé le : Jeudi, 18 Juin 2009, 10h46mn 09s
>> Objet : Re: Re : problem using gcj compiler
>>
>> charfi asma wrote:
>>>> I think it is related to the libgcj but I don't know how to install it (I found in the net that I should install it when I install my gcc by modifiying configure.in
>>>> but I have no configure file.
>>>>
>>>> I update my gcc but I still have the same problem.
>>> The gcj library is probably a separate package that you have not installed.
>>> You need to use your operating system's package installer.
>>>> thank you for your help.
>>> I reinstalled all required package for gcj (I tapped rpmdrake and I update all gcj packages : libgcj-devel, libgcj-static-devel, libgcj9, libgcj9-base, and libgcj9-src)
>>> but I still have the same error.
>>> note that when I compile without link (-S) it works. it generates Hello.s
>> OK.  Let's see the source of Hello.java.
>>
>> the Hello.java contains only a print of "Hello world"
>>
>> public class Hello 
>> {
>>     public static void main(String[] args) 
>>     {
>>         System.out.println("Hello world");
>>
>>     }
>> }
>>
>> I think also that the source of Hello.s generated from  gcj Hello.java -S command is not the appropriate assembly:
>> here is the source of  Hello.s
>>
>>     .file    "ccSrCfnS.jar"
>>     .section    .debug_abbrev,"",@progbits
>> .Ldebug_abbrev0:
>>     .section    .debug_info,"",@progbits
>> .Ldebug_info0:
>>     .section    .debug_line,"",@progbits
>> .Ldebug_line0:
>>     .text
>> .Ltext0:
>> .Letext0:
>>     .section    .debug_abbrev
>>     .byte    0x0
>>     .ident    "GCC: (GNU) 4.3.2"
>>     .section    .note.GNU-stack,"",@progbits
> 
> You're right, it isn't.
> 
> Try this:
> 
> $ gcj -save-temps Hello.java --main=Hello -v 2>&1 | grep ecj
> Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-languages=c,c++,objc,obj-c++,java,fortran --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-tune=generic --with-arch_32=i586 --build=x86_64-redhat-linux
> /usr/libexec/gcc/x86_64-redhat-linux/4.4.0/ecj1 Hello.java -g1 -fbootclasspath=./:/usr/share/java/libgcj-4.4.0.jar -g1 -fsource=1.5 -ftarget=1.5 -fzip-dependency Hello.zip -fzip-target Hello.jar
> 
> $ ls
> 
> a.out*    Hello.jar  Hello.java  Hellomain.i  Hellomain.o  Hellomain.s  Hello.o  Hello.s    Hello.zip
> 
> $ unzip -l Hello.jar
> Archive:  Hello.jar
>   Length     Date   Time    Name
> --------    ----   ----    ----
>       415  06-18-09 10:07   Hello.class
> --------                   -------
>       415                   1 file
> 
> Andrew.
> 
> I try it here is the result :

Where is the ls?  Where is the unzip -l Hello.jar ?

> [charfi@is010178 hello_JAVA]$ gcj -save-temps Hello.java --main=Hello 
>
> Hellomain.o: In function `main':
> Hellomain.i:(.text+0x2b): undefined reference to `Hello::class$'
> collect2: ld a retourné 1 code d'état d'exécution
> 
> [charfi@is010178 hello_JAVA]$ gcj -save-temps Hello.java --main=Hello -v 2>&1 | grep ecj
> 
> Ambiguous output redirect.

I don't know what more I can do.  First, your gcj is broken, now even
your shell is broken.  Are you sure that your computer works at all?

Andrew.

My computer works perfectly and I have no problem with my shell. I can compile c++ code with g++ but the problem comes from gcj...
thank you for your help. I will compile my java file with javac it is much better than gcj

for the ls and the unzip -l Hello.jar, it generate an empty hello.jar

[charfi@is010178 hello_JAVA]$ ls
Hello.jar  Hello.java  Hellomain.i  Hellomain.s  Hello.o  Hello.s  Hello.zip    

[charfi@is010178 hello_JAVA]$ unzip -l Hello.jar
Archive:  Hello.jar
warning [Hello.jar]:  zipfile is empty

thank you again.





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux