beeware / Python-Apple-support

A meta-package for building a version of Python that can be embedded into a macOS, iOS, tvOS or watchOS project.
MIT License
1.08k stars 155 forks source link

Linker fails when building Xcode project on x86_64 #220

Open JonathanLoungani opened 1 month ago

JonathanLoungani commented 1 month ago

Describe the bug

When using an x86_64 Mac with Python 3.12 (or 3.9), it is not possible to build the stub app in the Mac OS app template.

Steps to reproduce

  1. Download the briefcase macOS Xcode template
  2. Run briefcase create macOS Xcode in the stub directory
  3. Run briefcase build macOS Xcode in the stub directory
  4. See the following error
    Undefined symbols for architecture x86_64:
    "_mkfifoat", referenced from:
      _os_mkfifo in libPython3.12.a(posixmodule.o)
    "_mknodat", referenced from:
      _os_mknod in libPython3.12.a(posixmodule.o)
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    note: Using new build system
    note: Planning
    note: Build preparation complete
    note: Building targets in parallel
    ** BUILD FAILED **

Expected behavior

The build should complete without issue.

Screenshots

No response

Environment

Logs

briefcase.2024_05_22-13_48_08.build.log

Additional context

No response

JonathanLoungani commented 1 month ago

This issue also occurs when using Python 3.9

Undefined symbols for architecture x86_64:
  "_mkfifoat", referenced from:
      _os_mkfifo in libPython3.9.a(posixmodule.o)
  "_mknodat", referenced from:
      _os_mknod in libPython3.9.a(posixmodule.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in parallel
** BUILD FAILED **

briefcase.2024_05_22-14_08_31.build.log