I wondered if the problem was the "implicit declaration", which can be fixed by including string.h (kind of funny: I find most people don't include string.h).
That being said, strnlen(3) reports that "This function is a GNU extension." so it's questionable whether it should be used at all if one is seeking maximum portability. FWIW, I just tried this with a bzr clone of dulwich and it built as expected: $ python setup.py build [snip] gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c dulwich/_objects.c -o build/temp.macosx-10.6-universal-2.6/dulwich/_objects.o gcc-4.2 -Wl,-F. -bundle -undefined dynamic_lookup -arch i386 -arch ppc -arch x86_64 build/temp.macosx-10.6-universal-2.6/dulwich/_objects.o -o build/lib.macosx-10.6-universal-2.6/dulwich/_objects.so [snip] $ uname -a Darwin Minion.local 10.2.0 Darwin Kernel Version 10.2.0: Tue Nov 3 10:37:10 PST 2009; root:xnu-1486.2.11~1/RELEASE_I386 i386 -- /v\atthew On Fri, Oct 1, 2010 at 5:33 PM, Augie Fackler <[email protected]> wrote: > > On Sep 30, 2010, at 5:48 PM, Jelmer Vernooij wrote: > >> On Thu, 2010-09-30 at 13:32 -0400, dak180 wrote: >> >>> dulwich/_objects.c: In function ‘py_parse_tree’: >>> dulwich/_objects.c:74: warning: implicit declaration of function >>> ‘strnlen’ >>> Undefined symbols: >>> "_strnlen", referenced from: >>> _py_parse_tree in _objects.o >>> ld: symbol(s) not found >>> collect2: ld returned 1 exit status >>> error: Setup script exited with error: command 'gcc' failed with exit >>> status 1 >> >> We already have a hack to work around strnlen() not existing on some >> platforms. I guess we'd just need another ifdef for darwin. Patches >> welcome :-) > > strnlen should be defined on OS X, can we try and diagnose this before > adding an unneeded hack? > > (I do all my dev work on OS X) > >> >> Cheers, >> >> Jelmer >> >> _______________________________________________ >> Mailing list: https://launchpad.net/~dulwich-users >> Post to : [email protected] >> Unsubscribe : https://launchpad.net/~dulwich-users >> More help : https://help.launchpad.net/ListHelp > > > _______________________________________________ > Mailing list: https://launchpad.net/~dulwich-users > Post to : [email protected] > Unsubscribe : https://launchpad.net/~dulwich-users > More help : https://help.launchpad.net/ListHelp > _______________________________________________ Mailing list: https://launchpad.net/~dulwich-users Post to : [email protected] Unsubscribe : https://launchpad.net/~dulwich-users More help : https://help.launchpad.net/ListHelp

