Mac can be choosy

From 2 days I am stuck on an compilation issue, I was supposed to be working on a script that can compile Scilab.
But instead I am unable to compile Scilab manually even, which is kind of funny.

Issue which I am facing

  • Exception in thread "main" java.lang.UnsatisfiedLinkError: no gluegen2-rt in java.library.path
  • If I place the libgluegen2-rt.jnilib in the jre/lib folder of the jdk I get following error
    Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: /System/Library/Frameworks/nativewindow_awt.Framework/nativewindow_awt

I did face the same issue earlier but Mr. Clement David (davidcl) helped me sort this out. At first he told all dependencies were not installed,
but it was not the case, then he suggested to place the libgluegen2-rt.jnilib file from scilab/lib/thirdparty to /jre/lib of the jdk and surprisingly it worked that time.
But it is not working now, I did post a question on Stack Overflow that time (around GSoC proposal- about 2 months earlier) which can be found here
Still fighting with this issue, lets hope that I can sort it out.

My trials

  1. I tried removing my jdk8 and installing jdk10, but no use
  2. I again downloaded a fresh installation of jdk8 build 171, but resulted in no gluegen2-rt
  3. I tried to copy paste the libgluegen2-rt.jnilib from thirdparty lib folder of Scilab but it results in following error:
    Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: /System/Library/Frameworks/nativewindow_awt.Framework/nativewindow_awt
  4. I downloaded a file jogamp-all-platforms and placed all jnlib files from it to the lib folder of jdk
    I did this because after lots of google search the gluegen-rt took me to jogl, so thought it might solve the issue.
    But it resulted in another error:
    Exception in thread "main" java.lang.UnsatisfiedLinkError: jogamp.common.os.MachineDescriptionRuntime.getPointerSizeInBytesImpl()I

    I found this issue in bugzilla too: here

Hoping for Best.
Happily Coding
Divyanshu Kumar