[MacPorts] #71968: wabt fails to configure: needs C++17 and Python 3.x

MacPorts noreply at macports.org
Thu Jan 30 13:26:54 UTC 2025


#71968: wabt fails to configure: needs C++17 and Python 3.x
---------------------------+------------------------
  Reporter:  barracuda156  |      Owner:  easieste@…
      Type:  defect        |     Status:  assigned
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:  2.10.5
Resolution:                |   Keywords:
      Port:  wabt          |
---------------------------+------------------------

Comment (by ryandesign):

 Replying to [comment:3 easye]:
 > After deactivating all my installed Python ports, my configuration run
 picked up the system Python:
 >
 > {{{
 > -- Found Python3: /usr/bin/python3 (found suitable version "3.9.6",
 minimum required is "3.5") found components: Interpreter
 > }}}
 >
 > 1.  Can I just let this default to the system Python?

 As you can see from the original report, the system python on the user's
 system was not python 3.5 or later and was therefore insufficient. Python
 3 is only included with macOS 10.15 and later.

 > 2.  Otherwise, is there a way to specify a minimum Python version rather
 than depending on an exact version?

 You must depend on an exact version. To minimize dependencies for current
 systems, you can choose to use MacPorts python 3 for macOS 10.14 and
 earlier and macOS python 3 for macOS 10.15 and later, but in both cases
 you should specify the complete absolute path to the python that should be
 used, otherwise the build is less [wiki:ReproducibleBuilds reproducible].


 Replying to [comment:5 barracuda156]:
 > I do not know the exact threshold, but obviously it failed for me with
 system python. Maybe this works?
 > {{{
 > if {${os.platform} eq "darwin" && ${os.major} < 11} {
 >     depends_build-append    port:python311
 >     license_noconflict      python311
 >     configure.python        ${prefix}/bin/python3.11
 > } elseif {${os.platform} eq "darwin" && ${os.major} >= 19} {
 >     configure.python        /usr/bin/python3
 > } else {
 >     configure.python        /usr/bin/python
 > }
 > }}}

 As you showed in your error message, python 3.5 or later is required.
 /usr/bin/python is python 2 and will not work for this port.

 As of January 1, 2025, the preferred python version in MacPorts is 3.13 so
 if the port needs to use a MacPorts python it should use python313.

 Replying to [comment:8 easye]:
 > Disable cmake python requirement via patch (only used for tests).

 Great, if python isn't actually used, then disabling the requirement is
 fine. However you shouldn't ever need to use a patch to disable a cmake
 `find_package` call. Instead, add a configure argument. See
 https://cmake.org/cmake/help/latest/variable/CMAKE_DISABLE_FIND_PACKAGE_PackageName.html.

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


More information about the macports-tickets mailing list