Code Monkey home page Code Monkey logo

Comments (8)

ronaldoussoren avatar ronaldoussoren commented on August 27, 2024

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.

ronaldoussoren avatar ronaldoussoren commented on August 27, 2024

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.

ronaldoussoren avatar ronaldoussoren commented on August 27, 2024

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.

ronaldoussoren avatar ronaldoussoren commented on August 27, 2024

Original comment by Ronald Oussoren (Bitbucket: ronaldoussoren, GitHub: ronaldoussoren).


See also: http://bugs.python.org/issue13590

from pyobjc.

ronaldoussoren avatar ronaldoussoren commented on August 27, 2024

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.

ronaldoussoren avatar ronaldoussoren commented on August 27, 2024

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.

ronaldoussoren avatar ronaldoussoren commented on August 27, 2024

Original comment by Ronald Oussoren (Bitbucket: ronaldoussoren, GitHub: ronaldoussoren).


This will be fixed in pyobjc 2.5

from pyobjc.

ronaldoussoren avatar ronaldoussoren commented on August 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.