This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Build failure on macOS Big Sur
Type: compile error Stage: resolved
Components: macOS Versions: Python 3.10
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Ghyslain Leclerc, ned.deily, ronaldoussoren
Priority: normal Keywords:

Created on 2022-03-16 01:19 by Ghyslain Leclerc, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
build.out Ghyslain Leclerc, 2022-03-16 01:20
Messages (4)
msg415312 - (view) Author: Ghyslain Leclerc (Ghyslain Leclerc) Date: 2022-03-16 01:19
I have tried to compile python on macOS and I have failed.

I have cloned the cpython repository, then used ./configure and make.  There are build errors on my system.  They seem related to https://bugs.python.org/issue42692.

I have tried the __has_builtin(__builtin_available) code in a single main.c file and it compiles and has the appropriate behavior.  I have then tried to add #warnings in the file posixmodule.c.  It seems that when compiling this file, the preprocessor define does not work.

I run macOS version 11.6.4 (20G417).  I have Xcode Version 13.0 (13A233).  The compiler version is:
  Apple clang version 13.0.0 (clang-1300.0.29.3)
  Target: x86_64-apple-darwin20.6.0

Thank you.
msg415313 - (view) Author: Ghyslain Leclerc (Ghyslain Leclerc) Date: 2022-03-16 01:20
Here is a build output.
msg415316 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2022-03-16 01:58
You don't say exactly what changeset of the cpython repo you are trying to build from. The line numbers in the compiler warnings in your build.out extract do not seem to match up with either a current 3.10 branch checkout or a main branch checkout. Please make sure your repo is up-to-date with the current github version for whatever branch you are trying to build. You shouldn't have any problems like shown when building any of the current branches on macOS 11.6.x with its current Xcode or Command Line Tools installed. The Python Developers Guide might be of assistance:

https://devguide.python.org

If you still have problems, please show the output of:

   git show

as well as the exact configure and make commands in use, and the complete configure and make output.
msg415322 - (view) Author: Ghyslain Leclerc (Ghyslain Leclerc) Date: 2022-03-16 02:28
Thank you for your quick answer.  Your comment about the configure output has made me think to look at it more carefully.  No error was reported, so I did not think to look at it before.  Looking at it and trying to figure out the problems, I figured out the problem and was able to compile.

Just to give more info for anyone running into the same problem, I had a clean checkout of the v3.10.2 tag.  The problem was that I actually had a gcc version installed from MacPorts and it seems that it was getting picked up.  When I removed it from my path, everything started compiling fine.

Sorry for making you waste your time.  This issue can be closed.  Thanks again.
History
Date User Action Args
2022-04-11 14:59:57adminsetgithub: 91189
2022-03-16 02:28:31Ghyslain Leclercsetstatus: open -> closed
stage: resolved
2022-03-16 02:28:14Ghyslain Leclercsetmessages: + msg415322
2022-03-16 01:58:21ned.deilysetmessages: + msg415316
2022-03-16 01:20:45Ghyslain Leclercsetfiles: + build.out

messages: + msg415313
2022-03-16 01:19:48Ghyslain Leclerccreate