Comments (8)
Original comment by Ronald Oussoren (Bitbucket: ronaldoussoren, GitHub: ronaldoussoren).
Which version of python do you use? It it one of the binary installers on the pyt#hon.org website?
Could you try installing with:
$ env CC=clang pip install -U pyobjc-core
I suspect that this is a compiler issue. I haven't noticed this myself because I haven't used a binary installer in a long time. If using clang does actually fix this issue I'll (1) change PyObjC's setup.py file to detect this issue, and (2) work on a patch for the python source tree to fix the issue there as well. Distutils already contains a lot of code to work around toolchain issues on OSX, one more hack won't be a problem.
BTW. You are the first person that actually reported the issue to me, thanks for that.
from pyobjc.
Original comment by [email protected] (Bitbucket: khagler, GitHub: khagler).
Yes, it's from the installer on python.org.
Installing with your suggested change worked. Once that was done, I found that the same thing was needed for pyobjc:
env CC=clang pip install -U pyobjc
from pyobjc.
Original comment by Ronald Oussoren (Bitbucket: ronaldoussoren, GitHub: ronaldoussoren).
Which version of Xcode do you use? I'm using Xcode 4.5.2 and that doesn't have a gcc-4.2 at all.
That is, when I try to compile with 'CC=gcc-4.2' I get an error because the compiler cannot be found at all:
$ CC="gcc-4.2 -arch i386" python setup.py build_ext
running build_ext
building 'objc._objc' extension
gcc-4.2 -arch i386 -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c libffi-src/ffi.c -o build/temp.macosx-10.8-intel-2.7/libffi-src/ffi.o -DPyObjC_STRICT_DEBUGGING -DMACOSX -DPyObjC_BUILD_RELEASE=1008 -DMACOSX -g -fexceptions -Wall -Wstrict-prototypes -Wmissing-prototypes -Wformat=2 -W -Wpointer-arith -Wmissing-declarations -Wnested-externs -W -Wno-import -DPyObjC_BUILD_RELEASE=1008 -isysroot / -Ibuild/codegen/ -Ilibffi-src/include -Ilibffi-src/powerpc
gcc-4.2: error trying to exec '/usr/bin/i686-apple-darwin11-gcc-4.2.1': execvp: No such file or directory
gcc-4.2: error trying to exec '/usr/bin/i686-apple-darwin11-gcc-4.2.1': execvp: No such file or directory
lipo: can't figure out the architecture type of: /var/folders/1y/743yv1f91d3d2jtgq6m01nxr0000gp/T//cct1pLwp.out
error: command 'gcc-4.2' failed with exit status 255
from pyobjc.
Original comment by Ronald Oussoren (Bitbucket: ronaldoussoren, GitHub: ronaldoussoren).
See also: http://bugs.python.org/issue13590
from pyobjc.
Original comment by [email protected] (Bitbucket: khagler, GitHub: khagler).
I have the same version of Xcode, but I also have gcc-4.2, installed via Homebrew:
brew install apple-gcc42
I'd installed it as part of a lengthy effort to get the latest version of Ruby, which apparently suffers from the same problem described in that Python bug.
from pyobjc.
Original comment by Ronald Oussoren (Bitbucket: ronaldoussoren, GitHub: ronaldoussoren).
The problem is that Apple changes the way their compiler toolchain works about every other release. We try to hide that in Python's distutils, but there will always be a window where the change to distutils hasn't landed yet.
The 32-bit installer for Python is even more fun, it is not possible at all to build extensions for that on OSX 10.8 because Apple no longer ships a compiler that can create PPC code.
from pyobjc.
Original comment by Ronald Oussoren (Bitbucket: ronaldoussoren, GitHub: ronaldoussoren).
This will be fixed in pyobjc 2.5
from pyobjc.
Original comment by Ronald Oussoren (Bitbucket: ronaldoussoren, GitHub: ronaldoussoren).
Explictly try to find a working compiler, needed because some
binary installers for Python have a reference to a compiler that
doesn't work on OSX 10.8 (or rather 'with Xcode 4').
See also http://bugs.python.org/issue13590
Fixes #30
from pyobjc.
Related Issues (20)
- Which version to use for macOS < 10.9 (primarily 10.5–10.6)? HOT 4
- Import Error: cannot import name '_objc HOT 3
- proxy os.PathLike to a file-like NSURL HOT 1
- Question: trying to grab a screenshot using ScreenCaptureKit HOT 4
- segmentation fault when repeatedly calling VNRecognizeTextRequest HOT 2
- Add VisionKit bindings HOT 5
- Stopping event loop causes process termination in Sonoma
- Segfault in PyObjCBlock_GetSignature (do Python objects need to inherit from NSObject?) HOT 4
- NSBezierPathElementCurveTo deprecation errors when building pyobjc-framework-Cocoa HOT 3
- Question about API usage HOT 2
- what's a native-selector? HOT 1
- AppKit: Can't get list of windows for a given NSApplication instance HOT 2
- CoreWLAN returning None for SSID/BSSID HOT 8
- Unreco HOT 1
- PyObjC 11: Drop python 3.8 support
- Little memory leak of 16-byte OC_BuiltinPythonArray HOT 2
- Building 10.2 results in failure due to BrowserEngineKit HOT 3
- Merge metadata registrations
- Task: remove older scanned metadata HOT 1
- Support Free Threading in Python 3.13 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyobjc.