PyObjc 3.0 (default branch) Build issue when /Developer Xcode 3.2.6 installed with Xcode 5.1.1

Issue #83 resolved
Marc Van Olmen
created an issue

hi,

Just tried building on a system where Xcode 3.2.6 was installed in the default location of

/Developer

Then also Xcode 5.1.1 is also installed

My Setup:

  • MacOSX 10.9.3
  • Python 2.7.6
  • Xcode 3.2.6
  • XCode 5.1.1
  • trying to build for 10.6 deployment, I notice above delegates are only on for 10.7 will have to test if everything works for 10.6.
  • I also setup an environment
virtualenv --python=python2.7 --no-site-packages checkout4_env 

I tried build both with the following commands

env CC=clang python install.py install

or

python install.py install

Most of the build process works fine.

But I had and error in the end phase

The workaround was to

rename folder /Developer to Developer2, then the building works.

Also when I tried on:

  • MacOS X 10.8.5
  • Xcode 4.6.2 and XCode 5.1.1

Everything worked ok.

The error message I got:

building 'CoreFoundation._inlines' extension
creating build/temp.macosx-10.6-intel-2.7/Modules
clang -fno-strict-aliasing -fno-common -dynamic -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -g -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Ibuild/temp.macosx-10.6-intel-2.7/pyobjc-include -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c Modules/_CoreFoundation_inlines.m -o build/temp.macosx-10.6-intel-2.7/Modules/_CoreFoundation_inlines.o -DPyObjC_BUILD_RELEASE=1009
clang -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -isysroot /Developer/SDKs/MacOSX10.6.sdk -g build/temp.macosx-10.6-intel-2.7/Modules/_CoreFoundation_inlines.o -o build/lib.macosx-10.6-intel-2.7/CoreFoundation/_inlines.so -framework CoreFoundation
building 'CoreFoundation._CoreFoundation' extension
clang -fno-strict-aliasing -fno-common -dynamic -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -g -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Ibuild/temp.macosx-10.6-intel-2.7/pyobjc-include -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c Modules/_CoreFoundation.m -o build/temp.macosx-10.6-intel-2.7/Modules/_CoreFoundation.o -DPyObjC_BUILD_RELEASE=1009
clang -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -isysroot /Developer/SDKs/MacOSX10.6.sdk -g build/temp.macosx-10.6-intel-2.7/Modules/_CoreFoundation.o -o build/lib.macosx-10.6-intel-2.7/CoreFoundation/_CoreFoundation.so -framework CoreFoundation
building 'Foundation._inlines' extension
clang -fno-strict-aliasing -fno-common -dynamic -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -g -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Ibuild/temp.macosx-10.6-intel-2.7/pyobjc-include -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c Modules/_Foundation_inlines.m -o build/temp.macosx-10.6-intel-2.7/Modules/_Foundation_inlines.o -DPyObjC_BUILD_RELEASE=1009
clang -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -isysroot /Developer/SDKs/MacOSX10.6.sdk -g build/temp.macosx-10.6-intel-2.7/Modules/_Foundation_inlines.o -o build/lib.macosx-10.6-intel-2.7/Foundation/_inlines.so -framework Foundation
building 'Foundation._Foundation' extension
clang -fno-strict-aliasing -fno-common -dynamic -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -g -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Ibuild/temp.macosx-10.6-intel-2.7/pyobjc-include -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c Modules/_Foundation.m -o build/temp.macosx-10.6-intel-2.7/Modules/_Foundation.o -DPyObjC_BUILD_RELEASE=1009
In file included from Modules/_Foundation.m:15:
Modules/_Foundation_protocols.m:38:28: error: cannot find protocol declaration for 'NSFileManagerDelegate'
    p = PyObjC_IdToPython(@protocol(NSFileManagerDelegate)); Py_XDECREF(p);
                           ^
Modules/_Foundation_protocols.m:39:28: error: cannot find protocol declaration for 'NSFilePresenter'
    p = PyObjC_IdToPython(@protocol(NSFilePresenter)); Py_XDECREF(p);
                           ^
Modules/_Foundation_protocols.m:40:28: error: cannot find protocol declaration for 'NSURLConnectionDelegate'
    p = PyObjC_IdToPython(@protocol(NSURLConnectionDelegate)); Py_XDECREF(p);
                           ^
Modules/_Foundation_protocols.m:41:28: error: cannot find protocol declaration for 'NSURLDownloadDelegate'
    p = PyObjC_IdToPython(@protocol(NSURLDownloadDelegate)); Py_XDECREF(p);
                           ^
Modules/_Foundation_protocols.m:44:28: error: cannot find protocol declaration for 'NSSecureCoding'
    p = PyObjC_IdToPython(@protocol(NSSecureCoding)); Py_XDECREF(p);
                           ^
Modules/_Foundation_protocols.m:45:28: error: cannot find protocol declaration for 'NSURLConnectionDataDelegate'
    p = PyObjC_IdToPython(@protocol(NSURLConnectionDataDelegate)); Py_XDECREF(p);
                           ^
Modules/_Foundation_protocols.m:46:28: error: cannot find protocol declaration for 'NSURLConnectionDownloadDelegate'
    p = PyObjC_IdToPython(@protocol(NSURLConnectionDownloadDelegate)); Py_XDECREF(p);
                           ^
Modules/_Foundation_protocols.m:47:28: error: cannot find protocol declaration for 'NSUserNotificationCenterDelegate'
    p = PyObjC_IdToPython(@protocol(NSUserNotificationCenterDelegate)); Py_XDECREF(p);
                           ^
Modules/_Foundation_protocols.m:48:28: error: cannot find protocol declaration for 'NSXPCListenerDelegate'
    p = PyObjC_IdToPython(@protocol(NSXPCListenerDelegate)); Py_XDECREF(p);
                           ^
Modules/_Foundation_protocols.m:49:28: error: cannot find protocol declaration for 'NSXPCProxyCreating'
    p = PyObjC_IdToPython(@protocol(NSXPCProxyCreating)); Py_XDECREF(p);

Comments (10)

  1. Ronald Oussoren repo owner

    The PyObjC code assumes its build with the most recent SDK for the running platform, which explains the problem you were having (the code tries to use 10.7 or 10.8 APIs which aren't present in the 10.6 SDK).

    It should be easy enough to fix this by looking at the SDK version when one is used instead of looking at the version of the currently running system (look for the definition of PyObjC_BUILD_RELEASE in pyobjc-core/setup.py and pyobjc-core/Tools/pyobjc_setup.py. The latter is the master copy of the pyobjc_setup.py file in all framework wrappers.

  2. Log in to comment