Bug 587 - The temporary directory used by jogl to unpack native libraries may not be executable
Summary: The temporary directory used by jogl to unpack native libraries may not be ex...
Status: RESOLVED FIXED
Alias: None
Product: Jogl
Classification: JogAmp
Component: core (show other bugs)
Version: 2
Hardware: All all
: --- normal
Assignee: Sven Gothel
URL:
Depends on:
Blocks:
 
Reported: 2012-06-13 14:54 CEST by Mark Raynsford
Modified: 2012-06-16 05:35 CEST (History)
1 user (show)

See Also:
Type: ---
SCM Refs:
gluegen 1468286bf569a493e4fdb887d5f3732f88c8cec3 jogl 29e70f215069643c740e1b251490aa9edd61d2cb
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Raynsford 2012-06-13 14:54:44 CEST
This will usually result in an error such as:

Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/jogamp.tmp.cache_000000/jln8068820674097688578/jln3098016816860882408/libgluegen-rt.so: /tmp/jogamp.tmp.cache_000000/jln8068820674097688578/jln3098016816860882408/libgluegen-rt.so: failed to map segment from shared object: Operation not permitted

Unfortunately, it's not possible to reliably check whether a directory is on a filesystem that's mounted noexec.

Suggested workaround is to use $XDG_CACHE_HOME, falling back to $HOME/.cache on Linux.
Comment 1 Mark Raynsford 2012-06-13 14:56:24 CEST
Should probably be $XDG_CACHE_HOME/jogamp, or $HOME/.cache/jogamp.
Comment 3 Sven Gothel 2012-06-16 05:35:51 CEST
Fixed:
gluegen 1468286bf569a493e4fdb887d5f3732f88c8cec3
jogl 29e70f215069643c740e1b251490aa9edd61d2cb

Use alternative storage location if platform's temp directory is mounted w/ noexec ; IOUtil API change!
    
    Test whether executable files can be launched in temporary folder
    by trying to run an empty executable file - if !( WINDOWS | OPENKODE )
    
    TempDir:
    1) ${java.io.tmpdir}/jogamp
    2) $XDG_CACHE_HOME/jogamp - if !( ANDROID | MACOS | WINDOWS | OPENKODE )
    3) $HOME/.jogamp
    
    $XDG_CACHE_HOME defaults to $HOME/.cache
    
    - TempFileCache: ${TempDir}/file_cache -> ${java.io.tmpdir}/jogamp/file_cache
    - LauncherTempFileCache: ${TempDir}/file_cache -> ${java.io.tmpdir}/jogamp/file_cache