Welcome! Log In Create A New Profile

Advanced

Installing in 64 bit Ubuntu

Posted by Anonymous User 
Anonymous User
Installing in 64 bit Ubuntu
May 23, 2009 09:25AM
I'm running 64 bit Jaunty, and am having some problems installing the RepRap software. I did notice when I downloaded the zip file from SourceForge that it specified 'architecture' as x86, but on the offchance, I tried anyway. I fell at the first hurdle: running ./reprap results in the following:

Quote

java.lang.UnsatisfiedLinkError: /home/alex/Desktop/reprap-host-linux-20090508/librxtxSerial.so: /home/alex/Desktop/reprap-host-linux-20090508/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: /home/alex/Desktop/reprap-host-linux-20090508/librxtxSerial.so: /home/alex/Desktop/reprap-host-linux-20090508/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:1778)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1703)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1030)
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$9.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)


It seems that as I suspected, it doesn't like the fact that I'm running a 64 bit OS.

I suppose the crux of this post is the following:
- Does a compiled version exist for 64-bit linux?
- If not, can anyone gently nudge me towards how to compile the source for myself? (I am a (nearly graduated) 3rd year computer science student, however somehow compiling a big project like this is something that they don't seem to have bothered teaching us)

Thanks

Edited 2 time(s). Last edit at 05/23/2009 09:27AM by alexp.
Re: Installing in 64 bit Ubuntu
May 23, 2009 03:19PM
The java code is fine (it runs in a VM) but the problem is some of the java libraries used (java3D, rxtx) have C++ native libraries that link to 32-bit C libraries.

Look into the java3D and RXTX libraries and see if there are 64-bit versions, and install/compile them.

There isn't actually a 32/64bit for java code. it will compile to the same bytecode, just that the virtual machine program it runs on will be 32/64 bit (the sun package).


---
Reprapping blog and other rants: [renoirsrants.blogspot.com]
My Reprap: [sites.google.com]
Re: Installing in 64 bit Ubuntu
May 27, 2009 01:39PM
I had the same problem and ended up in compiling and running it in the 32 bit java version.
Re: Installing in 64 bit Ubuntu
June 22, 2009 02:43PM
joaz Wrote:
-------------------------------------------------------
> I had the same problem and ended up in compiling
> and running it in the 32 bit java version.


I took the same approach, these instructions for Ubuntu only took about 5-10 min, and it's all working fine.

[java.dzone.com]
Re: Installing in 64 bit Ubuntu
July 28, 2009 12:03AM
Has anyone running 64 bit Linux actually gotten the Reprap host software to work?

I have tried for too many hours, attempting everything from getting the 64 bit .so library files (results in a segfault in rxtx*.so) to attempting to install and use a 32 bit version of java with the ix86 reprap binary package. That dies with an "architecture word with mismatch" error (doesn't like the i386 libraries on my 64 bit machine).

*Sigh*

Any help would be cause for much worship. Thanks!

~Andy
Re: Installing in 64 bit Ubuntu
July 28, 2009 07:32AM
I'm using Ubuntu 9 64 bit with 32 bit java and it works fine. What Linux do you have?
Re: Installing in 64 bit Ubuntu
July 29, 2009 03:39AM
I am running a 64 bit version of Ubuntu Jaunty. How did you set up your software? Are you using the 32 bit binary package on sourceforge, and just have "update-alternatives" set to point to your 32 bit java? When I do that, it complains that the .so files in the 32 bit reprap host package are 32 bit and not 64 bit.

If you retrieved special 64 bit libraries, could you possibly send me a tar.gz (or zip) of your reprap-host directory with the libraries and everything? I don't know if it's a version mismatch or what, but my attempt produces a segmentation fault every time.

What java version do you have? What is your result of 'sudo update-alternatives --display java'? With a 32 bit version of Java, does that mean that you need a 32 bit version of Firefox in order to run java web apps in Firefox?

Thanks so much for your help!

~Andy
Re: Installing in 64 bit Ubuntu
July 29, 2009 06:15AM
I sounds like it is still the 64 bit Java being used.

Can you post the results of:
java -version
and
sudo update-alternatives --config java

I'm not at home right now but when I am I will post mine for comparison.

I don't know about java in firefox, I would personally consider not seeing java apps in firefox a feature smiling smiley
Re: Installing in 64 bit Ubuntu
July 29, 2009 02:29PM
Thanks for your help! I look forward to your postings when you get home!

For now, here is my java -version:
java version "1.6.0_14"
Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
Java HotSpot(TM) Client VM (build 14.0-b16, mixed mode, sharing)

And, my sudo update-alternatives --config java

There are 7 alternatives which provide `java'.

Selection Alternative
-----------------------------------------------
1 /usr/bin/gij-4.2
2 /usr/bin/gij-4.3
3 /usr/lib/jvm/java-gcj/jre/bin/java
4 /usr/lib/jvm/java-1.5.0-sun/jre/bin/java
5 /usr/lib/jvm/java-6-sun/jre/bin/java
+ 6 /usr/lib/jvm/java-6-openjdk/jre/bin/java
* 7 /usr/lib/j2sdk1.6-sun/bin/java

Press enter to keep the default[*], or type selection number: 7
Using '/usr/lib/j2sdk1.6-sun/bin/java' to provide 'java'.

Seven Java's is a lot. winking smiley

Just so you know, I believe the j2sdk1.6-sun alternative (the one I'm using) came from a binary file, downloaded from Sun's website, called jdk-6u14-linux-i586.bin.

What do you think? If you're baffled, like I am, I'm hoping a tar.gz of your reprap host directory (just to make sure we are working with the same stuff) and your java versions will help. I can then try to set up the exact same situation on my computer as it is on yours, and ultimately find out the problem by comparing the two situations.

Thanks so much for your help!

~Andy
Re: Installing in 64 bit Ubuntu
July 31, 2009 03:39PM
*bump* smiling smiley
Re: Installing in 64 bit Ubuntu
July 31, 2009 08:33PM
It looks like you have exactly the same Java setup as me:

java version "1.6.0_14"
Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
Java HotSpot(TM) Client VM (build 14.0-b16, mixed mode, sharing)

sudo update-alternatives --config java

There are 3 alternatives which provide `java'.

Selection Alternative
-----------------------------------------------
1 /usr/lib/jvm/java-6-sun/jre/bin/java
+ 2 /usr/lib/jvm/java-6-openjdk/jre/bin/java
* 3 /usr/lib/j2sdk1.6-sun/bin/java

Press enter to keep the default[*], or type selection number:


The host version I'm using is this one:
[sourceforge.net]

Is this the one you are using?

I just re-downloaded it to make sure my copy wasn't modified in any way, and the re-downloaded copy works for me.

It takes a full 30-40 seconds for the program to load but it opens and works in the end.
Re: Installing in 64 bit Ubuntu
September 13, 2009 07:19AM
Hi,
sorry to dig up this topic but I got it working with the 64bit Java under 64bit Ubuntu. (which I think is preferable).
1. Get the current Java JDK with the Synaptic Package Manager (in my case 1.6.0_16-b01)
2. replace the J3D files (jars and .so) in the rerap directory with the ones from the j3d-1_5_2-linux-amd64.zip from [java3d.dev.java.net]
3. replace the librxtxSerial.so with the 64Bit version by getting the libs via "apt-get install librxtx-java" and copying it from /usr/lib/librxtxSerial.so to the reprap directory (solution found here [www.arduino.cc])

Actually, it is exactly what DaveR suggested by his first reply, but i included the urls to find the 64bit libs.

Hope it helps smiling smiley
Re: Installing in 64 bit Ubuntu
September 22, 2009 08:28PM
I tried what you said above, but didnt work for me. However going to the /usr/lib64/librxtxSerial-2.1-7.so and copying that file to the reprap directory did solve the problem.
Was telling me beforehand that the librxtxSerial file was not in the java path.

Hope this helps anyone else in my position.
Re: Installing in 64 bit Ubuntu
November 29, 2009 12:08PM
Hi all,

I managed to make it work on Ubuntu 64 Jaunty by following Herald's instructions.
To amiller112, it is not librxtxSerial-2.1-7.so that I copied, but /usr/lib/librxtxSerial.so.

Thanks for all the info!
Re: Installing in 64 bit Ubuntu
January 09, 2010 03:11AM
FYI
/usr/lib/librxtxSerial.so

Doesn't exist with JDK installed, nor does it exist under the 64bit version either.
Re: Installing in 64 bit Ubuntu
January 09, 2010 01:07PM
sur mon ordi je le trouve sous :

/usr/lib/jvm/java-1.5.0.19/jre/lib/i386
Giles Bathgate
Re: Installing in 64 bit Ubuntu
January 15, 2010 05:48AM
I wrote a blog post about this, hope it helps

[gilesbathgate.blogspot.com]
Re: Installing in 64 bit Ubuntu
January 15, 2010 10:57AM
I wrote a blog post about this, hope it helps

Great! Want to paste it into the wiki? Just log in and click "edit". If you can't edit the page you want, create a new page.
GilesBathgate
Re: Installing in 64 bit Ubuntu
January 16, 2010 05:54AM
Well I put it here:

User Manual: Host Software

But it would be good if it could be linked from here

DriverSoftware Installation

which is the first site I came across when trying to install the software.
Re: Installing in 64 bit Ubuntu
February 05, 2010 02:11PM
Or maybe it should be written here:
[objects.reprap.org]
Re: Installing in 64 bit Ubuntu
February 22, 2010 05:59PM
Thanks for your help. I've installed reprap-mendel-20100105 on Ubuntu 910 amd64 with these 64bits libraries, and it works. But I can't transform a very simple stl file into gcode. After the processing of a few layers, I get this error:

Exception in thread "Producer" java.lang.OutOfMemoryError: Java heap space
	at java.lang.ref.Finalizer.register(Finalizer.java:72)
	at java.lang.Object.(Object.java:20)
	at org.reprap.geometry.polygons.Rr2Point.(Unknown Source)
	at org.reprap.geometry.polygons.Rr2Point.mul(Unknown Source)
	at org.reprap.geometry.polygons.Rr2Point.div(Unknown Source)
	at org.reprap.geometry.polygons.Rr2Point.norm(Unknown Source)
	at org.reprap.geometry.polygons.RrLine.norm(Unknown Source)
	at org.reprap.geometry.polygons.RrHalfPlane.(Unknown Source)
	at org.reprap.geometry.polygons.RrHalfPlane.(Unknown Source)
	at org.reprap.geometry.polygons.RrRectangle.wipe(Unknown Source)
	at org.reprap.geometry.polygons.RrCSGPolygon.lineIntersect_r(Unknown Source)
	at org.reprap.geometry.polygons.RrCSGPolygon.lineIntersect_r(Unknown Source)
	at org.reprap.geometry.polygons.RrCSGPolygon.lineIntersect_r(Unknown Source)
	at org.reprap.geometry.polygons.RrCSGPolygon.lineIntersect_r(Unknown Source)
	at org.reprap.geometry.polygons.RrCSGPolygon.lineIntersect_r(Unknown Source)
	at org.reprap.geometry.polygons.RrCSGPolygon.lineIntersect_r(Unknown Source)
	at org.reprap.geometry.polygons.RrCSGPolygon.lineIntersect_r(Unknown Source)
	at org.reprap.geometry.polygons.RrCSGPolygon.lineIntersect(Unknown Source)
	at org.reprap.geometry.polygons.RrCSGPolygon.hatch(Unknown Source)
	at org.reprap.geometry.polygons.RrCSGPolygonList.hatch(Unknown Source)
	at org.reprap.geometry.LayerProducer.(Unknown Source)
	at org.reprap.geometry.Producer.produceAdditiveTopDown(Unknown Source)
	at org.reprap.geometry.Producer.produce(Unknown Source)
	at org.reprap.Main$8.run(Unknown Source)

My computer has 2GB memory, which was 52% full only when it happened. What can I do?
Re: Installing in 64 bit Ubuntu
March 02, 2010 12:54AM
Thanks to Giles, it works for me somewhat in Linux.
This isn't my main OS, and i've got running right now
Ubuntu 9.1 64bit.

Just wondering if I have to down grade the Java version on this OS to 5.21, and how to go about that?

The error message I have is

DEBUG: The distribution preferences file contains:
 Extruder0_Purge(ms)
 Extruder0_ExtrusionPWM(0..1)
 Extruder2_Purge(ms)
 Extruder1_ExtrusionPWM(0..1)
 DumpY (mm)
 DumpX (mm)
 Extruder1_Purge(ms)
 Extruder2_ExtrusionPWM(0..1)
which are not in your preferences file. [0.006s/-1267508665845ms]
DEBUG: GCode opening port /dev/ttyUSB0 [0.302s/296ms]
Experimental:  JNI_OnLoad called.
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version   = RXTX-2.1-7
Error opening port: /dev/ttyUSB0
Xlib:  extension "GLX" missing on display ":0.0".
Java 3D ERROR : GLX extension is not supported
    GLX version 1.3 or higher is required

Once this is done, i'll see if I can get my Bluetooth going on it, just like I have on Windows

Thanks
Re: Installing in 64 bit Ubuntu
May 29, 2011 02:48PM
I know this is a year past, however I'm doing exactly this right now and thought I'd contribute a cent or two...

Quote
Harald
2. replace the J3D files (jars and .so) in the
rerap directory with the ones from the
j3d-1_5_2-linux-amd64.zip from
[java3d.dev.java.net]
Btw, this zip file unzips and has yet another zip file in it. Unzip that one, then take the .so and .jar's from this doubly-zipped archive and put in your reprap folder.

Quote
Harald
3. replace the librxtxSerial.so with the 64Bit
version by getting the libs via "apt-get install
librxtx-java" and copying it from
/usr/lib/librxtxSerial.so to the reprap directory
librxtxSerial.so seems to get installed in one of several places (possibly due to one of the many java's possible!) ... here's what I did to find it so I could copy it:
$ sudo updatedb
$ locate librxtxSerial.so
/home/chris/Desktop/reprap-mendel-20110509/src/lib/system-dependent/linux-i386/librxtxSerial.so
/usr/lib/jni/librxtxSerial.so
/usr/lib32/jni/librxtxSerial.so
In my case, it was in that jni folder.


My system's info (Dell D630 core2duo laptop):
$ cat /etc/issue.net
Ubuntu 10.10
$ uname -a
Linux outside 2.6.35-25-generic #44-Ubuntu SMP Fri Jan 21 17:40:44 UTC 2011 x86_64 GNU/Linux
$ java -version
java version "1.6.0_20"
OpenJDK Runtime Environment (IcedTea6 1.9.5) (6b20-1.9.5-0ubuntu1)
OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)

Hoping this helps the next linux guy to visit. smiling smiley
Chris
Re: Installing in 64 bit Ubuntu
September 07, 2011 09:37AM
Instructions to install RepRap host software on Ubuntu 11.04 using the native packages. These instructions should be identical for both 32-bit and 64-bit (I have the latter).

Install the following packages using apt-get or your favorite package manager:
- libjava3d-java
- librxtx-java

Remove all dll and so files from the reprap main directory as we want to use the system libs (optional):
rm -i *.dll *.so

Remove the archives we want to replace with system (optional):
rm -i j3dcore.jar j3dutils.jar vecmath.jar RXTXcomm.jar

Edit the 'reprap' script to point to the system jars for the archives we just removed:
E.g. RXTXcomm.jar becomes /usr/share/java/RXTXcomm.jar

Finally, modify the library search path (where the .so files are found) to point to the system ones;
replace in the java command '-Djava.library.path=.' with '-Djava.library.path="/usr/lib/jni/"'

The advantage of this approach: you get the correct libraries for your system for free, including updates to them.

Troubleshooting:
Quote

Exception in thread "RepRap" java.lang.NoClassDefFoundError: gnu/io/UnsupportedCommOperationException
You do not have RXTX installed or added the jar archive to your path.
Check if the file exists in '/usr/share/java' and whether you entered it correctly in the 'reprap' start script.

Quote

java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver
RXTX can not find the library (.so file). Make sure the library path is correct and replaced correctly in the java command.
Sorry, only registered users may post in this forum.

Click here to login