-
Notifications
You must be signed in to change notification settings - Fork 0
Installation Solution: MB System programs that use X11 Motif OpenGL
MacOs Example Using MacPorts to Install Prerequisite packages:
#
The use of MacPorts to install the MB-System prerequisite packages is recommended on Apple Mac computers, particularly because this approach enables cleanly building with a complete X11 + Motif + OpenGL infrastructure separate from the libraries and header files associated with the XQuartz package. One usually still installs XQuartz and uses it as the X11 display server, but confining the MB-System compiliation and linking to headers and libraries within the MacPorts structure avoids several issues.
#
This example is relevant for MacOs 10.13 High Sierra to the current MacOs 13 Ventura on both Intel and ARM (Apple Silicon) architecture computers.
#
Install Xcode and the Xcode command line tools, which includes the LLVM compiler suite.
#
Install the XQuartz X11 server from
www.xquartz.org
XQuartz 2.8.2 or later is required for all MB-System installations.
#
Install MacPorts using the appropriate downloadable installer package from:
www.macports.org/install.php
#
After MacPorts installation, first make sure the default port packages are current by running selfupdate and then install the MB-System prerequisites.
sudo port -v selfupdate sudo port install gmt6 proj6 fftw-3 xorg mesa libGLU openmotif
#
Also make sure that a current version of Python3 is available. First list the available Python3 versions, install the most recent, and then set port to link that version to python3:
port select --list python sudo port install python310 sudo port select --set python3 python310
Also install the most recent Python imaging library Pillow
sudo port install py310-Pillow
#
Download the MB-System source package from the repository at GitHub:
github.com/dwcaress/MB-System
There are often beta releases that are more recent than the current stable release. For instance, to download 5.7.9.beta42 go to:
github.com/dwcaress/MB-System/archive/refs/tags/5.7.9beta42.tar.gz
#
Unpack the MB-System distribution tarball, and then cd into the top directory of the resulting structure. This will typically be named something like “MB-System-5.7.9”. At that location, execute the configure script, named “configure”, with the options necessary for your context. The XCode compiler tools do not look for header files or libraries in the locations used by MacPorts, and so it is necessary to specify these locations for several of the prerequisite packages.
#
This command should successfully enable building the current MB-System (5.7.9 or later) on any Mac computer with the prerequisites installed through MacPorts. This has been tested with computers running High Sierra, Big Sur, and Monterey.
./configure \
--prefix=/usr/local \
--disable-static \
--enable-shared \
--enable-hardening \
--enable-test \
--with-proj-lib=/opt/local/lib/proj8/lib \
--with-proj-include=/opt/local/lib/proj8/include \
--with-gmt-config=/opt/local/lib/gmt6/bin \
--with-fftw-lib=/opt/local/lib \
--with-fftw-include=/opt/local/include \
--with-x11-lib=/opt/local/lib \
--with-x11-include=/opt/local/include \
--with-motif-lib=/opt/local/lib \
--with-motif-include=/opt/local/include \
--with-opengl-include=/opt/local/include \
--with-opengl-lib=/opt/local/lib \
--with-otps-dir=/usr/local/src/otps
#
Once the makefiles have been generated by configure, build and install MB-System using:
make make check sudo make install
#
The MB-System codebase includes some experimental components, such as OpenCV based photomosaicing (enabled with –enable-opencv) and a realtime Terrain Relative Navigation infrastructure and toolset (–enable-mtrn and –enable-mbtnav). An additional prerequisite for the photomosaicing is OpenCV, which can be installed by:
sudo port install gmt6 proj6 fftw-3 xorg mesa libGLU openmotif opencv4
This configure command should enable building the entire MB-System package, including these experimental tools.
./configure \
--prefix=/usr/local \
--disable-static \
--enable-shared \
--enable-hardening \
--enable-test \
--with-proj-lib=/opt/local/lib/proj6/lib \
--with-proj-include=/opt/local/lib/proj6/include \
--with-gmt-config=/opt/local/lib/gmt6/bin \
--with-fftw-lib=/opt/local/lib \
--with-fftw-include=/opt/local/include \
--with-x11-lib=/opt/local/lib \
--with-x11-include=/opt/local/include \
--with-motif-lib=/opt/local/lib \
--with-motif-include=/opt/local/include \
--with-opengl-include=/opt/local/include \
--with-opengl-lib=/opt/local/lib \
--enable-mbtrn \
--enable-mbtnav \
--enable-opencv \
--with-opencv-include=/opt/local/include/opencv4 \
--with-opencv-lib=/opt/local/lib/opencv4 \
--with-otps-dir=/usr/local/src/otps
#