Processing 3.3.4 won't start on Linux

edited June 2017 in Using Processing

Hi,

I get this error output:

$ ./processing
java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory

I'm using elementary OS Loki 0.4.1 (built on Ubuntu 16.04.2).

Any help? Thanks.

Tagged:

Answers

  • Hi @GoToLoop,

    I'm asking for help here first as recommended on the wiki: https://github.com/processing/processing/wiki/Troubleshooting#processing-wont-start-nothing-or-something-strange-happens-when-i-click-run

    Please first seek help on the Processing Forum.

    Thanks!

  • edited June 2017
    • Hi @thiago! That's the right procedure of coming here 1st. :-bd
    • But version 3.3.4 was just released today! And I'm still using 3.3 on Windows yet. X_X
    • And you've got a bug for a Linux distro which makes it even harder to find folks to help w/. :-<
    • So in this case, I think your best bet is to directly ask the devs about it. Good luck! [-O<

    P.S.: You can also downgrade to a lower version while devs are chasing that bug though. *-:)

  • @thiago

    Try version 3.3.3 and let us know if it runs. By the way, did you run Processing before? If this is a problem with 3.3.4 then you could create a ticket in github: https://github.com/processing/processing/issues

    Kf

  • What does java -version say?

    That error suggests you have a missing file. It might be missing from your Java installation or might be somewhere outside the library path. Sounds like a Java thing rather than a processing thing (other people are having similar errors elsewhere on the internet, no coherent answer though)

    locate libjli.so try that.

  • @GoToLoop, @kfrajer

    I actually was using version 3.3.3, it was working just fine. Thank you both!

    @koogs

    $ java -version
    openjdk version "1.8.0_131"
    OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-0ubuntu1.16.04.2-b11)
    OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)
    
    $ locate libjli.so
    /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/jli/libjli.so
    

    Thanks!

  • That last line looks like it won't be in your library path. Several ways of fixing that:

    Set LD_LIBRARY_PATH to include it

    Or add the directory to LD config

    Or create a softlink to it that is in the library path.

  • ok, have booted laptop...

    surprised to find i have about a dozen copies of that file:

    /opt/jdk1.6.0_16/jre/lib/i386/jli/libjli.so
    /opt/jdk1.6.0_18/jre/lib/amd64/jli/libjli.so
    /opt/jdk1.6.0_21/jre/lib/i386/jli/libjli.so
    /opt/jdk1.7.0_67/jre/lib/amd64/jli/libjli.so
    /opt/jdk1.7.0_67/lib/amd64/jli/libjli.so
    /opt/jdk1.8.0_131/jre/lib/amd64/jli/libjli.so
    /opt/jdk1.8.0_131/lib/amd64/jli/libjli.so
    /opt/jdk1.8.0_45/jre/lib/amd64/jli/libjli.so
    /opt/jdk1.8.0_45/lib/amd64/jli/libjli.so
    /opt/jre1.6.0_16/lib/i386/jli/libjli.so
    /opt/jre1.6.0_17/lib/i386/jli/libjli.so
    /opt/jre1.6.0_22/lib/i386/jli/libjli.so
    /opt/jre1.6.0_22_x64/lib/amd64/jli/libjli.so
    /opt/jre1.6.0_34/lib/amd64/jli/libjli.so
    /opt/processing-1.0.9/java/lib/i386/jli/libjli.so
    /opt/processing-1.5.1/java_32/lib/i386/jli/libjli.so
    /opt/processing-2.0a5/java_safe/lib/i386/jli/libjli.so
    /opt/processing-2.2.1/java/lib/amd64/jli/libjli.so
    /opt/processing-3.0b7/java/lib/amd64/jli/libjli.so
    /opt/processing-3.1.1/java/lib/amd64/jli/libjli.so
    /opt/processing-3.3/java/lib/amd64/jli/libjli.so
    /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/jli/libjli.so
    

    so every version of java and every version of processing has that file in it... that last one is identical to yours.

    i never know whether processing is using the embedded version or the system version of java (so ./processing is one thing and java -version is another). try running processing locally using bash -x processing

    anyway, those solutions:

    1)

    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/jli
    

    before calling processing on the command line

    2)

    something like

    sudo echo "/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/jli" >> /etc/ld.so.conf.d/java8.conf
    sudo ldconfig
    

    3) is a bit dangerous...

  • i would expect to see a line like this for 3.3.4 though, a copy of that file inside the embedded java for processing 3.3.4

    /opt/processing-3.3/java/lib/amd64/jli/libjli.so

  • ok,i downloaded 3.3.4 and got the same error. comparing it with 3.3 there are ~50 files missing from the embedded java directory.

    i think this is a mistake in 3.3.4

  • Try renaming the Java directory inside Processing, and then create a symlink to OpenJDK instead. Should be safer than using bits of OpenJDK.

    IMO Processing should be using OpenJDK by default anyway!

  • AFAIK, Processing has never been completely compatible w/ OpenJDK, but Oracle's JDK! ~O)

    I remember when I forced the ancient Processing 1.5.1 to use OpenJDK on Linux, hardware libraries like Minim or Video didn't work! :-&

  • Answer ✓

    thanks a lot, guys. amazing response.

    someone has reported an issue on github (maybe some of you, and even referenced this thread): https://github.com/processing/processing/issues/5111

    i will keep using version 3.3.3 until a new release is out.

  • I got that issue too. I wish Processing would be just an apt-get install away, always this hassle...

  • @GoToLoop - Oracle JDK is OpenJDK! OK, there are a few minor differences in the binary Oracle JDK, but the fact is that OpenJDK is led by Oracle and is the reference implementation of Java. If it don't work on OpenJDK, it's broken Java code! :-)

    Processing needs to smell the coffee and start using OpenJDK everywhere - pre-built binaries are available from Azul. Would love to see Processing become a fully open-source project.

    In the meantime, Praxis LIVE has a .deb and uses OpenJDK with the Processing libs ... just sayin'! ;-)

  • @neilcsmith_net, that was my experience back then when I started using Processing 1.5.1 at Windows & Linux.

    Once upon a time, if we renamed/deleted subfolder "java/" Processing automatically used OS' Java.

    However, somewhere in the middle of Processing 2 series, its launching script simply refused to work if we did so.

    In order to bypass bundled subfolder "java/", I had to symlink it in such a way, both in Windows & Linux, so it would point to OS' Java.

    However, if that was OpenJDK, many hardware libraries didn't work.
    And some PDE versions even refused to run!

    Dunno the situation for PDE series 3 though. How much had it improved or regressed on that matter.

    I recall I ranted about many times why bundle Java w/ PDE.
    Why they stopped the "expert" version w/o bundled Java like this 1:
    http://download.Processing.org/processing-1.5.1-windows-expert.zip

    At least half installation's size is bundled Java! X(

  • @GoToLoop I can't speak for Minim, but as a maintainer of the underlying GStreamer library inside Video I'm fairly confident that whatever issue you faced was not due to OpenJDK!

    I'm not suggesting not bundling a JRE myself, just using an open one.

  • same here, Ubuntu and processing 3.3.4 won't work together. Awaiting hotfix.

  • @Piotrenewicz the hotfix is either to change the java folder to symlink OpenJDK or build yourself. I just downloaded and built 3.3.4 on Ubuntu and it runs fine. :-/

  • edited June 2017

    hi , had the same problem, actually if you rename or delete the java folder in the processing folder and symlink your local java it works.. doesn`t this imply that is a processing problem? especially the java that is shipped with processing

  • If this stuff (symlinking, changing path variables) is over your head, because you are a beginner in programming or new to linux, you could also download 3.3.3 and copy the "java" folder from there to 3.3.4. The install script will work after that.

  • @doxanthropos

    another good idea, thanks!

Sign In or Register to comment.