1. Ronald Oussoren
  2. pyobjc

Issues

Issue #55 resolved

easy_install pyobjc-core fails to install

AcclivityNYC
created an issue
  • MacOS X 10.7.5
  • XCode 3.2.6 installed using (COMMAND_LINE_INSTALL=1 open "/Volumes/Xcode and iOS SDK/Xcode and iOS SDK.mpkg" ) and XCode 4.6.2
  • Python 2.7.4

downloaded py2app first from source for other issue I just reported:

Lets set it up now

  • virtualenv --python=python2.7 --no-site-packages test_env
  • source ./test_env/bin/activate
  • cd altgraph
  • python setup.py install
  • cd ..
  • cd modulegraph
  • python setup.py install
  • cd ..
  • cd py2app
  • python setup.py install
  • cd ..
  • easy_install pyobjc-core

Error

(test_env)imac-marc:dev marcvanolmen$ easy_install pyobjc-core Searching for pyobjc-core Reading http://pypi.python.org/simple/pyobjc-core/ Reading http://pyobjc.sourceforge.net/ Reading http://pyobjc.sourceforge.net/software/index.php Best match: pyobjc-core 2.5.1 Downloading http://pypi.python.org/packages/source/p/pyobjc-core/pyobjc-core-2.5.1.tar.gz#md5=931c6cfb040df0d7e26c0898886380cf Processing pyobjc-core-2.5.1.tar.gz Running pyobjc-core-2.5.1/setup.py -q bdist_egg --dist-dir /var/folders/j2/2b2xt6kx3f77dzw90z9nyf_80000gn/T/easy_install-_gq6Rj/pyobjc-core-2.5.1/egg-dist-tmp-yy3t1k warning: no directories found matching 'Scripts' warning: no directories found matching 'setup-lib' warning: no directories found matching 'source-deps' warning: no previously-included files matching '.DS_Store' found anywhere in distribution warning: no previously-included files matching '.pyc' found anywhere in distribution warning: no previously-included files matching '.so' found anywhere in distribution Use '/usr/bin/gcc-4.2' instead of 'gcc-4.2' as the compiler libffi-src/x86/x86-ffi64.c:49: warning: function declaration isn’t a prototype libffi-src/x86/x86-ffi64.c: In function ‘classify_argument’: libffi-src/x86/x86-ffi64.c:188: warning: empty body in an else-statement libffi-src/x86/x86-ffi64.c: At top level: libffi-src/x86/x86-ffi64.c:432: warning: function declaration isn’t a prototype libffi-src/x86/x86-ffi64.c:615: warning: ignoring #pragma clang diagnostic libffi-src/x86/x86-ffi64.c:616: warning: ignoring #pragma clang diagnostic libffi-src/x86/x86-ffi64.c:623: warning: ignoring #pragma clang diagnostic libffi-src/x86/x86-ffi64.c:624: warning: no previous prototype for ‘ffi_closure_unix64_inner’ libffi-src/x86/x86-ffi_darwin.c:180: warning: function declaration isn’t a prototype libffi-src/x86/x86-ffi_darwin.c:188: warning: function declaration isn’t a prototype Modules/objc/fsref.m:8: warning: ignoring #pragma clang diagnostic Modules/objc/fsref.m:8: warning: ignoring #pragma clang diagnostic Modules/objc/objc-runtime-compat.m: In function ‘PyObjC_SetupRuntimeCompat’: Modules/objc/objc-runtime-compat.m:1181: error: ‘objc_allocateProtocol’ undeclared (first use in this function) Modules/objc/objc-runtime-compat.m:1181: error: (Each undeclared identifier is reported only once Modules/objc/objc-runtime-compat.m:1181: error: for each function it appears in.) Modules/objc/objc-runtime-compat.m:1182: error: ‘objc_registerProtocol’ undeclared (first use in this function) Modules/objc/objc-runtime-compat.m:1183: error: ‘protocol_addMethodDescription’ undeclared (first use in this function) Modules/objc/objc-runtime-compat.m:1184: error: ‘protocol_addProtocol’ undeclared (first use in this function) Modules/objc/objc-runtime-compat.m: In function ‘PyObjC_SetupRuntimeCompat’: Modules/objc/objc-runtime-compat.m:1169: error: ‘objc_allocateProtocol’ undeclared (first use in this function) Modules/objc/objc-runtime-compat.m:1169: error: (Each undeclared identifier is reported only once Modules/objc/objc-runtime-compat.m:1169: error: for each function it appears in.) Modules/objc/objc-runtime-compat.m:1170: error: ‘objc_registerProtocol’ undeclared (first use in this function) Modules/objc/objc-runtime-compat.m:1171: error: ‘protocol_addMethodDescription’ undeclared (first use in this function) Modules/objc/objc-runtime-compat.m:1172: error: ‘protocol_addProtocol’ undeclared (first use in this function) lipo: can't figure out the architecture type of: /var/folders/j2/2b2xt6kx3f77dzw90z9nyf_80000gn/T//cclH54s7.out error: Setup script exited with error: command '/usr/bin/gcc-4.2' failed with exit status 1 (test_env)imac-marc:dev marcvanolmen$

Comments (9)

  1. Ronald Oussoren repo owner

    Are you using an older SDK? The PyObjC build process currently assumes that you're using the latest SDK (that is, the 10.7 SDK when building on 10.7).

    You're getting a compiler error because PyObjC 2.5 uses a function that is available starting with the 10.7 SDK, and are probably compiling with and older SDK.

    BTW. It's rather annoying that easy_install hides a lot of information, including the compiler invocations. You might get more information when installing from a source install (that is, run "python setup.py install" in the pyobjc-core directory in a checkout of the pyobjc repository)

  2. AcclivityNYC reporter

    Indeed my XCode 3.2.6 has only 10.5 SDk and 10.6 SDK. The /usr/bin/gcc-4.2 is used instead clang, I think it is picking up on my XCode 3.2.6 (which is actually what I want)

    Also my goal is to compile against 10.6 SDK. (or in the older version of my app against 10.5 SDK)

    I will try maybe later -isysroot /Developer/SDKs/MacOSX10.6.sdk or MACOSX_DEPLOYMENT_TARGET=10.6 (with easy_install)

    Also I will try source code install and see if I can enforce it to compile against the 10.6 SDK, but maybe the setup.py script should check first if 10.7 SDK exist. At least pyobjc==2.3 is doing it correctly.

  3. Ronald Oussoren repo owner

    2.3 is not doing it correctly, it just doesn't use the API that was introduced in 10.7.

    A problem with OSX SDKs is that it is not possible to detect which SDK you're using. I guess I could try to determine the SDK version by parsing the argument for -isysroot (when that argument is present and isn't '/').

    BTW. Why do you want to use the 10.6 SDK? It is possible to build PyObjC with the 10.7 (or 10.8) SDK and deploy on older OSX releases (as an example, I have one application that I build on 10.8 and deploy to 10.5, all on Intel systems).

  4. AcclivityNYC reporter

    It is possible to build PyObjC with the 10.7 (or 10.8) SDK and deploy on older OSX.

    I didn't know that this cool. (10.5 would needed in case I want to deploy for PPC, but not important now because we are removing this from our app requirement)

    I'm just trying on my home Mac (10.7.5) also with XCode 3.2.6 and XCode 4.6.2 and here. This machines had many version of XCode 4.x installed...

    It picks up clang as compiler: Use '/usr/bin/clang' instead of 'gcc-4.2' as the compiler (see above it says '/usr/bin/gcc-4.2' instead of 'gcc-4.2')

    I can use easy_install with all components also for py2app picks up version py2app 0.7.3

    But it seems to have picked up the 10.6 SDK:

    pyobjc_core-2.5.1-py2.7-macosx-10.6-intel.egg

    I will do a source install later on the other machine and send the full output from python setup.py install to see why it detects a different runtime there.

  5. AcclivityNYC reporter

    I was able to resolve my issue by

    Opening XCode 4.6.2 Go To Preferences->Download->Command Line Tools and click Install.

    Then I was able to build from the source code,.

    I retried easy_install pyobjc this wasn't working because I ran in similar issue already reported before where it kept on downloading and compiling pyobjc-core. Also tried env CC=clang easy_install pyobjc same issue.

    The pyobjc-2.5.1-py2.7.egg is only 4KBytes.

  6. Log in to comment