Mac® OS X® platform notes

DYLD_LIBRARY_PATH denied in OS X® 10.11

Starting with Mac® OS X® 10.11 (El Capitan), if the System Integrity Protection (SIP) is enabled, the DYLD_LIBRARY_PATH environment variable is no longer exported in sub processes. This variable defined the shared library search path for software components used by the Genero runtime system. This was required especially for database client libraries installed in directories other than /usr/lib and /usr/local/lib (the default location for shared libraries).

As DYLD_LIBRARY_PATH cannot be used, the proper workaround is to install all required shared libraries in /usr/local/lib. A good practice is to create the installation directory of the software component in /usr/local/product/version, and create symbolic links to the required shared libraries in /usr/local/lib.

To make sure that all required libraries can be found, check the dependencies on a Genero binary (typically, the ODI driver) with the otool -L and otool -l commands.

For example, with Oracle 12 Instant Client:
$ mkdir /usr/local/oracle/
$ mkdir /usr/local/oracle/instantclient_12_2

... install Oracle Instant Client in /usr/local/oracle/instantclient_12_2 ...

$ cd /usr/local/lib
$ ln -s /usr/local/oracle/instantclient_12_2/libclntsh.dylib.12.1 libclntsh.dylib.12.1

... set Genero FGL environment ...

$ otool -L $FGLDIR/dbdriver/dbmora_12.dylib
... check dependencies and paths

$ otool -l $FGLDIR/dbdriver/dbmora_12.dylib
... check load sequences
Important: If Mac OSX includes a database client library in system directories such as /usr/lib, the system shared library will be found first, before user shared libraries located in /usr/local/lib. For example, Mac OSX comes with a PostgreSQL client library /usr/lib/libpq.5.dylib -> libpq.5.6.dylib. In this case, if you want to use a more recent PostgreSQL client library, you will have to patch the Genero ODI driver with the install_lib_tool, using the -change option to use the @rpath prefix to libpq.5.dylib shared library entry, and add a search path with -add_rpath to specify target PostgreSQL lib directory:
$ cd $FGLDIR/dbdrivers

$ otool -L dbmpgs_9.dylib
...
    original-path-to-postgresql-dir/libpq.5.dylib (compatibility ...
...

$ install_name_tool \
  -change original-path-to-postgresql-dir/libpq.5.dylib @rpath/libpq.5.dylib \
  -add_rpath /Library/Postgresql/9.5.1/lib \
  dbmpgs_9.dylib

$ otool -L dbmpgs_9.dylib
...
    @rpath/libpq.5.dylib (compatibility ...
...

$ otool -l dbmpgs_9.dylib
... check load sequences
 

Java Interface

Check Mac OS X platform notes when using the Java Interface on this operating system.