Opened 4 months ago

Last modified 4 months ago

#69121 assigned defect

py312-cython tries to use Xcode clang on 10.6.8 Rosetta and fails

Reported by: barracuda156 Owned by: stromnov (Andrey Stromnov)
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: snowleopard, powerpc, rosetta Cc: ryandesign (Ryan Carsten Schmidt), catap (Kirill A. Korinsky)
Port: py312-cython

Description

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.

Attachments (1)

py312-cython_Rosetta.log (46.8 KB) - added by barracuda156 4 months ago.

Download all attachments as: .zip

Change History (2)

Changed 4 months ago by barracuda156

Attachment: py312-cython_Rosetta.log added

comment:1 Changed 4 months ago by kencu (Ken)

Never using clang as a PPC compiler should indeed be fixed in one place.

We suggested the one place last year, but for some reason we did not seem to suggest it correctly.

We can try again.

Note: See TracTickets for help on using tickets.