Bug 42405 - libgcj_bc.so.1 dependency causes gcj to fail
Summary: libgcj_bc.so.1 dependency causes gcj to fail
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: java (show other bugs)
Version: unknown
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-17 14:36 UTC by John Poole
Modified: 2009-12-17 17:18 UTC (History)
2 users (show)

See Also:
Host: armv5tel-unknown -linux-gnueabi
Target: armv5tel-unknown -linux-gnueabi
Build: armv5tel-unknown -linux-gnueabi
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Poole 2009-12-17 14:36:34 UTC
I'm trying to get java to run on the ARM processor based SheevaPlug.  I am compiling on the SheevaPlug, itself.

At /mnt/seagate2/work/gjc/trunk, I pulled from Subversion:
  plug trunk # svn   info                                                           
  Path:      .                                                                         
  URL: svn://gcc.gnu.org/svn/gcc/trunk                                            
  Repository Root: svn://gcc.gnu.org/svn/gcc                                      
  Repository UUID: 138bc75d-0d04-0410-961f-82ee72b054a4                           
  Revision: 155206                                                                
  Node Kind: directory                                                            
  Schedule: normal                                                                
  Last Changed Author: bje                                                        
  Last Changed Rev: 155206                                                        
  Last Changed Date: 2009-12-13 21:06:50 -0800 (Sun, 13 Dec 2009)                 
                                                                                
  plug trunk # 

I had to run the .../contrib/download_ecj script to install the ecj.jar into the trunk directory, I then ran the configuration again so the ecj.jar would be staged into my target for "make ... install".

Now, when I try to compile, it looks like a libgcj_bc.so.1 is required and not included or found:

plug bin # ./gcj -v -I /usr/local/gcj/usr/local/share/java/libgcj-4.5.0.jar /var
/work/gcj/HelloWorld.java 
...
Using built-in specs.                                                           
Reading specs from /usr/local/gcj/usr/local/bin/../lib/gcc/armv5tel-unknown-linu
x-gnueabi/4.5.0/../../../libgcj.spec                                            
rename spec startfile to startfileorig                                          
rename spec lib to liborig                                                      
COLLECT_GCC=./gcj                                                               
COLLECT_LTO_WRAPPER=/usr/local/gcj/usr/local/bin/../libexec/gcc/armv5tel-unknown
-linux-gnueabi/4.5.0/lto-wrapper                                                
Target: armv5tel-unknown-linux-gnueabi                                          
Configured with: ../trunk/configure --enable-languages=java : (reconfigured) ../
trunk/configure --enable-languages=java                                         
Thread model: posix                                                             
gcc version 4.5.0 20091214 (experimental) (GCC)                                 
COLLECT_GCC_OPTIONS='-fsaw-java-file' '-v' '-fbootclasspath=/usr/local/gcj/usr/l
ocal/share/java/libgcj-4.5.0.jar:./:/usr/local/share/java/libgcj-4.5.0.jar' '-g1
' '-shared-libgcc'                                                              
 /usr/local/gcj/usr/local/bin/../libexec/gcc/armv5tel-unknown-linux-gnueabi/4.5.
0/ecj1 /var/work/gcj/HelloWorld.java -g1 -fbootclasspath=/usr/local/gcj/usr/loca
l/share/java/libgcj-4.5.0.jar:./:/usr/local/share/java/libgcj-4.5.0.jar -g1 -fso
urce=1.5 -ftarget=1.5 -fzip-dependency /tmp/ccApA393.zip -fzip-target /tmp/cciqI
t8X.jar                                                                         
/usr/local/gcj/usr/local/bin/../libexec/gcc/armv5tel-unknown-linux-gnueabi/4.5.0
/ecj1: error while loading shared libraries: libgcj_bc.so.1: cannot open shared 
object file: No such file or directory                                          
plug bin #         

From reading bugs returned on search for "libgcj_bc.so.1" it looks like there is a dependency comes from the ecj.jar  

What can I do to move forward and compile java with my freshly built gcj? I'm basically blocked, but am unfamiliar with your bug categorization, so I've marked this bug as "normal"
Comment 1 Richard Biener 2009-12-17 16:22:16 UTC
Make sure your install library path is in LD_LIBRARY_PATH.
Comment 2 John Poole 2009-12-17 17:18:33 UTC
Thank you.  This worked:

export LD_LIBRARY_PATH=/usr/local/gcj/usr/local/lib
then
plug bin # ./gcj -v -I /usr/local/gcj/usr/local/share/java/libgcj-4.5.0.jar /var
/work/gcj/HelloWorld.java