Software requirements on MacOSX (any release)

In order to build the CEFLIB API on MacOSX, either for IDL or MATLAB, you will need to install first the XCode application.


Some incompatibilities have been found between Matlab and Xcode on MacOSX "El Capitan".

Afterwards, you will need to install some Xcode optional tools :

  • Command Line Tools

  • System Tools

  • Unix Development

Problem with Matlab API on MacOSX "El Capitan"

It seems there are incompatibilities between Matlab/Xcode with MacOSX "El Capitan".

Combination that works:

  • MacOSX El Capitan

  • CEFLIB v1.8.0

  • Xcode 7.2

  • Matlab 2016a

Combination that doesn’t works:

  • MacOSX El Capitan

  • CEFLIB v1.7.3

  • Xcode 7.x

  • Matlab 2015

When using an older MacOSX version (Darwin, Yosemite,…) you can use:

  • CEFLIB v1.7.3 (or upper)

  • Xcode 7.x

  • Matlab 2014 (or lower)

Not all combinations could be tested, so we encourage you to check for software requirements on Matlab Web site :

Problem with CEFLIB 1.7.1 on Fedora 19 computer

This bug was discovered on 2013/09/26 by Nalaliya Bourrel, when building the CEFLIB C API in a Fedora Core 19 computer.

This Linux distribution embed zlib-1.2.7 package, which has a different interface, and the build process failed.

This zlib version redefines the gzFile data type, that was previously :

typedef voidp           gzFile;

And becomes now :

typedef struct gzFile_s *gzFile;        /* semi-opaque gzip file descriptor */

Some changes were necessary in the following files :

  • LIB/inc/ZZLIB.h

  • LIB/src/ZZLIB.c

  • C/src/CEF.c

Caution These changes don’t break software compatibiliy with previous versions of zlib library.

Problem with CEFLIB MATLAB API on MacOSX "Mountain Lion"

This bug was detected by Arnaud MASSON, while building the MATLAB CEFLIB API on his MacOSX computer (Mountain Lion).

There was a problem to find the gcc compiler used to build the library.

2 solutions were found :

Solution that needs "Administrator" privileges

Update the file :


Where MATLABRxxxx has to be replaced by the Matlab version installed on your computer.

Search the following lines :

case $Arch in

And replace with :


Solution for regular system users

Run the followind command in your Matlab command window :

mex -setup

That will create a copy of the /Applications/MATLABRxxx/bin/ under :


Now, update the file, as described in the previous paragraph, replacing :


By :


Header files conflict under MacOS

MacOSX system accepts both case-sensitive and case-insensitive file systems, and that can generate a bug while building the CEFLIB.

If the source tree is extracted in a case-insensitive file system, there is a conflict between the two following files :


The first one is the zlib original header file installed on each system.

The second one contains some overloaded functions to be used with the CEFLIB, and needs to include the first one to work.

Obviously, on case-insensitive file systems, with included header path directives, when we try to include the first one, the system chooses the second one and building process fails.

If the library is extracted on a case-sensitive file system (ZFS for example), this problem doesn’t occur.

A solution should be to rename the uppercase ZLIB.h to avoid such problem.

This will be done for the next release V1.7

Bug with ZLIB

A bug was found while using the CEFLIB IDL interface on CentOS 5.6 x86_64 architecture

It seems that this bug came from /usr/lib64/ ⇒ /usr/lib64/


Download source code from ⇒ zlib-1.2.5.tar.gz

$ gzip -d zlib-1.2.5.tar.gz
$ tar xvf zlib_1.2.5.tar
$ cd zlib-1.2.5
$ ./configure
$ make

Add the directory to LD_LIBRARY_PATH :

$ export LD_LIBRARY_PATH=/home/cisdds/zlib-1.2.5

Check dynamic linkage of :

$ ldd /DATA/CLUSTER/SOFT/CEFLID_IDL/bin/ =>  (0x00007fff84736000) => /home/cisdds/zlib-1.2.5/ (0x00002b6fd4308000) => /lib64/ (0x00002b6fd4538000)
/lib64/ (0x0000003091800000)

Try using CEFLIB from IDL :

$ idl
IDL> n = cef_read("C3_CP_CIS-HIA_ONBOARD_MOMENTS__20080101_V08.cef.gz"
% Loaded DLM: CEF.
1 : CEF.Open_CEF_file              : C3_CP_CIS-HIA_ONBOARD_MOMENTS__20080101_V08.cef.gz
1 : CEF.Read_CEF_header            : 20725 records found in 0.04 seconds
1 : CEF.Read_CEF_header            : 24 values per record
1 : CEF.Display_variables          : 12 variables + 0 constants
1 : CEF.Read_CEF_file              : 20725 records physically read in 0.07 seconds
1 : CEF.Read_CEF_file              : STATUS = 0 : OK : Terminaison correcte