dr4712 - 2018-12-07

Hello everyone,
I have a trouble installing plplot on my machine. My system specs are as follows

[root@]# cat /etc/release
CentOS Linux release 7.4.1708 (Core)
Derived from Red Hat Enterprise Linux 7.4 (Source)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

CentOS Linux release 7.4.1708 (Core)
CentOS Linux release 7.4.1708 (Core)
cpe:/o:centos:centos:7

[root@]# uname -mrs
Linux 3.10.0-693.21.1.el7.x86_64 x86_64

[root@]# cat /proc/version
Linux version 3.10.0-693.21.1.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC) ) #1 SMP Wed Mar 7 19:03:37 UTC 2018

[root@]# lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 64
On-line CPU(s) list: 0-63
Thread(s) per core: 2
Core(s) per socket: 16
Socket(s): 2
NUMA node(s): 2
Vendor ID: GenuineIntel
CPU family: 6
Model: 79
Model name: Intel(R) Xeon(R) CPU E5-2697A v4 @ 2.60GHz
Stepping: 1
CPU MHz: 2600.101
CPU max MHz: 3600.0000
CPU min MHz: 1200.0000
BogoMIPS: 5200.07
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 40960K
NUMA node0 CPU(s): 0-15,32-47
NUMA node1 CPU(s): 16-31,48-63

I am trying to install plplot within build_dir with the following sequence

[root@ build_dir]# cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_compiler_diagnostics=ON ../../plplot-5.13.0 >& cmake.out

The cmake.out file looks benign with only these warnings:
[...]
-- Found PythonInterp: /bin/python3 (found suitable version "3.4.9", minimum required is "3")
-- Found PythonInterp: /bin/python3 (found suitable version "3.4.9", minimum required is "2")
-- Found PythonLibs: //lib64/libpython3.6m.so (found version "3.6.5")
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named 'numpy'
-- WARNING: NumPy header not found. Disabling Python binding
-- OCTAVE = /bin/octave
-- MKOCTFILE = /bin/mkoctfile
-- OCTAVE_CONFIG = /bin/octave-config
-- OCTAVE_VERSION = 3.8.2
-- OCTAVE_LIBRARIES = /usr/lib64/octave/3.8.2/liboctave.so
-- OCTINTERP_LIBRARIES = /usr/lib64/octave/3.8.2/liboctinterp.so
-- OCTAVE_INCLUDE_PATH = /usr/include;/usr/include/octave-3.8.2;/usr/include/octave-3.8.2/octave
warning: docstring file '/usr/share/octave/3.8.2/etc/built-in-docstrings' not found
warning: docstring file '/usr/share/octave/3.8.2/etc/built-in-docstrings' not found
warning: docstring file '/usr/share/octave/3.8.2/etc/built-in-docstrings' not found
[...]
-- A test cmake run with language = D enabled failed with the following output:</module></string>


-- CMAKE_GENERATOR = Unix Makefiles
-- D Compiler Install Prefix (use D_PATH env var to override):
-- Check for working D compiler: /bin/dmd
-- Check for working D compiler: /bin/dmd -- broken
-- To force a specific D compiler set the DC environment variable
-- ie - export DC="/opt/dmd/bin/dmd"
-- If the D path is not set please use the D_PATH variable
-- ie - export D_PATH="/opt/dmd"
CMake Error at /usr/local/software/plplot-5.13.0/cmake/modules/language_support/cmake/CMakeTestDCompiler.cmake:52 (MESSAGE):
The D compiler "/bin/dmd" is not able to compile a simple test program.

It fails with the following output:

Change Dir: /usr/local/software/plplot-5.13.0/build_dir/language_tests/D/CMakeFiles/CMakeTmp

Run Build Command:"/bin/gmake" "cmTC_9761b/fast"

/bin/gmake -f CMakeFiles/cmTC_9761b.dir/build.make
CMakeFiles/cmTC_9761b.dir/build

gmake[1]: Entering directory
`/usr/local/software/plplot-5.13.0/build_dir/language_tests/D/CMakeFiles/CMakeTmp'

Building D object CMakeFiles/cmTC_9761b.dir/testDCompiler.o

/bin/dmd -version=Posix -I/include -I/import
-ofCMakeFiles/cmTC_9761b.dir/testDCompiler.o -c
/usr/local/software/plplot-5.13.0/build_dir/language_tests/D/CMakeFiles/CMakeTmp/testDCompiler.d

Error: version identifier Posix is reserved and cannot be set

gmake[1]: *** [CMakeFiles/cmTC_9761b.dir/testDCompiler.o] Error 1

gmake[1]: Leaving directory
`/usr/local/software/plplot-5.13.0/build_dir/language_tests/D/CMakeFiles/CMakeTmp'

gmake: *** [cmTC_9761b/fast] Error 2

CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:11 (enable_language)

-- Configuring incomplete, errors occurred!
See also "/usr/local/software/plplot-5.13.0/build_dir/language_tests/D/CMakeFiles/CMakeOutput.log".
See also "/usr/local/software/plplot-5.13.0/build_dir/language_tests/D/CMakeFiles/CMakeError.log".


-- WARNING: no working D compiler so disabling D binding and examples.
-- FindShapelib: Found shapelib header directory, /usr/include, and library, /usr/lib64/libshp.so.
-- Found Freetype: /usr/lib64/libfreetype.so (found version "2.8.0")
-- FREETYPE_CFLAGS = -I/usr/include/freetype2
-- FREETYPE_LIBRARIES = /usr/lib64/libfreetype.so
Fonts not found - disabling freetype
[...]
-- WARNING: pkg-config does not find pango.
[...]
-- WARNING: pkg-config does not find pangoft2.
[...]
-- WARNING: pango and/or cairo not found with pkg-config.
Disabling cairo drivers. To enable these drivers you must install
development versions of pango and cairo and/or set
the environment variable PKG_CONFIG_PATH appropriately.
[...]
cflags =
-- WARNING: pango, pangoft2, or lasi not found with pkg-config.
Setting PLD_psttf to OFF. Please install all of these packages
and/or set the environment variable PKG_CONFIG_PATH appropriately.
-- Found unsuitable Qt version "" from NOTFOUND
-- WARNING: Suitable Qt4 development environment not found so trying Qt5 instead.
CMake Warning at cmake/modules/qt.cmake:144 (find_package):
By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Qt5", but
CMake did not find one.

Could not find a package configuration file provided by "Qt5" (requested
version 5.3.1) with any of the following names:

Qt5Config.cmake
qt5-config.cmake

Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"
to a directory containing one of the above files. If "Qt5" provides a
separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
cmake/modules/drivers.cmake:96 (include)
cmake/modules/plplot.cmake:556 (include)
CMakeLists.txt:125 (include)

-- WARNING: Suitable Qt5 development environment not found so disabling qt
-- WARNING: ENABLE_qt is OFF so setting all qt devices to OFF.
-- WARNING: PLPLOT_USE_QT5 is ON so setting ENABLE_pyqt4 to OFF.
-- WARNING: ENABLE_python is OFF so setting ENABLE_pyqt5 to OFF.
[...]
-- Checking whether wxwidgets version >= 3.0.0
-- Performing Test WX_VERSION_LARGE_ENOUGH
-- Performing Test WX_VERSION_LARGE_ENOUGH - Failed
-- WARNING: wxWidgets version is less than 3.0.0 so setting all wxwidgets devices to OFF.
-- WARNING: PLD_wxwidgets is OFF so setting ENABLE_wxwidgets to OFF.
-- WARNING: ENABLE_wxwidgets is OFF so setting all wxwidgets devices to OFF.
[...]
-- Checking whether libharu version >= 2.3.0
-- Performing Test LIBHARU_VERSION_LARGE_ENOUGH
-- Performing Test LIBHARU_VERSION_LARGE_ENOUGH - Failed
-- WARNING: libharu version is less than 2.3.0 (required for handling medium-large fonts and other fixes) so setting PLD_pdf to OFF.
-- OCAMLC = /bin/ocamlc.opt
-- CAMLIDL = /bin/camlidl
-- OCAMLMKLIB = /bin/ocamlmklib
-- OCAMLOPT = /bin/ocamlopt.opt
-- WARNING: The ocamlfind application not found.
-- OCAML_LIB_PATH = /usr/lib64/ocaml
-- CAMLIDL_LIB_DIR = /usr/lib64/ocaml
-- WARNING: ocamlfind not available. Disabling Plcairo module and lablgtk2 support
-- validate target will be available to check for syntax issues in the PLplot DocBook documentation using /bin/env SP_CHARSET_FIXED=yes SP_ENCODING=xml /bin/onsgmls.
pc_libplplot_LINK_FLAGS = /usr/lib64/libltdl.so;/usr/lib64/libm.so;/usr/lib64/libshp.so;-lcsirocsa;-lcsironn;-lqhull;-lqsastime
-- WARNING concerning spurious warning messages generated by the gfortran compiler.
The new Fortran binding is known to generate some ~50 "marked
PRIVATE" warning messages when building the plplotfortran target with the
gfortran Fortran compiler. A typical example of such a warning
message is

Warning: Symbol 'interface_plcont' at (1) is marked PRIVATE but has been given the binding label 'c_plcont'

It appears these warnings (which do not occur if using the ifort or
nagfor Fortran compilers) are due to a gfortran bug (see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49111 and
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64861), i.e., they
are spurious warnings concerning completely valid use of the
private attribute for interface blocks describing C routines.
There appear to be no known negative consequences of this gfortran
bug other than the spurious warnings themselves. Until this gfortran
bug is fixed, these ~50 "marked PRIVATE" warnings should just be
ignored for those using gfortran.
[...]

Executing the subsequent make command runs into trouble.
[root@ build_dir]# make VERBOSE=1 >& make.out
I am attaching the make.out file.

Any ideas for how to fix the gfortran 'c_loc' error are greatly appreciated. Thanks!