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 functiongmt_get_tempname': gmt_support.c:(.text+0xb701): warning: the use of
mktemp’ is dangerous, better usemkstemp' 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?