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
ctypes not building under OS X because of ffi_closure_free not being defined early enough #53871
Comments
When I build under OS X 10.6 with LLVM I get four warnings of the type: /Users/brett/Dev/python/3.x/scratch/Modules/_ctypes/callbacks.c:20:9: warning: They are for ffi_closure_free, ffi_closure_alloc, and ffi_prep_closure_loc. |
Is LLVM a supported platform? |
It might as well be. OS X ships with it and is working towards making it their default compiler over gcc. Unladen also relies on it. This compiler issue is a fairly new one (I would guess past week or so), so making sure LLVM can compile Python shouldn't be a big deal. I would have added the proper function declarations myself to fix this but I wanted to let Thomas put them where he wanted them to go. |
I don't think this should block 3.2a2. +1 for supporting LLVM in general. BTW, why doesn't it build because of warnings? |
It's not just LLVM. Building a standard OS X installer on OS X 10.5 (gcc-4.0, 10.4u SDK, i386/ppc, deployment target=10.3) or 10.6 (gcc-4.2, 10.6 SDK, i386/x86_64, dept target 10.6), _ctypes fails: *** WARNING: renaming "_ctypes" since importing it failed: dlopen(build/lib.macosx-10.3-fat-3.2/_ctypes.so, 2): Symbol not found: _ffi_closure_alloc That is definitely a regression. |
OK. Assigning to Ronald for now; he'll have to deal with it when building the binaries anyway. |
This was broken in r83837 with a patch for issue bpo-5504. |
I'm looking into this issue. One problem is that the version of libffi used on OSX is no longer in sync with the version that is used on other platforms. The version that is used on OSX does not have some of the symbols expected by ctypes, such as 'ffi_prep_closure_loc'. |
Ronald, please see bpo-5504. |
Thanks! That patch fixes the issue for me and I will commit it later today. |
I've committed the patch in bpo-5504 in r84535 (3.2) and that fixes this issue. The same problem affects 2.7, I'm currently running the testsuite with the backport of this commit. |
(Finally...) Checked in for 2.7 in r84846 |
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: