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.12k stars 164 forks source link

Another issue with 3.7.6 update: _PyOS_AfterFork_Parent undefined #85

Closed efroemling closed 4 years ago

efroemling commented 4 years ago

One more issue I'm seeing with the latest 3.7.6 update: cloning the repo, checking out 3.7, and running 'make tvOS' mostly completes but ends up with:

xcrun --sdk appletvsimulator clang -arch x86_64 --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator13.2.sdk -mtvos-version-min=9.0       -o python.exe Programs/python.o libpython3.7m.a -ldl  -L./../Support/BZip2 -lbz2                 -L./../Support/OpenSSL -lOpenSSL       -L./../Support/XZ -llzma                 -lsqlite3   -L./../Support/OpenSSL -lOpenSSL                                -lz                           -lm  
Undefined symbols for architecture x86_64:
  "_PyOS_AfterFork_Parent", referenced from:
      _subprocess_fork_exec in libpython3.7m.a(_posixsubprocess.o)
  "_PyOS_BeforeFork", referenced from:
      _subprocess_fork_exec in libpython3.7m.a(_posixsubprocess.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [python.exe] Error 1
make: *** [build/tvOS/Python-3.7.6-appletvsimulator.x86_64/dist/lib/libpython3.7m.a] Error 2
freakboy3742 commented 4 years ago

Ok - this suggests the patch needs some work in posixmodule.c. There was a merge conflict when I was updating the patch; I've clearly still got one of the #ifdef collisions handled wrong in the current patch.