Discussion:
[MacPorts] #57735: Gate: fatal error: 'string_view' file not found
MacPorts
2018-12-06 08:01:52 UTC
Permalink
#57735: Gate: fatal error: 'string_view' file not found
--------------------+----------------------
Reporter: mojca | Owner: mojca
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Keywords: | Port: gate
--------------------+----------------------
Gate build on the buildbot is currently failing:
{{{
/usr/bin/clang++ -DG4INTY_USE_QT -DG4UI_USE -DG4UI_USE_QT -DG4UI_USE_TCSH
-DG4VERBOSE -DG4VIS_USE -DG4VIS_USE_OPENGL -DG4VIS_USE_OPENGLQT
-DG4_STORE_TRAJECTORY -F//System/Library/Frameworks
-I/opt/local/libexec/root6/include/root -I/opt/local/include/libxml2
-I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_science_gate/gate/work/build
-I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_science_gate/gate/work/Gate-8.1.p01/source/arf/include
-I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_science_gate/gate/work/Gate-8.1.p01/source/geometry/include
-I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_science_gate/gate/work/Gate-8.1.p01/source/physics/include
-I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_science_gate/gate/work/Gate-8.1.p01/source/digits_hits/include
-I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_science_gate/gate/work/Gate-8.1.p01/source/general/include
-I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_science_gate/gate/work/Gate-8.1.p01/source/externals/clhep/include
-I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_science_gate/gate/work/Gate-8.1.p01/source/externals
/itk-mhd
-I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_science_gate/gate/work/Gate-8.1.p01/source/externals
/itk-mhd/itkzlib
-I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_science_gate/gate/work/Gate-8.1.p01/source/externals
/itk-mhd/src
-I/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_science_gate/gate/work/build
/itk-mhd -isystem /opt/local/include/Geant4/Geant4.10.4/Geant4 -isystem
/opt/local/include -isystem /opt/local/libexec/qt4/include -isystem
/opt/local/libexec/qt4/include/QtCore -isystem
/opt/local/libexec/qt4/include/QtGui -isystem
/opt/local/libexec/qt4/include/QtOpenGL -pipe -Os -stdlib=libc++ -W -Wall
-pedantic -Wno-non-virtual-dtor -Wno-long-long -Wwrite-strings -Wpointer-
arith -Woverloaded-virtual -Wno-variadic-macros -Wshadow -pipe -Qunused-
arguments -stdlib=libc++ -DG4USE_STD11 -std=c++11 -Wno-shadow -std=c++11
-arch x86_64 -mmacosx-version-min=10.9 -std=c++11 -o
CMakeFiles/Gate.dir/source/arf/src/GateARFSD.cc.o -c
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_science_gate/gate/work/Gate-8.1.p01/source/arf/src/GateARFSD.cc
In file included from
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_science_gate/gate/work/Gate-8.1.p01/source/arf/src/GateARFTableMgr.cc:15:
In file included from
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_science_gate/gate/work/Gate-8.1.p01/source/arf/include/GateARFTable.hh:17:
In file included from /opt/local/libexec/root6/include/root/TROOT.h:28:
In file included from
/opt/local/libexec/root6/include/root/TDirectory.h:25:
In file included from /opt/local/libexec/root6/include/root/TNamed.h:26:
In file included from /opt/local/libexec/root6/include/root/TString.h:28:
/opt/local/libexec/root6/include/root/ROOT/RStringView.hxx:19:10: fatal
error: 'string_view' file not found
#include <string_view>
^
}}}

*
[https://build.macports.org/builders/ports-10.9_x86_64-builder/builds/75207/
10.9]
*
[https://build.macports.org/builders/ports-10.10_x86_64-builder/builds/73388/
10.10]
*
[https://build.macports.org/builders/ports-10.11_x86_64-builder/builds/72882/
10.11]
* 10.12
*
[https://build.macports.org/builders/ports-10.13_x86_64-builder/builds/43519/
10.13]
*
[https://build.macports.org/builders/ports-10.14_x86_64-builder/builds/17361/
10.14]

The builds on older systems are broken because `root6` doesn't compile
there.
--
Ticket URL: <https://trac.macports.org/ticket/57735>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-12-06 08:04:43 UTC
Permalink
#57735: Gate: fatal error: 'string_view' file not found
---------------------+----------------------
Reporter: mojca | Owner: mojca
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: gate |
---------------------+----------------------

Comment (by mojca):

See also https://root-forum.cern.ch/t/string-view-problem/26818
--
Ticket URL: <https://trac.macports.org/ticket/57735#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-12-06 08:51:27 UTC
Permalink
#57735: Gate: fatal error: 'string_view' file not found
---------------------+----------------------
Reporter: mojca | Owner: mojca
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: gate |
---------------------+----------------------

Comment (by mojca):

I assume that's because C++17 is needed. 10.13 seems to compile this fine,
while it fails on 10.11 and earlier.
I assume I need to include the `cxx17` PortGroup :)
--
Ticket URL: <https://trac.macports.org/ticket/57735#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-12-07 01:34:26 UTC
Permalink
#57735: Gate: fatal error: 'string_view' file not found
---------------------+----------------------
Reporter: mojca | Owner: mojca
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: gate |
---------------------+----------------------

Comment (by kencu):

It's a big piece of software, so exploring all the workable combinations
could be a large project. However, on 10.9, you can have success:
{{{
$ port -v installed gate
The following ports are currently installed:
gate @8.1.p01_0+geant4104+qt4 (active) platform='darwin 13'
archs='x86_64' date='2018-12-06T17:28:13-0800'
}}}

if you force the compiler to be macports-clang-7.0, and if you change
{{{-std=c++11}}} to {{{-std=c++17}}} in the top-level CMakeLists.txt.

Still, a -std=c++11 still slips into the build line from somewhere (some
portgroup?), but it doesn't seem to cause the build to fail.
{{{
/opt/local/bin/clang++-mp-7.0 -DG4INTY_USE_QT -DG4UI_USE -DG4UI_USE_QT
-DG4UI_USE_TCSH -DG4VERBOSE -DG4VIS_USE -DG4VIS_USE_OPENGL
-DG4VIS_USE_OPENGLQT -DG4_STORE_TRAJECTORY -F//System/Library/Frameworks
-I/opt/local/libexec/root6/include/root -I/opt/local/include/libxml2
-I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_gate/gate/work/build
-I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_gate/gate/work/Gate-8.1.p01/source/arf/include
-I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_gate/gate/work/Gate-8.1.p01/source/geometry/include
-I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_gate/gate/work/Gate-8.1.p01/source/physics/include
-I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_gate/gate/work/Gate-8.1.p01/source/digits_hits/include
-I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_gate/gate/work/Gate-8.1.p01/source/general/include
-I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_gate/gate/work/Gate-8.1.p01/source/externals/clhep/include
-I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_gate/gate/work/Gate-8.1.p01/source/externals
/itk-mhd
-I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_gate/gate/work/Gate-8.1.p01/source/externals
/itk-mhd/itkzlib
-I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_gate/gate/work/Gate-8.1.p01/source/externals
/itk-mhd/src
-I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_gate/gate/work/build
/itk-mhd -isystem /opt/local/include/Geant4/Geant4.10.4/Geant4 -isystem
/opt/local/include -isystem /opt/local/libexec/qt4/include -isystem
/opt/local/libexec/qt4/include/QtCore -isystem
/opt/local/libexec/qt4/include/QtGui -isystem
/opt/local/libexec/qt4/include/QtOpenGL -pipe -Os -stdlib=libc++ -W -Wall
-pedantic -Wno-non-virtual-dtor -Wno-long-long -Wwrite-strings -Wpointer-
arith -Woverloaded-virtual -Wno-variadic-macros -Wshadow -pipe -Qunused-
arguments -stdlib=libc++ -DG4USE_STD11 -std=c++11 -Wno-shadow -std=c++17
-arch x86_64 -mmacosx-version-min=10.9 -std=c++11 -o
CMakeFiles/Gate.dir/source/physics/src/GateeMultipleScatteringPB.cc.o -c
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_gate/gate/work/Gate-8.1.p01/source/physics/src/GateeMultipleScatteringPB.cc
}}}
--
Ticket URL: <https://trac.macports.org/ticket/57735#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-12-07 01:42:15 UTC
Permalink
#57735: Gate: fatal error: 'string_view' file not found
---------------------+----------------------
Reporter: mojca | Owner: mojca
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: gate |
---------------------+----------------------

Comment (by kencu):

I think that other {{{-std=c++11}}} is getting in there from this config
call:
{{{
$ /opt/local/libexec/Geant4/Geant4.10.4/geant4-config --cflags
-DG4VIS_USE_OPENGL -DG4UI_USE_TCSH -DG4INTY_USE_QT -DG4UI_USE_QT
-DG4VIS_USE_OPENGLQT -I/opt/local/libexec/qt4/include/QtCore
-I/opt/local/libexec/qt4/include/QtGui
-I/opt/local/libexec/qt4/include/QtOpenGL -pipe -Os -stdlib=libc++ -W
-Wall -pedantic -Wno-non-virtual-dtor -Wno-long-long -Wwrite-strings
-Wpointer-arith -Woverloaded-virtual -Wno-variadic-macros -Wshadow -pipe
-Qunused-arguments -stdlib=libc++ -DG4USE_STD11 -std=c++11
-I/opt/local/include/Geant4/Geant4.10.4/Geant4
}}}
at this moment I'm not sure how you can get that out of there -- although
it seems to work if there a previous -std=c++17 in the build line anyway.
--
Ticket URL: <https://trac.macports.org/ticket/57735#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-12-07 01:54:43 UTC
Permalink
#57735: Gate: fatal error: 'string_view' file not found
---------------------+----------------------
Reporter: mojca | Owner: mojca
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: gate |
---------------------+----------------------

Comment (by kencu):

{{{geant4-config}}} is just a shell script. You can change it as you wish
to, with a text editor. Perhaps there is a way to process it's output on
the fly as well -- you'd know about that better than I do.
--
Ticket URL: <https://trac.macports.org/ticket/57735#comment:5>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-12-07 03:36:36 UTC
Permalink
#57735: Gate: fatal error: 'string_view' file not found
---------------------+----------------------
Reporter: mojca | Owner: mojca
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: gate |
---------------------+----------------------

Comment (by cjones051073):

Hacking geant4-config after the fact is I think not the way to go. Instead
I would first look to updating the geant4 build to enable cxx17 there.
Then, geant4-config should automatically reflect this.

Aslo, take a look at the compiler settings in root6. There I believe I
already force the use of MPs clang 7 on 10.12 and older, for essentially
the same reason as here.
--
Ticket URL: <https://trac.macports.org/ticket/57735#comment:6>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-12-07 03:38:15 UTC
Permalink
#57735: Gate: fatal error: 'string_view' file not found
---------------------+----------------------
Reporter: mojca | Owner: mojca
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: gate |
---------------------+----------------------

Comment (by cjones051073):

Btw Is there a cxx17 portgroup now ?
--
Ticket URL: <https://trac.macports.org/ticket/57735#comment:7>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-12-07 03:50:24 UTC
Permalink
#57735: Gate: fatal error: 'string_view' file not found
---------------------+----------------------
Reporter: mojca | Owner: mojca
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: gate |
---------------------+----------------------

Comment (by kencu):

BTW, you actually don't have to hack geant4-config, in the end -- it works
as is.

Seems like the root6, geant4, and gate ports might all need to decide on
the c++ standard they want to share, more or less together, so they'll be
in sync.
--
Ticket URL: <https://trac.macports.org/ticket/57735#comment:8>
MacPorts <https://www.macports.org/>
Ports system for macOS
Loading...