Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
barracuda156 opened this issue Nov 29, 2022 · 1 comment
Labels
type-bug An unexpected behavior, bug, or error

Comments

@barracuda156
Copy link

Bug report

When built with GCC, python311 fails:

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

Your environment

  • CPython versions tested on: python311
  • Operating system and architecture: macOS 10.6.8 (both x86_64 and ppc)
  • GCC 12.2.0
@barracuda156 barracuda156 added the type-bug An unexpected behavior, bug, or error label Nov 29, 2022
@ronaldoussoren ronaldoussoren added the pending The issue will be closed if no feedback is provided label Nov 29, 2022
@ronaldoussoren
Copy link
Contributor

This should be fixed in the repository for both the main branch and the 3.11 branch, issue #99337. That issue was fixed after the last release, the fix will be included in the next bug fix release for 3.11.

@ronaldoussoren ronaldoussoren removed the pending The issue will be closed if no feedback is provided label Dec 2, 2022
@ronaldoussoren ronaldoussoren closed this as not planned Won't fix, can't repro, duplicate, stale Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants