-
Notifications
You must be signed in to change notification settings - Fork 68
GDL on OSX
GDL is available from:
- Homebrew: known as gnudatalanguage (brew install gnudatalanguage) : OBSOLETE Version
- Macports: known as gnudatalanguage, version 1.0.0-rc3 thanks @tenomoto
- Fink: known as gdl, not changed since 2018 ... Please, @Seb!
SO THESE VERSIONS ARE MOSTLY OBSOLETE. This warning will disappear when the above distributions will be in sync.
At the moment, you can
- download the unstable weekly build binaries from https://github.com/gnudatalanguage/gdl/releases/tag/weekly-release, also see #957
or
- install Homebrew using the one-liner command
- Using Brew, install the required libraries (cmake, g++ ...).
- Download the gdl code, and run gdl/.ci/build_gdl.sh 2 times:
-
build_gdl.sh prepwill install the required libraries. -
build_gdl.sh buildwill build gdl inbuildand install it ininstall. This is the simplest way.
or
- rebuild GDL using fresh libraries from your favorite brew/fink... , the GDL current sources, and cmake. "Compilation notes" below may help you.
-
App or not App? It is often recommended that a program be put in a app, see this topic . At the moment, GDL does not build as a nice app. Tests show no difference, but have not been very thorough...
-
widget menuBar: Several [G|I]DL packages create GUIs using the widget creation commands of GDL. These will often use a menubar. On OSX the menubar is normally the top menu bar, that changes depending on which window has the focus. To get an unified behaviour on all platfroms, GDL widgets keep their menubar atop each widget window (in fact they are 'taskbars'), and the mac menu is desperately void.
-
Recent changes in GDL have permitted an 'unified' version compilable indifferently under linux, mac OSX and Windows. It uses wxWidgets for graphics and widgets, on Mac OSX forget X11, welcome wxmac!
- Depending of OSX version, default Clang may or not come with OpenMP. If OpenMP is not around, we need to deactivated it :
cmake . [others flags] -DOPENMP=OFF
but, having OpenMP, Eigen and compiling GDL in Release (-O3) mode are the only way to have a GDL on par with IDL for speed.
- Readline. Editline is not fully compliant with Readline but it wrongly made symbolic links with readline headers files. Very dangerous. You must install a clean Readline lib. around (the one provided by Brew is OK) then cleanly link to it :
cmake . [others flags] -DREADLINEDIR=/usr/local/opt/readline/
- An example working (tested) on OSX 10.11, 10.12 & 10.14 (with Readline provided by Brew, and Cmake >= 3.0) :
git clone https://github.com/gnudatalanguage/gdl
cd gdl
mkdir build
cd build
cmake .. -DREADLINEDIR=/usr/local/opt/readline/ -DOPENMP=OFF -DGEOTIFF=OFF -DHDF=OFF -DUDUNITS2=OFF -DGRIB=OFF -DGLPK=OFF
make -j 4
But in the above, you can remove -DGEOTIFF=OFF -DHDF=OFF -DUDUNITS2=OFF -DGRIB=OFF -DGLPK=OFF provided you have installed the corresponding library. Each time you add a library and call cmake to recompile: it is mandatory to clean the cache before running again cmake (rm -f CMakeCache.txt)