Author Topic: Off topic ... Some help with Linux please  (Read 14509 times)

Offline Julian

  • Administrator
  • Oil baron
  • *******
  • Posts: 6391
    • Used Cooking Oil Collection website
  • Location: East Surrey, UK.
Re: Off topic ... Some help with Linux please
« Reply #30 on: December 10, 2013, 10:03:04 AM »
Nothing seem to happen with the first command ...

Code: [Select]
julian@julian-HP:~$ cd ~/reprap/
julian@julian-HP:~/reprap$


Followed the second bit and got this, looks like it didn't do too much, might they have been installed previously?

Code: [Select]
julian@julian-HP:~$ sudo apt-get install libjava3d-jni
[sudo] password for julian:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libjava3d-jni is already the newest version.
libjava3d-jni set to manually installed.
The following packages were automatically installed and are no longer required:
  libpcsclite1:i386 libnss3:i386 linux-headers-3.2.0-56
  icedtea-6-jre-cacao:i386 openjdk-6-jre-headless:i386
  icedtea-6-jre-jamvm:i386 linux-headers-3.2.0-56-generic libnspr4:i386
  libxss1 libnss3-1d:i386
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 28 not upgraded.
julian@julian-HP:~$ ln -sf /usr/lib/jni/libj3dcore-ogl.so
julian@julian-HP:~$

Used Cooking Oil Collection website ... http://www.surreyusedcookingoilcollection.palmergroup.co.uk

Offline therecklessengineer

  • Administrator
  • Oil obsessive
  • *****
  • Posts: 648
Re: Off topic ... Some help with Linux please
« Reply #31 on: December 10, 2013, 10:06:03 AM »
Nothing seem to happen with the first command ...

That's fine. We're moving into the reprap directory.

The second shows it's already installed. What happens if you try the third? And then try running it?

Offline Julian

  • Administrator
  • Oil baron
  • *******
  • Posts: 6391
    • Used Cooking Oil Collection website
  • Location: East Surrey, UK.
Re: Off topic ... Some help with Linux please
« Reply #32 on: December 10, 2013, 10:06:19 AM »
I have (I think)

At one point I found a command to check, something like "java version" which returned stuff saying JDK was installed.

Should I try
Code: [Select]
sudo apt-get install openjdk-7-jre anyway
Used Cooking Oil Collection website ... http://www.surreyusedcookingoilcollection.palmergroup.co.uk

Offline therecklessengineer

  • Administrator
  • Oil obsessive
  • *****
  • Posts: 648
Re: Off topic ... Some help with Linux please
« Reply #33 on: December 10, 2013, 10:08:00 AM »
Nope,

Just this one (to check we're in the right place)

Code: [Select]
cd ~/reprap
Then

Code: [Select]
ln -sf /usr/lib/jni/libj3dcore-ogl.so
And finally

Code: [Select]
./reprap

Offline therecklessengineer

  • Administrator
  • Oil obsessive
  • *****
  • Posts: 648
Re: Off topic ... Some help with Linux please
« Reply #34 on: December 10, 2013, 10:08:53 AM »
You did see this from the reprap site:

Quote
and may run on 64-bit Linux but this is untested.

Offline Julian

  • Administrator
  • Oil baron
  • *******
  • Posts: 6391
    • Used Cooking Oil Collection website
  • Location: East Surrey, UK.
Re: Off topic ... Some help with Linux please
« Reply #35 on: December 10, 2013, 10:12:27 AM »
Nope,

Just this one (to check we're in the right place)

Code: [Select]
cd ~/reprap
Then

Code: [Select]
ln -sf /usr/lib/jni/libj3dcore-ogl.so

And finally

Code: [Select]
./reprap

Still get the java warnings ...

Code: [Select]
julian@julian-HP:~$ cd ~/reprap
julian@julian-HP:~/reprap$ ln -sf /usr/lib/jni/libj3dcore-ogl.so
julian@julian-HP:~/reprap$ ./reprap
java.lang.UnsatisfiedLinkError: /home/julian/reprap/librxtxSerial.so: /home/julian/reprap/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/julian/reprap/librxtxSerial.so: /home/julian/reprap/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:844)
at java.lang.System.loadLibrary(System.java:1051)
at gnu.io.CommPortIdentifier.<clinit>(CommPortIdentifier.java:83)
at org.reprap.comms.GCodeReaderAndWriter.openSerialConnection(Unknown Source)
at org.reprap.comms.GCodeReaderAndWriter.init(Unknown Source)
at org.reprap.comms.GCodeReaderAndWriter.<init>(Unknown Source)
at org.reprap.machines.GCodeRepRap.<init>(Unknown Source)
at org.reprap.machines.MachineFactory.create(Unknown Source)
at org.reprap.Main.<init>(Unknown Source)
at org.reprap.Main$12.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:226)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:673)
at java.awt.EventQueue.access$300(EventQueue.java:96)
at java.awt.EventQueue$2.run(EventQueue.java:634)
at java.awt.EventQueue$2.run(EventQueue.java:632)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:108)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:643)
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)
julian@julian-HP:~/reprap$

I did see that, but looking at the age of the file, I'd have thought they would have sorted things by now.  Would 32 bit Linux have been any better?
Used Cooking Oil Collection website ... http://www.surreyusedcookingoilcollection.palmergroup.co.uk

Offline therecklessengineer

  • Administrator
  • Oil obsessive
  • *****
  • Posts: 648
Re: Off topic ... Some help with Linux please
« Reply #36 on: December 10, 2013, 10:16:45 AM »
Would 32 bit Linux have been any better?

Oh so very much!

So the trouble here is incompatibility between the 32 bit version of Java (for which the software is written) and the 64 bit that's running on your machine.

Try this:

Code: [Select]
sudo aptitude install libjava3d-java
sudo aptitude install libjava3d-jni

sudo cp /usr/lib/jni/libj3dcore-ogl.so /usr/lib/jvm/java-6-sun/jre/lib/amd64/
sudo cp /usr/lib/jni/librxtxSerial.so /usr/lib/jvm/java-6-sun/jre/lib/amd64/

sudo cp /usr/share/java/vecmath-*.jar /usr/lib/jvm/java-6-sun/jre/lib/ext/
sudo cp /usr/share/java/j3d*.jar /usr/lib/jvm/java-6-sun/jre/lib/ext/




Offline Julian

  • Administrator
  • Oil baron
  • *******
  • Posts: 6391
    • Used Cooking Oil Collection website
  • Location: East Surrey, UK.
Re: Off topic ... Some help with Linux please
« Reply #37 on: December 10, 2013, 10:19:40 AM »
Doesn't seem to like the first command ...

Code: [Select]
julian@julian-HP:~$ sudo aptitude install libjava3d-java
[sudo] password for julian:
sudo: aptitude: command not found
julian@julian-HP:~$

Is it worth trying the others?
Used Cooking Oil Collection website ... http://www.surreyusedcookingoilcollection.palmergroup.co.uk

Offline therecklessengineer

  • Administrator
  • Oil obsessive
  • *****
  • Posts: 648
Re: Off topic ... Some help with Linux please
« Reply #38 on: December 10, 2013, 10:23:02 AM »
Quite right. Serves me right for not reading them properly.

Code: [Select]
sudo apt-get install libjava3d-java
sudo apt-get install libjava3d-jni

sudo cp /usr/lib/jni/libj3dcore-ogl.so /usr/lib/jvm/java-6-sun/jre/lib/amd64/
sudo cp /usr/lib/jni/librxtxSerial.so /usr/lib/jvm/java-6-sun/jre/lib/amd64/

sudo cp /usr/share/java/vecmath-*.jar /usr/lib/jvm/java-6-sun/jre/lib/ext/
sudo cp /usr/share/java/j3d*.jar /usr/lib/jvm/java-6-sun/jre/lib/ext/

Offline Julian

  • Administrator
  • Oil baron
  • *******
  • Posts: 6391
    • Used Cooking Oil Collection website
  • Location: East Surrey, UK.
Re: Off topic ... Some help with Linux please
« Reply #39 on: December 10, 2013, 10:26:31 AM »
Didn't seem to like the third one either ...

Code: [Select]
julian@julian-HP:~$ sudo cp /usr/lib/jni/libj3dcore-ogl.so /usr/lib/jvm/java-6-sun/jre/lib/amd64/
cp: cannot create regular file `/usr/lib/jvm/java-6-sun/jre/lib/amd64/': No such file or directory
julian@julian-HP:~$
Used Cooking Oil Collection website ... http://www.surreyusedcookingoilcollection.palmergroup.co.uk

Offline therecklessengineer

  • Administrator
  • Oil obsessive
  • *****
  • Posts: 648
Re: Off topic ... Some help with Linux please
« Reply #40 on: December 10, 2013, 10:40:04 AM »
Well, I'm a little stumped. I'm not familiar enough with Java to sort this.

Where's Tony? He's the real Linux guru...

You might also try asking on the reprap forums. I'm sure someone must have run into this before.

Offline Julian

  • Administrator
  • Oil baron
  • *******
  • Posts: 6391
    • Used Cooking Oil Collection website
  • Location: East Surrey, UK.
Re: Off topic ... Some help with Linux please
« Reply #41 on: December 10, 2013, 10:43:53 AM »
I was just typing this when you replied ...

James, I'm conscious of how much of your time this is taking up.  It's been a struggle to get this far with Linux, especially with the wireless card problem, but would it make my life simpler in the long run if I started again with a 32 bit version?

But if you think the Linux side of things is sorted, perhaps some guidance from Tony might help ... any chance of a hand, Tony?

 
Used Cooking Oil Collection website ... http://www.surreyusedcookingoilcollection.palmergroup.co.uk

Offline Julian

  • Administrator
  • Oil baron
  • *******
  • Posts: 6391
    • Used Cooking Oil Collection website
  • Location: East Surrey, UK.
Re: Off topic ... Some help with Linux please
« Reply #42 on: December 10, 2013, 10:45:58 AM »
I have tried searching the forum, but the search doesn't seem to work.  As you say, it must have cropped up before.
Used Cooking Oil Collection website ... http://www.surreyusedcookingoilcollection.palmergroup.co.uk

Offline Tony

  • Administrator
  • Oil baron
  • *******
  • Posts: 5114
  • Fo' shizzle, biodizzle
    • Southampton Waste Oil Collection
  • Location: Southampton
Re: Off topic ... Some help with Linux please
« Reply #43 on: December 10, 2013, 11:31:09 AM »
Yes your best bet is to try 32-bit, but not initially by installing 32-bit Linux on your machine.  Get yourself a virtual machine, as per instructions here (assuming you are on Ubuntu 12.04)

http://www.webupd8.org/2012/06/how-to-install-vmware-player-in-ubuntu.html

Then you can try all manner of experimental crazyness on that without worrying about trashing the machine you're using.  If reprap is USB/serial contolled (no idea not looked into it) then this should work fine from the virtual machine anyway.  So for everythign else you can enjoy the benefit of 64-bit but for reprap if it's firmly stuck in 32-bit land, you've got the VM.

I would say that in general most experimental home project Linux stuff is likely to only be well supported on 32-bit distros.  No doubt this will change over the years.

Offline Julian

  • Administrator
  • Oil baron
  • *******
  • Posts: 6391
    • Used Cooking Oil Collection website
  • Location: East Surrey, UK.
Re: Off topic ... Some help with Linux please
« Reply #44 on: December 10, 2013, 12:16:10 PM »
Thanks James and thanks Tony, I'll give your suggestion a bash later today.  FYI I am on Ubuntu 12.04 and reprap board  is piggy backed on to an Arduino which connects via USB.
Used Cooking Oil Collection website ... http://www.surreyusedcookingoilcollection.palmergroup.co.uk