[New-bugs-announce] [issue46248] Compilation errors on macOS

Sandip Shah report at bugs.python.org
Mon Jan 3 14:36:05 EST 2022

New submission from Sandip Shah <sandipshah at vthrive.com>:

macOS Monterey 12.1
Python 3.10.1

Trying to compile libplist, libimobiledevice, libimobiledevice_glue generates the error
"Could not link test program to Python. Maybe the main Python library has been
  installed in some non-standard library path. If so, pass it to configure,
  via the LDFLAGS environment variable."

The fix is change the following lines (570-571) in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/_sysconfigdata__darwin_darwin.py

'LINKFORSHARED': '-Wl,-stack_size,1000000  -framework CoreFoundation '
'LINKFORSHARED': '-Wl,-stack_size,1000000  -framework CoreFoundation '

Also, change the following line (110) in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/config-3.10-darwin

LINKFORSHARED=  -Wl,-stack_size,1000000  -framework CoreFoundation $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)
LINKFORSHARED=  -Wl,-stack_size,1000000  -framework CoreFoundation $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)

It seems the problem got created from - https://bugs.python.org/issue15298 - and most likely it exists in all the versions of Python (it exists in the native Python 2.7.18 that comes with macOS too.


components: macOS
messages: 409611
nosy: ned.deily, ronaldoussoren, sandipshah
priority: normal
severity: normal
status: open
title: Compilation errors on macOS
type: compile error
versions: Python 3.11

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list