Changeset 30401


Ignore:
Timestamp:
2016-03-14T10:33:13+13:00 (8 years ago)
Author:
davidb
Message:

Fix for MacOS 10.11, El Capitan

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/packages/javagdbm/java/au/com/pharos/gdbm/GdbmFile.java

    r10737 r30401  
    513513        System.load(libraryFile);
    514514    } else {
    515         System.loadLibrary("gdbmjava");
     515       
     516        String gsdlos = System.getenv("GSDLOS");
     517        if (gsdlos!=null && gsdlos.equals("darwin")) {
     518        // As of MacOX 10.11 (El Capitan), effectivly supresses DYLD_LIBRARY_PATH (does
     519        // not propagate it to child processes).  This is a result of changes to their
     520        // security model, and seems to come into effect for 'untrusted' executables.
     521        // Greenstone run as a regular user, is 'unstrusted'.  It is possible, with
     522        // admin rights, to override this, however that is not really a viable solution
     523        // for our project.  Hence the change here to use Systen.load() with an
     524        // absolute pathname, rather than rely of System.loadLibrary().
     525
     526        String gsdl3srchome = System.getenv("GSDL3SRCHOME");
     527        String full_jni_library = gsdl3srchome + "/lib/jni/libgdbmjava.jnilib";
     528        System.load(full_jni_library);
     529        }
     530        else {
     531
     532        System.loadLibrary("gdbmjava");
     533        }
    516534    }
    517535    }
Note: See TracChangeset for help on using the changeset viewer.