[MacPorts] #66364: python311 fails to build with GCC: error: expected identifier or '(' before '#pragma'

MacPorts noreply at macports.org
Tue Nov 29 06:38:37 UTC 2022


#66364: python311 fails to build with GCC: error: expected identifier or '(' before
'#pragma'
--------------------------+-----------------------
 Reporter:  barracuda156  |      Owner:  jmroot
     Type:  defect        |     Status:  assigned
 Priority:  Normal        |  Milestone:
Component:  ports         |    Version:  2.8.0
 Keywords:                |       Port:  python311
--------------------------+-----------------------
 {{{
 In file included from ./Include/Python.h:38,
                  from Python/pylifecycle.c:3:
 ./Include/pyport.h:351:28: error: expected identifier or '(' before
 '#pragma'
   351 | #define _Py_COMP_DIAG_PUSH _Pragma("GCC diagnostic push")
       |                            ^~~~~~~
 Python/pylifecycle.c:99:1: note: in expansion of macro
 '_Py_COMP_DIAG_PUSH'
    99 | _Py_COMP_DIAG_PUSH
       | ^~~~~~~~~~~~~~~~~~
 /opt/local/bin/gcc-mp-12 -c -fno-common -dynamic -DNDEBUG -g -fwrapv -O3
 -Wall -pipe -Os -arch ppc   -std=c11 -Werror=implicit-function-declaration
 -fvisibility=hidden  -I./Include/internal  -I. -I./Include
 -I/opt/local/include   -DPy_BUILD_CORE -o Python/pystate.o
 Python/pystate.c
 make: *** [Python/pylifecycle.o] Error 1
 }}}

 Identical error on 10.6.8 and 10A190.

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


More information about the macports-tickets mailing list