Feedback on GMT 6.4.0 installation and OpenSuse Linux Leap 15.5

In running the cmake for creating gmt, I ran into some typical problems using OpenSuse Leap 15.5. You have to bring up yast to install the development files for the following 6 programs:

– Found NETCDF: /usr/lib64/libnetcdf.so
– Found CURL: /usr/lib64/libcurl.so (found version “8.0.1”)
– Found GDAL: /usr/lib64/libgdal.so
– Found GEOS: /usr/lib64/libgeos_c.so (3.11.1)
– Found PCRE: /usr/lib64/libpcre.so
– Found FFTW3: /usr/lib64/libfftw3f.so

There was some missing variable initialization in the ConfigUser.cmake file which had to be added (emboldened)

set (GSHHG_ROOT “/home/owner/gshhg-gmt”)
set (GSHHG_PATH “/home/owner/gshhg-gmt”)
set (GSHHG_VERSION “2.3.7”)
#3b. Copy GSHHG files to ${GMT_DATADIR}/coast [TRUE]?:
#set (COPY_GSHHG FALSE)
#4a. Set full path to the DCW Digital Chart of the World for GMT directory [auto]:
set (DCW_ROOT “/home/owner/dcw-gmt”)
set (DCW_PATH “/home/owner/dcw-gmt”)

After all this, the cmake was able to generate the report below and set up the makefiles correctly

  • GMT Version: : 6.4.0

*> Options:

  • Found GSHHG database : /home/owner/gshhg-dmt/ (2.3.7)
  • Found DCW-GMT database : /home/owner/dcw-gmt/ ()
  • Found GMT data server : oceania
  • NetCDF library : /usr/lib64/libnetcdf.so
  • NetCDF include dir : /usr/include
  • Curl library : /usr/lib64/libcurl.so
  • Curl include dir : /usr/include
  • GDAL library : /usr/lib64/libgdal.so
  • GDAL include dir : /usr/include/gdal
  • GEOS library : /usr/lib64/libgeos_c.so
  • GEOS include dir : /usr/include
  • FFTW library : /usr/lib64/libfftw3f.so
  • FFTW threads library : /usr/lib64/libfftw3f_threads.so
  • FFTW include dir : /usr/local/include
  • Accelerate Framework :
  • Regex support : PCRE (/usr/lib64/libpcre.so)
  • ZLIB library : /usr/lib64/libz.so
  • ZLIB include dir : /usr/include
  • LAPACK library : yes
  • BLAS library : yes
  • License restriction : no
  • Triangulation method : Shewchuk
  • OpenMP support : disabled (GMT_ENABLE_OPENMP not set)
  • GLIB GTHREAD support : disabled
  • Build generator : Unix Makefiles
  • Build GMT core : always [libgmt.so]
  • Build PSL library : always [libpostscriptlight.so]
  • Build GMT supplements : yes [supplements.so]
  • Build GMT for developers : yes
  • Build proto supplements : none
  • Build module links : no
  • Found Ghostscript (gs) : yes (9.52)
  • Found GraphicsMagick (gm) : yes (1.3.35)
  • Found ffmpeg : yes (4.4.4)
  • Found open : yes
  • Found ogr2ogr : yes (3.6.2)
  • Found gdal_translate : yes (3.6.2)
  • Locations:
  • Installing GMT in : /home/owner/gmt-6.4.0/cmake/build
  • GMT_DATADIR : /home/owner/gmt-6.4.0/cmake/build/share
  • GMT_DOCDIR : /home/owner/gmt-6.4.0/cmake/build/share/doc
  • GMT_MANDIR : /home/owner/gmt-6.4.0/cmake/build/share/man
    – Configuring done
    – Generating done
    – Build files have been written to: /home/owner/gmt-6.4.0/build

So I am happy with what I have now, I can symbolically link the executables as I desire.

I noticed that there are 3 warnings that the gcc compiler gave while compiling:

/home/owner/gmt-6.4.0/src/gmt_parse.c: In function ‘gmtparse_ensure_b_and_dash_options_order’:
/home/owner/gmt-6.4.0/src/gmt_parse.c:523:15: warning: implicit declaration of function ‘mergesort’ [-Wimplicit-function-declaration]
if (do_sort) mergesort (priority, np, sizeof (struct B_PRIORITY), gmtparse_compare_B);
^~~~~~~~~
and
/home/owner/gmt-6.4.0/src/gmt_init.c: In function ‘gmt_parse_i_option’:
/home/owner/gmt-6.4.0/src/gmt_init.c:9341:2: warning: implicit declaration of function ‘mergesort’ [-Wimplicit-function-declaration]
mergesort (GMT->current.io.col[GMT_IN], k, sizeof (struct GMT_COL_INFO), gmtinit_compare_cols);
^~~~~~~~~
and finally
[ 65%] Linking C shared library libgmt.so
/usr/lib64/gcc/x86_64-suse-linux/7/…/…/…/…/x86_64-suse-linux/bin/ld: CMakeFiles/gmtlib.dir/gmt_support.c.o: in function gmt_get_tempname': gmt_support.c:(.text+0xb701): warning: the use of mktemp’ is dangerous, better use mkstemp' or mkdtemp’

So some developer(s) need to take a look at these 3 items, if possible.

One question in general: althought gmt has a predetermined idea of how it wants to install the manpages, libraries, include files, and data files, can this be changed to adopt the openSuse Leap 15.5 style when running the “cmake -build. -target install” command?

You have to bring up yast to install the development files for the following 6 programs:

This is expected. They’re GMT’s required/optional dependencies.

There was some missing variable initialization in the ConfigUser.cmake file which had to be added (emboldened)

GSHHG_PATH, GSHHG_VERSION and DCW_PATH are not required. They’re variables automatically determined by CMake. If your system fails to find the GSHHG and DCW data, these variables may be empty.

  • Locations:
  • Installing GMT in : /home/owner/gmt-6.4.0/cmake/build
  • GMT_DATADIR : /home/owner/gmt-6.4.0/cmake/build/share
  • GMT_DOCDIR : /home/owner/gmt-6.4.0/cmake/build/share/doc
  • GMT_MANDIR : /home/owner/gmt-6.4.0/cmake/build/share/man
    – Configuring done
    – Generating done
    – Build files have been written to: /home/owner/gmt-6.4.0/build

So I am happy with what I have now, I can symbolically link the executables as I desire.

It seems that your GMT is installed the build directory /home/owner/gmt-6.4.0/cmake/build, which is not a good practice. It’s very likely that you didn’t set CMAKE_INSTALLPREFIX in your ConfigUser.cmake file.

One question in general: althought gmt has a predetermined idea of how it wants to install the manpages, libraries, include files, and data files, can this be changed to adopt the openSuse Leap 15.5 style when running the “cmake -build. -target install” command?

See the advanced cmake template cmake/ConfigUserAdvancedTemplate.cmake. There are variables like GMT_BINDIR, GMT_LIBDIR to control the paths.

I changed to the default location “/usr/local/” and gmt installed just fine under cmake.

We need some developer to look at the 3 warnings which the gnu gcc compiler complains about

It would be very helpful if someone could put openSuse into the linux lineup for the installation instruction. I purposefully listed the above in hopes that someone would amend the instructions. Thanks