Opened 16 months ago

Last modified 16 months ago

#66364 assigned defect

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

Reported by: barracuda156 Owned by: jmroot (Joshua Root)
Priority: Normal Milestone:
Component: ports Version: 2.8.0
Keywords: Cc:
Port: python311

Description

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.

Attachments (1)

main.log (104.9 KB) - added by barracuda156 16 months ago.
This is from 10.6.8 x86_64; same error on Rosetta and 10A190

Download all attachments as: .zip

Change History (2)

Changed 16 months ago by barracuda156

Attachment: main.log added

This is from 10.6.8 x86_64; same error on Rosetta and 10A190

comment:1 Changed 16 months ago by barracuda156

Opened an issue with upstream: https://github.com/python/cpython/issues/99865

Version 0, edited 16 months ago by barracuda156 (next)
Note: See TracTickets for help on using tickets.