[MacPorts] #69121: py312-cython tries to use Xcode clang on 10.6.8 Rosetta and fails

MacPorts noreply at macports.org
Wed Jan 17 15:12:30 UTC 2024


#69121: py312-cython tries to use Xcode clang on 10.6.8 Rosetta and fails
-------------------------------------------+--------------------------
 Reporter:  barracuda156                   |      Owner:  stromnov
     Type:  defect                         |     Status:  assigned
 Priority:  Normal                         |  Milestone:
Component:  ports                          |    Version:  2.8.1
 Keywords:  snowleopard, powerpc, rosetta  |       Port:  py312-cython
-------------------------------------------+--------------------------
 Current `py312-cython` fails to build on 10.6.8 Rosetta. (AFAIK, this is
 genuinely standard 10.6.8 issue, not affecting a native developer build of
 10.6 ppc or at least surely not specific to it. I am not trying to sneak
 in 10A190 stuff here.)

 Looks like something is picking wrong compilers:

 {{{
 :debug:configure Preferred compilers: gcc-4.2 llvm-gcc-4.2 clang gcc-4.0
 macports-gcc-13 macports-gcc-12 macports-gcc-11 macports-gcc-10 macports-
 gcc-9 macports-gcc-8 macports-gcc-7 macports-gcc-6 macports-gcc-5
 :debug:configure Using compiler 'Xcode Clang'
 }}}

 Then the build fails:
 {{{
 :info:build /usr/bin/clang -fno-strict-overflow -fno-common -dynamic
 -DNDEBUG -g -O3 -Wall -pipe -Os -arch ppc -isysroot/
 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12
 -c
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
 .org_macports_release_tarballs_ports_python_py-
 cython/py312-cython/work/Cython-3.0.8/Cython/Compiler/Parsing.c -o
 build/temp.macosx-10.6-ppc-
 cpython-312/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
 .org_macports_release_tarballs_ports_python_py-
 cython/py312-cython/work/Cython-3.0.8/Cython/Compiler/Parsing.o
 :info:build clang: warning: not using the clang compiler for the 'powerpc'
 architecture
 :info:build In file included from
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
 .org_macports_release_tarballs_ports_python_py-
 cython/py312-cython/work/Cython-3.0.8/Cython/Compiler/Parsing.c:91994:
 :info:build
 /opt/local/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12/internal/pycore_frame.h:
 In function ‘_PyFrame_Initialize’:
 :info:build
 /opt/local/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12/internal/pycore_frame.h:134:
 error: ‘for’ loop initial declaration used outside C99 mode
 :info:build error: command '/usr/bin/clang' failed with exit code 1
 :info:build ERROR Backend subprocess exited when trying to invoke
 build_wheel
 :info:build Command failed:  cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
 .org_macports_release_tarballs_ports_python_py-
 cython/py312-cython/work/Cython-3.0.8" &&
 /opt/local/Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12
 -m build --no-isolation --wheel --outdir
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
 .org_macports_release_tarballs_ports_python_py-cython/py312-cython/work
 :info:build Exit code: 1
 }}}

 `gcc-4.2` is bypassed due to the blacklist in the portfile.

 It looks like despite some fixes to compiler choice, clangs still get
 pulled in occasionally for powerpc builds. They should just ''never'' be
 used for anything powerpc, unless a port maintainer overrides that for
 some very specific reason.

 For this port specifically we can perhaps add `{clang < 400}` to blacklist
 line, but tbh this should be fixed once and for all, so we avoid per-port
 hacks and do not annoy or waste time of port maintainers with similar
 issues every once in a while.

-- 
Ticket URL: <https://trac.macports.org/ticket/69121>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list