public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* can not find jc1 gcj or jvgenmain after gcc install
@ 2010-09-13 16:13 charfi asma
  2010-09-13 17:19 ` Andrew Haley
  0 siblings, 1 reply; 8+ messages in thread
From: charfi asma @ 2010-09-13 16:13 UTC (permalink / raw)
  To: gcc-help

Hello,

I have pb with the java fe

I installed gcc 4.4.1 fron source and current gcc version from git ($ git clone 
git://crules.org/git/gcc-dev.git) but in both versions I can not compile java 
files

I looked for the java compiler gcj but I do not find an executable called gcj or 
jc1 (just like g++ or cc1plus for c++ front end)
Is there any configuration option to well install java fe other than 
--enable-languages=java ?

when I compile java file using gcj -save-temps Hello.java --main=Hello -v 2>&1 | 
grep ecj I get an empty .jar

[charfi@is010178 Hello]$ which gcj
which: no gcj in 
(/usr/bin:/bin:/usr/local/bin:/usr/X11R6/bin/:/usr/games:/usr/lib/qt4/bin:/export/home/charfi/bin:/usr/bin)



[charfi@is010178 Hello]$ which g++
/usr/bin/g++

thanks



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: can not find jc1 gcj or jvgenmain after gcc install
  2010-09-13 16:13 can not find jc1 gcj or jvgenmain after gcc install charfi asma
@ 2010-09-13 17:19 ` Andrew Haley
  2010-09-14 12:04   ` Re : " charfi asma
  0 siblings, 1 reply; 8+ messages in thread
From: Andrew Haley @ 2010-09-13 17:19 UTC (permalink / raw)
  To: gcc-help

On 09/13/2010 05:13 PM, charfi asma wrote:
> Hello,
> 
> I have pb with the java fe
> 
> I installed gcc 4.4.1 fron source and current gcc version from git ($ git clone 
> git://crules.org/git/gcc-dev.git) but in both versions I can not compile java 
> files
> 
> I looked for the java compiler gcj but I do not find an executable called gcj or 
> jc1 (just like g++ or cc1plus for c++ front end)
> Is there any configuration option to well install java fe other than 
> --enable-languages=java ?
> 
> when I compile java file using gcj -save-temps Hello.java --main=Hello -v 2>&1 | 
> grep ecj I get an empty .jar
> 
> [charfi@is010178 Hello]$ which gcj
> which: no gcj in 
> (/usr/bin:/bin:/usr/local/bin:/usr/X11R6/bin/:/usr/games:/usr/lib/qt4/bin:/export/home/charfi/bin:/usr/bin)
> 
> 
> 
> [charfi@is010178 Hello]$ which g++
> /usr/bin/g++

You need to tell us exactly what you did.  What commands, configure args,
and so on, so that someone can duplicate what you did.

Andrew.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re : can not find jc1 gcj or jvgenmain after gcc install
  2010-09-13 17:19 ` Andrew Haley
@ 2010-09-14 12:04   ` charfi asma
  2010-09-14 13:56     ` Andrew Haley
  0 siblings, 1 reply; 8+ messages in thread
From: charfi asma @ 2010-09-14 12:04 UTC (permalink / raw)
  To: Andrew Haley; +Cc: gcc-help

Hello,

this is exactly what I did to compile Hello.java using GCJ 

1. downlad a release from the GCC web site: 
2. extract the bz2 file :   # tar -xvjf gcc-4.5.1.tar.bz2
3.  sh ./download_prerequisites  after downlowd from   
http://gcc.gnu.org/svn/gcc/trunk/contrib/download_prerequisites 

4. # mkdir build_java
5. # cd build_java/
6. # ../gcc-4.5.1/configure --enable-languages=c,c++,java --prefix=/usr/local2
7. # make
8. # make install
9. # /usr/local2/bin/gcj -save-temps Hello.java --main=Hello -v 2>&1 | grep ecj

and I get this error:

ecj1 Hello.java -g1 -fbootclasspath=./:/usr/local2/share/java/libgcj-4.5.1.jar 
-g1 -fsource=1.5 -ftarget=1.5 -fzip-dependency Hello.zip -fzip-target Hello.jar
gcj: error trying to exec 'ecj1': execvp: Aucun fichier ou dossier de ce type

info about my platform:

# uname -a
Linux is010178 2.6.31.6-server-1mnb #1 SMP Tue Dec 8 16:48:07 EST 2009 i686 
Intel(R) Core(TM)2 Duo CPU     P8400  @ 2.26GHz GNU/Linux

Thanks

Asma



----- Message d'origine ----
De : Andrew Haley <aph@redhat.com>
À : gcc-help@gcc.gnu.org
Envoyé le : Lun 13 septembre 2010, 19h 18min 54s
Objet : Re: can not find jc1 gcj or jvgenmain after gcc install

On 09/13/2010 05:13 PM, charfi asma wrote:
> Hello,
> 
> I have pb with the java fe
> 
> I installed gcc 4.4.1 fron source and current gcc version from git ($ git clone 
>
> git://crules.org/git/gcc-dev.git) but in both versions I can not compile java 
> files
> 
> I looked for the java compiler gcj but I do not find an executable called gcj 
>or 
>
> jc1 (just like g++ or cc1plus for c++ front end)
> Is there any configuration option to well install java fe other than 
> --enable-languages=java ?
> 
> when I compile java file using gcj -save-temps Hello.java --main=Hello -v 2>&1 
>| 
>
> grep ecj I get an empty .jar
> 
> [charfi@is010178 Hello]$ which gcj
> which: no gcj in 
>(/usr/bin:/bin:/usr/local/bin:/usr/X11R6/bin/:/usr/games:/usr/lib/qt4/bin:/export/home/charfi/bin:/usr/bin)
>)
> 
> 
> 
> [charfi@is010178 Hello]$ which g++
> /usr/bin/g++

You need to tell us exactly what you did.  What commands, configure args,
and so on, so that someone can duplicate what you did.

Andrew.




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Re : can not find jc1 gcj or jvgenmain after gcc install
  2010-09-14 12:04   ` Re : " charfi asma
@ 2010-09-14 13:56     ` Andrew Haley
  2010-09-14 16:16       ` Re : " charfi asma
  0 siblings, 1 reply; 8+ messages in thread
From: Andrew Haley @ 2010-09-14 13:56 UTC (permalink / raw)
  To: charfi asma; +Cc: gcc-help

On 09/14/2010 01:03 PM, charfi asma wrote:

> this is exactly what I did to compile Hello.java using GCJ 
> 
> 1. downlad a release from the GCC web site: 
> 2. extract the bz2 file :   # tar -xvjf gcc-4.5.1.tar.bz2
> 3.  sh ./download_prerequisites  after downlowd from   
> http://gcc.gnu.org/svn/gcc/trunk/contrib/download_prerequisites 
> 
> 4. # mkdir build_java
> 5. # cd build_java/
> 6. # ../gcc-4.5.1/configure --enable-languages=c,c++,java --prefix=/usr/local2
> 7. # make
> 8. # make install
> 9. # /usr/local2/bin/gcj -save-temps Hello.java --main=Hello -v 2>&1 | grep ecj
> 
> and I get this error:
> 
> ecj1 Hello.java -g1 -fbootclasspath=./:/usr/local2/share/java/libgcj-4.5.1.jar 
> -g1 -fsource=1.5 -ftarget=1.5 -fzip-dependency Hello.zip -fzip-target Hello.jar
> gcj: error trying to exec 'ecj1': execvp: Aucun fichier ou dossier de ce type
> 
> info about my platform:
> 
> # uname -a
> Linux is010178 2.6.31.6-server-1mnb #1 SMP Tue Dec 8 16:48:07 EST 2009 i686 
> Intel(R) Core(TM)2 Duo CPU     P8400  @ 2.26GHz GNU/Linux

Run contrib/download_ecj and rebuild libgcj.

Andrew.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re : Re : can not find jc1 gcj or jvgenmain after gcc install
  2010-09-14 13:56     ` Andrew Haley
@ 2010-09-14 16:16       ` charfi asma
  2010-09-14 16:37         ` Andrew Haley
  0 siblings, 1 reply; 8+ messages in thread
From: charfi asma @ 2010-09-14 16:16 UTC (permalink / raw)
  To: Andrew Haley; +Cc: gcc-help

Hello,

I run the contrib/download_ecj and rebuilt the java fe 

this time I get this new error when calling : /usr/local2/bin/gcj -save-temps 
Hello.java --main=Hello -v 2>&1 | grep ecj

/usr/local2/libexec/gcc/i686-pc-linux-gnu/4.5.1/ecj1 Hello.java -g1 
-fbootclasspath=./:/usr/local2/share/java/libgcj-4.5.1.jar -g1 -fsource=1.5 
-ftarget=1.5 -fzip-dependency Hello.zip -fzip-target Hello.jar
/usr/local2/libexec/gcc/i686-pc-linux-gnu/4.5.1/ecj1: error while loading shared 
libraries: libgcj_bc.so.1: cannot open shared object file: No such file or 
directory

I think that I did not well rebuild the libgcj, can you specify the instructions 
to do that ?

thank you very much

Asma





----- Message d'origine ----
De : Andrew Haley <aph@redhat.com>
À : charfi asma <charfiasma@yahoo.fr>
Cc : gcc-help@gcc.gnu.org
Envoyé le : Mar 14 septembre 2010, 15h 56min 11s
Objet : Re: Re : can not find jc1 gcj or jvgenmain after gcc install

On 09/14/2010 01:03 PM, charfi asma wrote:

> this is exactly what I did to compile Hello.java using GCJ 
> 
> 1. downlad a release from the GCC web site: 
> 2. extract the bz2 file :   # tar -xvjf gcc-4.5.1.tar.bz2
> 3.  sh ./download_prerequisites  after downlowd from  
> http://gcc.gnu.org/svn/gcc/trunk/contrib/download_prerequisites 
> 
> 4. # mkdir build_java
> 5. # cd build_java/
> 6. # ../gcc-4.5.1/configure --enable-languages=c,c++,java --prefix=/usr/local2
> 7. # make
> 8. # make install
> 9. # /usr/local2/bin/gcj -save-temps Hello.java --main=Hello -v 2>&1 | grep 
ecj
> 
> and I get this error:
> 
> ecj1 Hello.java -g1 -fbootclasspath=./:/usr/local2/share/java/libgcj-4.5.1.jar 

> -g1 -fsource=1.5 -ftarget=1.5 -fzip-dependency Hello.zip -fzip-target 
Hello.jar
> gcj: error trying to exec 'ecj1': execvp: Aucun fichier ou dossier de ce type
> 
> info about my platform:
> 
> # uname -a
> Linux is010178 2.6.31.6-server-1mnb #1 SMP Tue Dec 8 16:48:07 EST 2009 i686 
> Intel(R) Core(TM)2 Duo CPU     P8400  @ 2.26GHz GNU/Linux

Run contrib/download_ecj and rebuild libgcj.

Andrew.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Re : Re : can not find jc1 gcj or jvgenmain after gcc install
  2010-09-14 16:16       ` Re : " charfi asma
@ 2010-09-14 16:37         ` Andrew Haley
  2010-09-15 11:26           ` Re : " charfi asma
  0 siblings, 1 reply; 8+ messages in thread
From: Andrew Haley @ 2010-09-14 16:37 UTC (permalink / raw)
  To: charfi asma; +Cc: gcc-help

On 09/14/2010 05:16 PM, charfi asma wrote:
> Hello,
> 
> I run the contrib/download_ecj and rebuilt the java fe 
> 
> this time I get this new error when calling : /usr/local2/bin/gcj -save-temps 
> Hello.java --main=Hello -v 2>&1 | grep ecj
> 
> /usr/local2/libexec/gcc/i686-pc-linux-gnu/4.5.1/ecj1 Hello.java -g1 
> -fbootclasspath=./:/usr/local2/share/java/libgcj-4.5.1.jar -g1 -fsource=1.5 
> -ftarget=1.5 -fzip-dependency Hello.zip -fzip-target Hello.jar
> /usr/local2/libexec/gcc/i686-pc-linux-gnu/4.5.1/ecj1: error while loading shared 
> libraries: libgcj_bc.so.1: cannot open shared object file: No such file or 
> directory
> 
> I think that I did not well rebuild the libgcj, can you specify the instructions 
> to do that ?

Try

ldd /usr/local2/libexec/gcc/i686-pc-linux-gnu/4.5.1/ecj1

LD_LIBRARY_PATH problems?  Maybe LD_LIBRARY_PATH doesn't include the
dir that contains libgcj_bc.so.1?

Andrew.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re : Re : Re : can not find jc1 gcj or jvgenmain after gcc install
  2010-09-14 16:37         ` Andrew Haley
@ 2010-09-15 11:26           ` charfi asma
  2010-09-15 11:40             ` Andrew Haley
  0 siblings, 1 reply; 8+ messages in thread
From: charfi asma @ 2010-09-15 11:26 UTC (permalink / raw)
  To: Andrew Haley; +Cc: gcc-help

Hello,

I finally can compile a java file using GCJ ;) thanks Andrew ;)

it was exactly what Andrew said: the LD_LIBRARY_PATH environment variable 
doesn't include the dir that contains libgcj_bc.so.1.
it is even not created, so I added it to other env variables and I added the 
/usr/local2/lib to its value.

but is that normal ?
why should I create alone the variable and specify the path of libgcj_bc.so.1, 
why gcc does not do everything alone when installing it ?

Asma





----- Message d'origine ----
De : Andrew Haley <aph@redhat.com>
À : charfi asma <charfiasma@yahoo.fr>
Cc : gcc-help@gcc.gnu.org
Envoyé le : Mar 14 septembre 2010, 18h 37min 26s
Objet : Re: Re : Re : can not find jc1 gcj or jvgenmain after gcc install

On 09/14/2010 05:16 PM, charfi asma wrote:
> Hello,
> 
> I run the contrib/download_ecj and rebuilt the java fe 
> 
> this time I get this new error when calling : /usr/local2/bin/gcj -save-temps 
> Hello.java --main=Hello -v 2>&1 | grep ecj
> 
> /usr/local2/libexec/gcc/i686-pc-linux-gnu/4.5.1/ecj1 Hello.java -g1 
> -fbootclasspath=./:/usr/local2/share/java/libgcj-4.5.1.jar -g1 -fsource=1.5 
> -ftarget=1.5 -fzip-dependency Hello.zip -fzip-target Hello.jar
> /usr/local2/libexec/gcc/i686-pc-linux-gnu/4.5.1/ecj1: error while loading 
>shared 
>
> libraries: libgcj_bc.so.1: cannot open shared object file: No such file or 
> directory
> 
> I think that I did not well rebuild the libgcj, can you specify the 
>instructions 
>
> to do that ?

Try

ldd /usr/local2/libexec/gcc/i686-pc-linux-gnu/4.5.1/ecj1

LD_LIBRARY_PATH problems?  Maybe LD_LIBRARY_PATH doesn't include the
dir that contains libgcj_bc.so.1?

Andrew.




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Re : Re : Re : can not find jc1 gcj or jvgenmain after gcc install
  2010-09-15 11:26           ` Re : " charfi asma
@ 2010-09-15 11:40             ` Andrew Haley
  0 siblings, 0 replies; 8+ messages in thread
From: Andrew Haley @ 2010-09-15 11:40 UTC (permalink / raw)
  To: charfi asma; +Cc: gcc-help

On 09/15/2010 12:25 PM, charfi asma wrote:

> I finally can compile a java file using GCJ ;) thanks Andrew ;)
> 
> it was exactly what Andrew said: the LD_LIBRARY_PATH environment variable 
> doesn't include the dir that contains libgcj_bc.so.1.
> it is even not created, so I added it to other env variables and I added the 
> /usr/local2/lib to its value.
> 

Firstly, please don't top-post on gcc-help.

> but is that normal ?

Yes.

> why should I create alone the variable and specify the path of libgcj_bc.so.1,

Because you installed gcj in a non-standard place, /usr/local2.  The runtime
linker looks in some standard places, but it does not know where you put
your libraries.

> why gcc does not do everything alone when installing it ?

I don't understand this question.

Andrew.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-09-15 11:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-13 16:13 can not find jc1 gcj or jvgenmain after gcc install charfi asma
2010-09-13 17:19 ` Andrew Haley
2010-09-14 12:04   ` Re : " charfi asma
2010-09-14 13:56     ` Andrew Haley
2010-09-14 16:16       ` Re : " charfi asma
2010-09-14 16:37         ` Andrew Haley
2010-09-15 11:26           ` Re : " charfi asma
2010-09-15 11:40             ` Andrew Haley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).