Re: [Pyobjc-dev] Problem building pyobjc from SVN
Brought to you by:
ronaldoussoren
|
From: Ronald O. <ron...@ma...> - 2009-04-16 07:37:09
|
Yikes, I really need to start testing with a standard build of Python again. My guess is that the problem is caused by ' -isysroot / Developer/SDKs/MacOSX10.4u.sdk ' in the compiler flags below. This forces the compiler to use the system headers for 10.4, even when building on 10.5. I have an idea on how to work around this (basicly force usage of - isysroot=/ on OSX 10.5 or later), but won't have time to commit such a change today. Ronald On 16 Apr, 2009, at 0:35, py...@db... wrote: > I'm assuming you got my previous message in response to this one. > But just a quick follow up. > > I did an svn update today and saw some changes so I decided I'd try > again. This time, though, instead of doing 02-develop-all.sh I did > it by hand. Looks like there are a bunch of compilation errors in > Modules/_Foundation_nscoder.m. As I mentioned before, I am on 10.5, > so I shouldn't be experiencing whatever error you mentioned for > 10.4. If something is configured wrong to think I am on 10.4, I'd > be happy to change it if someone could tell me where it is. Here's > the full gcc output with successfully compiled files snipped for > brevity: > > building 'Foundation._nscoder' extension > gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk - > fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd > -fno-common -dynamic -DNDEBUG -g -O3 -I/Library/Frameworks/ > Python.framework/Versions/2.5/include/python2.5 -c Modules/ > _Foundation_nscoder.m -o build/temp.macosx-10.3-fat-2.5/Modules/ > _Foundation_nscoder.o > Modules/_Foundation_nscoder.m: In function > ‘imp_NSCoder_encodeArrayOfObjCType_count_at_’: > Modules/_Foundation_nscoder.m:220: error: ‘NSUInteger’ undeclared > (first use in this function) > Modules/_Foundation_nscoder.m:220: error: (Each undeclared > identifier is reported only once > Modules/_Foundation_nscoder.m:220: error: for each function it > appears in.) > Modules/_Foundation_nscoder.m:220: error: syntax error before ‘count’ > Modules/_Foundation_nscoder.m:228: error: syntax error before ‘i’ > Modules/_Foundation_nscoder.m:249: error: ‘count’ undeclared (first > use in this function) > Modules/_Foundation_nscoder.m:256: error: ‘i’ undeclared (first use > in this function) > Modules/_Foundation_nscoder.m: In function > ‘imp_NSCoder_decodeArrayOfObjCType_count_at_’: > Modules/_Foundation_nscoder.m:486: error: ‘NSUInteger’ undeclared > (first use in this function) > Modules/_Foundation_nscoder.m:486: error: syntax error before ‘count’ > Modules/_Foundation_nscoder.m:494: error: syntax error before ‘i’ > Modules/_Foundation_nscoder.m:516: error: ‘count’ undeclared (first > use in this function) > Modules/_Foundation_nscoder.m:538: error: ‘i’ undeclared (first use > in this function) > Modules/_Foundation_nscoder.m: In function > ‘call_NSCoder_encodeBytes_length_’: > Modules/_Foundation_nscoder.m:578: error: syntax error before > ‘NSUInteger’ > Modules/_Foundation_nscoder.m:590: error: ‘NSUInteger’ undeclared > (first use in this function) > Modules/_Foundation_nscoder.m:590: error: syntax error before ‘length’ > Modules/_Foundation_nscoder.m: In function > ‘imp_NSCoder_encodeBytes_length_’: > Modules/_Foundation_nscoder.m:612: error: ‘NSUInteger’ undeclared > (first use in this function) > Modules/_Foundation_nscoder.m:612: error: syntax error before ‘length’ > Modules/_Foundation_nscoder.m:630: error: ‘length’ undeclared (first > use in this function) > Modules/_Foundation_nscoder.m: In function > ‘call_NSCoder_decodeBytesWithReturnedLength_’: > Modules/_Foundation_nscoder.m:665: error: ‘NSUInteger’ undeclared > (first use in this function) > Modules/_Foundation_nscoder.m:665: error: syntax error before ‘size’ > Modules/_Foundation_nscoder.m:680: error: ‘size’ undeclared (first > use in this function) > Modules/_Foundation_nscoder.m: In function > ‘imp_NSCoder_decodeBytesWithReturnedLength_’: > Modules/_Foundation_nscoder.m:749: error: ‘NSUInteger’ undeclared > (first use in this function) > Modules/_Foundation_nscoder.m:749: error: ‘length’ undeclared (first > use in this function) > Modules/_Foundation_nscoder.m:749: error: syntax error before ‘)’ > token > Modules/_Foundation_nscoder.m:755: error: syntax error before ‘len’ > Modules/_Foundation_nscoder.m:789: error: syntax error before > ‘NSUInteger’ > Modules/_Foundation_nscoder.m:762: error: label ‘error’ used but not > defined > Modules/_Foundation_nscoder.m: At top level: > Modules/_Foundation_nscoder.m:795: error: syntax error before ‘if’ > Modules/_Foundation_nscoder.m:798: error: syntax error before string > constant > Modules/_Foundation_nscoder.m:798: error: conflicting types for > ‘PyErr_SetString’ > /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/ > pyerrors.h:78: error: previous declaration of ‘PyErr_SetString’ was > here > Modules/_Foundation_nscoder.m:798: warning: data definition has no > type or storage class > Modules/_Foundation_nscoder.m:802: error: ‘len’ undeclared here (not > in a function) > Modules/_Foundation_nscoder.m:802: warning: data definition has no > type or storage class > Modules/_Foundation_nscoder.m:807: warning: passing argument 1 of > ‘initWithBytes:length:’ makes pointer from integer without a cast > Modules/_Foundation_nscoder.m:808: warning: initialization discards > qualifiers from pointer target type > Modules/_Foundation_nscoder.m:808: error: initializer element is not > constant > Modules/_Foundation_nscoder.m:808: warning: data definition has no > type or storage class > Modules/_Foundation_nscoder.m:810: error: syntax error before ‘if’ > Modules/_Foundation_nscoder.m:811: warning: parameter names (without > types) in function declaration > Modules/_Foundation_nscoder.m:811: error: conflicting types for > ‘PyGILState_Release’ > /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/ > pystate.h:164: error: previous declaration of ‘PyGILState_Release’ > was here > Modules/_Foundation_nscoder.m:811: warning: data definition has no > type or storage class > Modules/_Foundation_nscoder.m:812: error: syntax error before ‘return’ > Modules/_Foundation_nscoder.m:819: error: syntax error before ‘->’ > token > Modules/_Foundation_nscoder.m:820: error: redefinition of ‘pretval’ > Modules/_Foundation_nscoder.m:807: error: previous definition of > ‘pretval’ was here > Modules/_Foundation_nscoder.m:820: warning: data definition has no > type or storage class > Modules/_Foundation_nscoder.m:821: error: syntax error before ‘}’ > token > Modules/_Foundation_nscoder.m: In function > ‘call_NSCoder_decodeBytesForKey_returnedLength_’: > Modules/_Foundation_nscoder.m:828: error: ‘NSUInteger’ undeclared > (first use in this function) > Modules/_Foundation_nscoder.m:828: error: syntax error before ‘size’ > Modules/_Foundation_nscoder.m:840: error: syntax error before > ‘NSUInteger’ > Modules/_Foundation_nscoder.m:844: error: syntax error before ‘)’ > token > Modules/_Foundation_nscoder.m:844: error: ‘size’ undeclared (first > use in this function) > Modules/_Foundation_nscoder.m:895: error: syntax error before > ‘NSUInteger’ > Modules/_Foundation_nscoder.m: In function > ‘imp_NSCoder_decodeBytesForKey_returnedLength_’: > Modules/_Foundation_nscoder.m:915: error: ‘NSUInteger’ undeclared > (first use in this function) > Modules/_Foundation_nscoder.m:915: error: syntax error before ‘)’ > token > Modules/_Foundation_nscoder.m:922: error: syntax error before ‘len’ > Modules/_Foundation_nscoder.m:959: error: syntax error before > ‘NSUInteger’ > Modules/_Foundation_nscoder.m:929: error: label ‘error’ used but not > defined > Modules/_Foundation_nscoder.m: At top level: > Modules/_Foundation_nscoder.m:965: error: syntax error before ‘if’ > Modules/_Foundation_nscoder.m:968: error: syntax error before string > constant > Modules/_Foundation_nscoder.m:968: error: conflicting types for > ‘PyErr_SetString’ > /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/ > pyerrors.h:78: error: previous declaration of ‘PyErr_SetString’ was > here > Modules/_Foundation_nscoder.m:968: warning: data definition has no > type or storage class > Modules/_Foundation_nscoder.m:972: error: redefinition of ‘length’ > Modules/_Foundation_nscoder.m:802: error: previous definition of > ‘length’ was here > Modules/_Foundation_nscoder.m:972: warning: data definition has no > type or storage class > Modules/_Foundation_nscoder.m:977: error: redefinition of ‘pretval’ > Modules/_Foundation_nscoder.m:807: error: previous definition of > ‘pretval’ was here > Modules/_Foundation_nscoder.m:977: warning: passing argument 1 of > ‘initWithBytes:length:’ makes pointer from integer without a cast > Modules/_Foundation_nscoder.m:978: warning: initialization discards > qualifiers from pointer target type > Modules/_Foundation_nscoder.m:978: error: initializer element is not > constant > Modules/_Foundation_nscoder.m:978: warning: data definition has no > type or storage class > Modules/_Foundation_nscoder.m:980: error: syntax error before ‘if’ > Modules/_Foundation_nscoder.m:981: warning: parameter names (without > types) in function declaration > Modules/_Foundation_nscoder.m:981: error: conflicting types for > ‘PyGILState_Release’ > /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/ > pystate.h:164: error: previous declaration of ‘PyGILState_Release’ > was here > Modules/_Foundation_nscoder.m:981: warning: data definition has no > type or storage class > Modules/_Foundation_nscoder.m:982: error: syntax error before ‘return’ > Modules/_Foundation_nscoder.m:989: error: syntax error before ‘->’ > token > Modules/_Foundation_nscoder.m:990: error: redefinition of ‘pretval’ > Modules/_Foundation_nscoder.m:807: error: previous definition of > ‘pretval’ was here > Modules/_Foundation_nscoder.m:990: warning: data definition has no > type or storage class > Modules/_Foundation_nscoder.m:991: error: syntax error before ‘}’ > token > Modules/_Foundation_nscoder.m: In function > ‘call_NSCoder_encodeBytes_length_forKey_’: > Modules/_Foundation_nscoder.m:1009: error: syntax error before > ‘NSUInteger’ > Modules/_Foundation_nscoder.m: In function > ‘imp_NSCoder_encodeBytes_length_forKey_’: > Modules/_Foundation_nscoder.m:1043: error: ‘NSUInteger’ undeclared > (first use in this function) > Modules/_Foundation_nscoder.m:1043: error: syntax error before > ‘length’ > Modules/_Foundation_nscoder.m:1062: warning: passing argument 2 of > ‘PyString_FromStringAndSize’ makes integer from pointer without a cast > Modules/_Foundation_nscoder.m:1066: warning: passing argument 1 of > ‘PyInt_FromLong’ makes integer from pointer without a cast > Modules/_Foundation_nscoder.m: In function > ‘imp_NSCoder_encodeArrayOfObjCType_count_at_’: > Modules/_Foundation_nscoder.m:220: error: ‘NSUInteger’ undeclared > (first use in this function) > Modules/_Foundation_nscoder.m:220: error: (Each undeclared > identifier is reported only once > Modules/_Foundation_nscoder.m:220: error: for each function it > appears in.) > Modules/_Foundation_nscoder.m:220: error: syntax error before ‘count’ > Modules/_Foundation_nscoder.m:228: error: syntax error before ‘i’ > Modules/_Foundation_nscoder.m:249: error: ‘count’ undeclared (first > use in this function) > Modules/_Foundation_nscoder.m:256: error: ‘i’ undeclared (first use > in this function) > Modules/_Foundation_nscoder.m: In function > ‘imp_NSCoder_decodeArrayOfObjCType_count_at_’: > Modules/_Foundation_nscoder.m:486: error: ‘NSUInteger’ undeclared > (first use in this function) > Modules/_Foundation_nscoder.m:486: error: syntax error before ‘count’ > Modules/_Foundation_nscoder.m:494: error: syntax error before ‘i’ > Modules/_Foundation_nscoder.m:516: error: ‘count’ undeclared (first > use in this function) > Modules/_Foundation_nscoder.m:538: error: ‘i’ undeclared (first use > in this function) > Modules/_Foundation_nscoder.m: In function > ‘call_NSCoder_encodeBytes_length_’: > Modules/_Foundation_nscoder.m:578: error: syntax error before > ‘NSUInteger’ > Modules/_Foundation_nscoder.m:590: error: ‘NSUInteger’ undeclared > (first use in this function) > Modules/_Foundation_nscoder.m:590: error: syntax error before ‘length’ > Modules/_Foundation_nscoder.m: In function > ‘imp_NSCoder_encodeBytes_length_’: > Modules/_Foundation_nscoder.m:612: error: ‘NSUInteger’ undeclared > (first use in this function) > Modules/_Foundation_nscoder.m:612: error: syntax error before ‘length’ > Modules/_Foundation_nscoder.m:630: error: ‘length’ undeclared (first > use in this function) > Modules/_Foundation_nscoder.m: In function > ‘call_NSCoder_decodeBytesWithReturnedLength_’: > Modules/_Foundation_nscoder.m:665: error: ‘NSUInteger’ undeclared > (first use in this function) > Modules/_Foundation_nscoder.m:665: error: syntax error before ‘size’ > Modules/_Foundation_nscoder.m:680: error: ‘size’ undeclared (first > use in this function) > Modules/_Foundation_nscoder.m: In function > ‘imp_NSCoder_decodeBytesWithReturnedLength_’: > Modules/_Foundation_nscoder.m:749: error: ‘NSUInteger’ undeclared > (first use in this function) > Modules/_Foundation_nscoder.m:749: error: ‘length’ undeclared (first > use in this function) > Modules/_Foundation_nscoder.m:749: error: syntax error before ‘)’ > token > Modules/_Foundation_nscoder.m:755: error: syntax error before ‘len’ > Modules/_Foundation_nscoder.m:789: error: syntax error before > ‘NSUInteger’ > Modules/_Foundation_nscoder.m:762: error: label ‘error’ used but not > defined > Modules/_Foundation_nscoder.m: At top level: > Modules/_Foundation_nscoder.m:795: error: syntax error before ‘if’ > Modules/_Foundation_nscoder.m:798: error: syntax error before string > constant > Modules/_Foundation_nscoder.m:798: error: conflicting types for > ‘PyErr_SetString’ > /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/ > pyerrors.h:78: error: previous declaration of ‘PyErr_SetString’ was > here > Modules/_Foundation_nscoder.m:798: warning: data definition has no > type or storage class > Modules/_Foundation_nscoder.m:802: error: ‘len’ undeclared here (not > in a function) > Modules/_Foundation_nscoder.m:802: warning: data definition has no > type or storage class > Modules/_Foundation_nscoder.m:807: warning: passing argument 1 of > ‘initWithBytes:length:’ makes pointer from integer without a cast > Modules/_Foundation_nscoder.m:808: warning: initialization discards > qualifiers from pointer target type > Modules/_Foundation_nscoder.m:808: error: initializer element is not > constant > Modules/_Foundation_nscoder.m:808: warning: data definition has no > type or storage class > Modules/_Foundation_nscoder.m:810: error: syntax error before ‘if’ > Modules/_Foundation_nscoder.m:811: warning: parameter names (without > types) in function declaration > Modules/_Foundation_nscoder.m:811: error: conflicting types for > ‘PyGILState_Release’ > /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/ > pystate.h:164: error: previous declaration of ‘PyGILState_Release’ > was here > Modules/_Foundation_nscoder.m:811: warning: data definition has no > type or storage class > Modules/_Foundation_nscoder.m:812: error: syntax error before ‘return’ > Modules/_Foundation_nscoder.m:819: error: syntax error before ‘->’ > token > Modules/_Foundation_nscoder.m:820: error: redefinition of ‘pretval’ > Modules/_Foundation_nscoder.m:807: error: previous definition of > ‘pretval’ was here > Modules/_Foundation_nscoder.m:820: warning: data definition has no > type or storage class > Modules/_Foundation_nscoder.m:821: error: syntax error before ‘}’ > token > Modules/_Foundation_nscoder.m: In function > ‘call_NSCoder_decodeBytesForKey_returnedLength_’: > Modules/_Foundation_nscoder.m:828: error: ‘NSUInteger’ undeclared > (first use in this function) > Modules/_Foundation_nscoder.m:828: error: syntax error before ‘size’ > Modules/_Foundation_nscoder.m:840: error: syntax error before > ‘NSUInteger’ > Modules/_Foundation_nscoder.m:844: error: syntax error before ‘)’ > token > Modules/_Foundation_nscoder.m:844: error: ‘size’ undeclared (first > use in this function) > Modules/_Foundation_nscoder.m:895: error: syntax error before > ‘NSUInteger’ > Modules/_Foundation_nscoder.m: In function > ‘imp_NSCoder_decodeBytesForKey_returnedLength_’: > Modules/_Foundation_nscoder.m:915: error: ‘NSUInteger’ undeclared > (first use in this function) > Modules/_Foundation_nscoder.m:915: error: syntax error before ‘)’ > token > Modules/_Foundation_nscoder.m:922: error: syntax error before ‘len’ > Modules/_Foundation_nscoder.m:959: error: syntax error before > ‘NSUInteger’ > Modules/_Foundation_nscoder.m:929: error: label ‘error’ used but not > defined > Modules/_Foundation_nscoder.m: At top level: > Modules/_Foundation_nscoder.m:965: error: syntax error before ‘if’ > Modules/_Foundation_nscoder.m:968: error: syntax error before string > constant > Modules/_Foundation_nscoder.m:968: error: conflicting types for > ‘PyErr_SetString’ > /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/ > pyerrors.h:78: error: previous declaration of ‘PyErr_SetString’ was > here > Modules/_Foundation_nscoder.m:968: warning: data definition has no > type or storage class > Modules/_Foundation_nscoder.m:972: error: redefinition of ‘length’ > Modules/_Foundation_nscoder.m:802: error: previous definition of > ‘length’ was here > Modules/_Foundation_nscoder.m:972: warning: data definition has no > type or storage class > Modules/_Foundation_nscoder.m:977: error: redefinition of ‘pretval’ > Modules/_Foundation_nscoder.m:807: error: previous definition of > ‘pretval’ was here > Modules/_Foundation_nscoder.m:977: warning: passing argument 1 of > ‘initWithBytes:length:’ makes pointer from integer without a cast > Modules/_Foundation_nscoder.m:978: warning: initialization discards > qualifiers from pointer target type > Modules/_Foundation_nscoder.m:978: error: initializer element is not > constant > Modules/_Foundation_nscoder.m:978: warning: data definition has no > type or storage class > Modules/_Foundation_nscoder.m:980: error: syntax error before ‘if’ > Modules/_Foundation_nscoder.m:981: warning: parameter names (without > types) in function declaration > Modules/_Foundation_nscoder.m:981: error: conflicting types for > ‘PyGILState_Release’ > /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/ > pystate.h:164: error: previous declaration of ‘PyGILState_Release’ > was here > Modules/_Foundation_nscoder.m:981: warning: data definition has no > type or storage class > Modules/_Foundation_nscoder.m:982: error: syntax error before ‘return’ > Modules/_Foundation_nscoder.m:989: error: syntax error before ‘->’ > token > Modules/_Foundation_nscoder.m:990: error: redefinition of ‘pretval’ > Modules/_Foundation_nscoder.m:807: error: previous definition of > ‘pretval’ was here > Modules/_Foundation_nscoder.m:990: warning: data definition has no > type or storage class > Modules/_Foundation_nscoder.m:991: error: syntax error before ‘}’ > token > Modules/_Foundation_nscoder.m: In function > ‘call_NSCoder_encodeBytes_length_forKey_’: > Modules/_Foundation_nscoder.m:1009: error: syntax error before > ‘NSUInteger’ > Modules/_Foundation_nscoder.m: In function > ‘imp_NSCoder_encodeBytes_length_forKey_’: > Modules/_Foundation_nscoder.m:1043: error: ‘NSUInteger’ undeclared > (first use in this function) > Modules/_Foundation_nscoder.m:1043: error: syntax error before > ‘length’ > Modules/_Foundation_nscoder.m:1062: warning: passing argument 2 of > ‘PyString_FromStringAndSize’ makes integer from pointer without a cast > Modules/_Foundation_nscoder.m:1066: warning: passing argument 1 of > ‘PyInt_FromLong’ makes integer from pointer without a cast > lipo: can't figure out the architecture type of: /var/folders/mb/mbL- > JoqIES05fxNzlNIb8++++TI/-Tmp-//cc7sOmK9.out > error: command 'gcc' failed with exit status 1 > > On Tue, Apr 14, 2009 at 6:29 PM, Ronald Oussoren (ron...@ma... > ) wrote: > > > > On 14 Apr, 2009, at 20:06, py...@db... wrote: > > > > > *tap, tap, tap* is this thing on? Re-sending this as it didn't > > > appear to go through the first time. My apologies to the list if > > > both copies somehow make it through eventually. > > > > Did you sent the first message from an address that's subscribed to > > the list? I've been pretty lax about checking the moderator queue > for > > pyobjc-dev because at least 99% of mail in that queue is spam. > > > > > > > > I am having trouble building the latest pyobjc from subversion (or > > > easy-install for that matter). A touch of background and then the > > > error: > > > > You're trying to build on 10.4. I want to support that platform, but > > haven't gotten around to fixing the issues yet. The issues are > small, > > but require some time on a 10.4 system to work (I have one nearby, > but > > don't have time to work on it just yet). My current priority is > > finishing the testsuite for PyObjC, after that I'll probably spend > > time on porting to 10.4 again. > > > > The issues with 10.4 support should be pretty small, and mostly deal > > with the definition of NSInteger and supressing compilation for > > functions that wrap 10.5 specific code. I also expect a lot of false > > positives in the framework tests on 10.4, I haven't been as diligent > > as I should in marking 10.5 specific tests as such. With some luck a > > port to 10.4 will be a longish evening work. > > > > "easy_install pyobjc" also has a completely different issue at the > > moment: this will try to install wrappers for frameworks that aren't > > available on 10.4, which won't work until I provide precompiled > > binaries. I have an idea on how to fix that, but haven't commited > that > > yet (that would be a bit useless given the other problems). > > > > Ronald > > > > > > I started out doing my python development in XCode using the OOTB > > > templates in Leopard and was able to get a working application. > > > However, after finding that my apps wouldn't run on 10.4, etc, I > > > decided to try to go the py2app route. > > > > > > At the admonition of various documents and websites, I installed > the > > > latest release of Python 2.x for Mac from python.org (2.6.1). > > > However, after trying (and failing) to get py2app to work with > 2.6, > > > I went back and installed a fresh copy of PythonMac's latest 2.5 > > > release. Once I did that, py2app installed well, but now that I > > > have that running, I can't get pyobjc to compile. > > > > > > I've tried checking out the source from SVN and doing a ./02- > develop- > > > all from the pyobjc directory in my working copy. I also tried > > > "easy-install pyobjc". Both lead to the same result. The easy- > > > install attempt just stopped after the build failure, the 02- > develop- > > > all attempt just kept trying over and over to re-download, > compile, > > > etc the failing module. Below is one instance of the offending > > > install step. > > > > > > Anybody else have this problem and overcome it? > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p_______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |