New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to compile with --enable-framework on macOS on master #82610
Comments
Since commit c02b41b , some syntax errors are preventing cpython from compiling with --enable-framework on. Specifically, the errors are in Modules/getpath.c on line 1134 and 1165. I've made some inline comments on github as well. |
Oh, I expected that we had macOS buildbots building Python with --enable-framework. Thanks for the reporting the issue. I wrote PR 16695 which should fix the issue, but I cannot test my fix right now. |
I'm now getting double free on the same function: https://pastebin.com/zHWCtTuV (with debug on) |
Hum, getpath.c seems to use deprecated APIs: ./Modules/getpath.c:1098:20: warning: 'NSModuleForSymbol' is deprecated: first deprecated in macOS 10.5 - dladdr() [-Wdeprecated-declarations]
pythonModule = NSModuleForSymbol(NSLookupAndBindSymbol("_Py_Initialize"));
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/mach-o/dyld.h:193:21: note: 'NSModuleForSymbol' has been explicitly marked deprecated here
extern NSModule NSModuleForSymbol(NSSymbol symbol) __API_UNAVAILABLE(ios, tvos, watchos) __OSX_DEPRECATED(10.1, 10.5, "dladdr()");
^
./Modules/getpath.c:1098:38: warning: 'NSLookupAndBindSymbol' is deprecated: first deprecated in macOS 10.4 - dlsym() [-Wdeprecated-declarations]
pythonModule = NSModuleForSymbol(NSLookupAndBindSymbol("_Py_Initialize"));
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/mach-o/dyld.h:183:17: note: 'NSLookupAndBindSymbol' has been explicitly marked deprecated here
extern NSSymbol NSLookupAndBindSymbol(const char* symbolName) __API_UNAVAILABLE(ios, tvos, watchos) __OSX_DEPRECATED(10...
^
./Modules/getpath.c:1101:27: warning: 'NSLibraryNameForModule' is deprecated: first deprecated in macOS 10.5 [-Wdeprecated-declarations]
const char* modPath = NSLibraryNameForModule(pythonModule);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/mach-o/dyld.h:163:21: note: 'NSLibraryNameForModule' has been explicitly marked deprecated here
extern const char* NSLibraryNameForModule(NSModule m) __API_UNAVAILABLE(ios, tvos, watchos) __OSX_DEPRECATED(10.1, 10.5, "");
^
3 warnings generated. |
Thanks for the bug report Haruka Ma, it should now be fixed. |
W.r.t. the deprecated APIs in getpath.c: bpo-15498 That issue contains an ancient patch to switch to non-deprecated APIs, but we haven't had time yet to fully test these. The issue also mentions that Apple's install of Python already switched away from the deprecated APIs, but had some issues at the time. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: