Welcome! Log In Create A New Profile

Advanced

Can't run reprap in Fedora 64 (Java problem)

Posted by wutzu 
Can't run reprap in Fedora 64 (Java problem)
July 22, 2010 12:54AM
I followed the install instructions here and when I run reprap, the below is what I get.

[[email protected] reprap-mendel-20100719]# reprap
java.lang.UnsatisfiedLinkError: /usr/local/reprap-mendel-20100719/librxtxSerial.so: /usr/local/reprap-mendel-20100719/librxtxSerial.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch) thrown while loading gnu.io.RXTXCommDriver
Exception in thread "RepRap" java.lang.UnsatisfiedLinkError: /usr/local/reprap-mendel-20100719/librxtxSerial.so: /usr/local/reprap-mendel-20100719/librxtxSerial.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)
	at java.lang.ClassLoader$NativeLibrary.load(Native Method)
	at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1750)
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1675)
	at java.lang.Runtime.loadLibrary0(Runtime.java:840)
	at java.lang.System.loadLibrary(System.java:1047)
	at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:83)
	at org.reprap.comms.GCodeReaderAndWriter.openSerialConnection(Unknown Source)
	at org.reprap.comms.GCodeReaderAndWriter.(Unknown Source)
	at org.reprap.machines.GCodeRepRap.(Unknown Source)
	at org.reprap.machines.MachineFactory.create(Unknown Source)
	at org.reprap.Main.(Unknown Source)
	at org.reprap.Main$12.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:226)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:602)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)

Am I totally screwed trying to run reprap on a 64bit system? Any help would be appreciated
Re: Can't run reprap in Fedora 64 (Java problem)
July 22, 2010 04:35AM
Do you have librxtx installed, and if so where is it installed. You should then update the script that you are running to include an option on the java command to include -Djava.library.path=. So if it is installed in in /usr/lib/jni you would add -Djava.library.path=/usr/lib/jni/ to the java command.

You will of course need a 64 bit version of librxtx.

David
Re: Can't run reprap in Fedora 64 (Java problem)
July 22, 2010 05:06AM
Thanks so far.

I'm now getting a much shorter error message, basically the --man for java.

the reprap script i'm running is this:
#!/bin/sh
cd /usr/local/reprap-mendel-20100719
./reprap
which is located in /usr/local/bin per the instructions. I'm not sure where in this script (or if it's this script) in which I should put the -Djava.library.path= argument. rxtx is all in /usr/lib64/rxtx per rpm -ql rxtx, so that becomes the location?
Re: Can't run reprap in Fedora 64 (Java problem)
July 22, 2010 06:39AM
There's no need to edit scripts. Here's an explanation, replace "sudo apt-get" with your distro's package manager command: [reprap.org]


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Can't run reprap in Fedora 64 (Java problem)
July 22, 2010 05:11PM
Installing java3d via yum does not work.

[[email protected] lib]# yum install libjava3d-jni
Loaded plugins: presto, refresh-packagekit
Setting up Install Process
No package libjava3d-jni available.
Nothing to do

Any alternate methods of installation?
Re: Can't run reprap in Fedora 64 (Java problem)
July 23, 2010 05:31AM
Re: Can't run reprap in Fedora 64 (Java problem)
July 24, 2010 07:09PM
I got the j3d .jar files and put them in /usr/share/java. When I try to run reprap, I still get what looks like java --man. Did I put it in the wrong place, should I not be running a script, or running a different one?
Re: Can't run reprap in Fedora 64 (Java problem)
July 25, 2010 06:39AM
Either learn how the CLASSPATH shell variable works and edit the "reprap" shell script accordingly, or move those libraries next to this shell script, replacing the original ones.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Can't run reprap in Fedora 64 (Java problem)
July 26, 2010 12:50AM
Here's my reprap shell script, which is unaltered afaik.

#!/bin/bash
# reprap-host -- runs RepRap Java host with an appropriate classpath

REPRAP_RAM_SIZE=1024M                # Amount of RAM to allow Java VM to use
REPRAP_DIR=`dirname $0`       # reprap.jar, jni libs and stl file

cd $REPRAP_DIR

# build up classpath
# when we move to OpenJDK/Java-6 these next few can be replaced with wildcard
# *.jar and we will not need swing-layout any more.
CLASSPATH=./reprap.jar
CLASSPATH=$CLASSPATH:./j3dcore.jar
CLASSPATH=$CLASSPATH:./j3d-org-java3d-all.jar
CLASSPATH=$CLASSPATH:./j3dutils.jar
CLASSPATH=$CLASSPATH:./vecmath.jar
CLASSPATH=$CLASSPATH:./RXTXcomm.jar
CLASSPATH=$CLASSPATH:./swing-layout-1.0.3.jar
CLASSPATH=$CLASSPATH:.

# invoke the code
java -cp $CLASSPATH -Xmx$REPRAP_RAM_SIZE -Djava.library.path=/usr/lib/jni/

I put all the J3d .jar files into /usr/local/reprap, and they included the jars referenced in the shell script above. I still get the same java error as before.

[[email protected] reprap-mendel-20100719]# ./reprap
Usage: java [-options] class [args...]
           (to execute a class)
   or  java [-options] -jar jarfile [args...]
           (to execute a jar file)
where options include:
    -d32	  use a 32-bit data model if available
    -d64	  use a 64-bit data model if available
    -server	  to select the "server" VM
                  The default VM is server.

    -cp 
    -classpath 
                  A : separated list of directories, JAR archives,
                  and ZIP archives to search for class files.
    -D=
                  set a system property
    -verbose[:class|gc|jni]
                  enable verbose output
    -version      print product version and exit
    -version:
                  require the specified version to run
    -showversion  print product version and continue
    -jre-restrict-search | -jre-no-restrict-search
                  include/exclude user private JREs in the version search
    -? -help      print this help message
    -X            print help on non-standard options
    -ea[:...|:]
    -enableassertions[:...|:]
                  enable assertions with specified granularity
    -da[:...|:]
    -disableassertions[:...|:]
                  disable assertions with specified granularity
    -esa | -enablesystemassertions
                  enable system assertions
    -dsa | -disablesystemassertions
                  disable system assertions
    -agentlib:[=]
                  load native agent library , e.g. -agentlib:hprof
                  see also, -agentlib:jdwp=help and -agentlib:hprof=help
    -agentpath:[=]
                  load native agent library by full pathname
    -javaagent:[=]
                  load Java programming language agent, see java.lang.instrument
    -splash:
                  show splash screen with specified image
See [java.sun.com] for more details.

What gives? What have I missed?
Re: Can't run reprap in Fedora 64 (Java problem)
July 26, 2010 06:46AM
Looks to me like the -Xmx$REPRAP_RAM_SIZE parameter is not compatible with your version of Java. Try removing it from the command line.


[www.hydraraptor.blogspot.com]
There appears to be an error in the 64 bit Linux install instructions - I was getting precisely the same error, and found that there's a missing subdirectory in the creation of the second symbolic link.

Rather than
ln -sf /usr/lib/librxtxSerial.so .
you might try
ln -sf /usr/lib/jni/librxtxSerial.so .

This did allow the software to start successfully on a sid 64 bit Linux machine

good luck!
Sorry, only registered users may post in this forum.

Click here to login