-
Notifications
You must be signed in to change notification settings - Fork 4
Description
As a sysadmin attempting to follow a future version of the Dataverse Installation Guide, I would like to install prov-cpl on RHEL/CentOS (the recommended distribution for Dataverse) as an RPM using yum rather than compiling it myself. The Dataverse Installation Guide already hosts an RPM for rapache at http://guides.dataverse.org/en/4.8.5/installation/r-rapache-tworavens.html#c-rapache (see IQSS/dataverse#975 for initial work on this) so the idea is to do the same with prov-cpl, except that we'll be writing the RPM spec file ourselves rather than using one that has been provided by the author. Once we get the RPM spec file working, we'll make a pull request to add it to this prov-cpl repo unless there are any objections.
The good news is that yesterday I was able to get prov-cpl to build on Ubuntu 10.04 using a script I wrote at https://github.com/IQSS/dataverse/blob/84011328dc60f6fadc846a639fc26240cb55832b/doc/sphinx-guides/source/_static/developers/prov/install/vagrant.sh
The bad news is that the compiler on CentOS 7 is too old. Here's the output from make install:
[root@standalone prov-cpl]# make install
In file included from ../include/cplxx.h:50:0,
from cpl-private.h:38,
from cpl-standalone.cpp:36:
cpl-standalone/../include/json.hpp:67:10: error: #error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers"
#error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers"
^
make[2]: *** [build/release/project.mk] Error 1
make[1]: *** [release] Error 2
make: *** [install] Error 1
[root@standalone prov-cpl]# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
[root@standalone prov-cpl]#
[root@standalone prov-cpl]# g++ --version
g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)
https://github.com/nlohmann/json#supported-compilers indicates that "GCC 4.9 - 7.2 (and possibly later)" is supported. (Other compilers I haven't used much such as Clang are also listed.) According to the error above, CentOS 7 ships with GCC 4.8.5. How can I install a newer version of GCC on CentOS 7? Are there other ways to get prov-cpl to compile on RHEL/CentOS?