[MacPorts] #72325: Unable to build gate (Error: Failed to build gate: command execution failed)

MacPorts noreply at macports.org
Tue Apr 15 09:50:07 UTC 2025


#72325: Unable to build gate (Error: Failed to build gate: command execution
failed)
------------------------+--------------------
  Reporter:  ecramer22  |      Owner:  (none)
      Type:  defect     |     Status:  new
  Priority:  Normal     |  Milestone:
 Component:  ports      |    Version:  2.10.5
Resolution:             |   Keywords:
      Port:  gate       |
------------------------+--------------------

Comment (by tomio-arisaka):

 I tried to install GATE 8.2 on macOS 10.13.6 (High Sierra).

 I cannot install the current version of root6 because C++17 is required.
 So I decided to install the version 6.28.08 of root6 with an old portfile
 as follows:

 (1) get an old portfile for the version 6.28.08 of root6:

 {{{
 $ curl -LOR https://raw.githubusercontent.com/macports/macports-
 ports/696a569f833b4b339c660bffe525196638791454/science/root6/Portfile
 }}}

 (2) apply the next patch to the downloaded portfile:


 {{{
 $ diff -u Portfile.old Portfile
 --- Portfile.old        2025-04-13 04:03:50.000000000 +0900
 +++ Portfile    2025-04-13 05:00:00.000000000 +0900
 @@ -13,6 +13,8 @@

  # Please also check if Gate needs a revbump after root6 update
  github.setup        root-project root 6-28-08 v
 +# Change github.tarball_from to 'releases' or 'archive' next update
 +github.tarball_from tarball
  version             [string map {- .} ${github.version}]
  revision            0
  livecheck.version   ${github.version}
 @@ -170,17 +172,10 @@
  # https://root-forum.cern.ch/t/v6-22-00-build-error-on-macos/40239
  configure.args-append -Druntime_cxxmodules=OFF

 -# Enable C++17 on 10.14 and newer (Darwin 18+)
 -#        C++14 otherwise
 -if {${os.platform} ne "darwin" || ${os.major} >= 18} {
 -    compiler.cxx_standard 2017
 -    configure.args-replace  -Dcxx17=OFF -Dcxx17=ON
 -    configure.args-replace  -Droot7=OFF -Droot7=ON
 -} else {
 -    compiler.cxx_standard 2014
 -    configure.args-replace  -Dcxx14=OFF -Dcxx14=ON
 -}
 -cmake.set_cxx_standard      yes
 +# Enable C++14
 +compiler.cxx_standard   2014
 +cmake.set_cxx_standard  yes
 +configure.args-replace  -Dcxx14=OFF -Dcxx14=ON

  # Configure the C++ runtime to use
  if { ${configure.cxx_stdlib} ne "libc++" } {
 }}}

 (3) build root6-6.28.08 with the patched portfile:

 {{{
 $ sudo port install root6 configure.compiler=macports-clang-17
 }}}
   "{{{configure.compiler=macports-clang-17}}}" option means that I need a
 new clang due to my old macOS, so I guess you don't need it.

 I installed GATE 8.2 as follows:

 (1) apply the next patch to a copy of the GATE portfile:


 {{{
 $ diff -u Portfile.orig Portfile
 --- Portfile.orig       2025-01-27 12:14:41.000000000 +0900
 +++ Portfile    2025-04-13 19:32:02.000000000 +0900
 @@ -28,7 +28,8 @@
                      sha256
 01185c6c448df227e081113abbfd04b71d638f7365269a492a917d0dae7db5a9 \
                      size    2473245

 -compiler.cxx_standard   2011
 +compiler.cxx_standard   2014
 +cmake.set_cxx_standard  yes

  # Force the same compiler as ROOT6 is using
  # https://trac.macports.org/ticket/57735
 @@ -65,7 +66,7 @@
                      patch-cxxstandard.diff

  post-patch {
 -    reinplace "s|@@CXX_STANDARD@@|c++17|g" ${worksrcpath}/CMakeLists.txt
 +    reinplace "s|@@CXX_STANDARD@@|c++14|g" ${worksrcpath}/CMakeLists.txt
  }

  configure.args-append \
 }}}

 (2) build GATE 8.2 with the patched portfile:

 {{{
 $ sudo port install gate configure.compiler=macports-clang-17
 }}}

 I am not familiar with GATE, but I checked that it worked with the next
 example:\\

 https://github.com/BenAuer2021/Simulation-And-Reconstruction-Of-Nuclear-
 Medicine-Imaging-Systems-PET

-- 
Ticket URL: <https://trac.macports.org/ticket/72325#comment:9>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list