Re: Re : Re : problem using gcj compiler

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

 



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.

[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