classification
Title: Python fails to build (aarch64-apple-darwin20.5.0)
Type: compile error Stage: resolved
Components: Build Versions: Python 3.11
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: jack__d
Priority: normal Keywords:

Created on 2021-07-21 18:09 by jack__d, last changed 2021-07-21 21:58 by jack__d. This issue is now closed.

Messages (3)
msg397957 - (view) Author: Jack DeVries (jack__d) * Date: 2021-07-21 18:09
I believe this is a problem with my machine because I've tried checking out to known good commits (which worked on my machine before) and have the same issue, but I've tried everything and don't really know what to do next. I'm hoping someone can help me, and who knows – maybe it is a bug!

This is the command that fails::

   gcc  -Wl,-stack_size,1000000  -framework CoreFoundation \
      -o Programs/_testembed Programs/_testembed.o libpython3.11d.a -ldl   \
      -framework CoreFoundation

The linker is ignoring `libpython3.11d.a`, providing the following warning::

   ignoring file libpython3.11d.a, building for macOS-arm64 but attempting to link with file 
   built for macOS-arm64

Of course, what follows is a ton of undefined symbol errors; no surprises there. I don't understand how to fix the error, why it is happening, or how this issue could have possibly cropped up overnight. These are the things I've tried to fix it:

1. Run autoconf to regenerate the configure script.
2. Delete everything. Reconfigure and rebuild from a clean slate.
3. Comment out `.zshenv`, `.zshrc`, and `.zprofile`
4. Try configuring and compiling on bash and sh instead of zsh
msg397962 - (view) Author: Jack DeVries (jack__d) * Date: 2021-07-21 21:21
I'm also getting this warning:

   ld: warning: object file (Programs/python.o) was built for newer 
   macOS version (11.5) than being linked (11.0)
msg397964 - (view) Author: Jack DeVries (jack__d) * Date: 2021-07-21 21:58
UGH I was experimenting with installing / compilingi gdb and had accidentally installed a different version of `ar` :/
History
Date User Action Args
2021-07-21 21:58:33jack__dsetstatus: open -> closed
resolution: not a bug
messages: + msg397964

stage: resolved
2021-07-21 21:21:44jack__dsetmessages: + msg397962
2021-07-21 18:09:17jack__dsettype: compile error
versions: + Python 3.11
2021-07-21 18:09:03jack__dcreate