[Python-Dev] more 2.1a2 macosx build problems

Steven D. Majewski sdm7g@virginia.edu
Wed, 7 Feb 2001 23:31:50 -0500 (EST)


Is anyone else tracking builds on macosx ?


A bug I reported [#131170] on the 2.1a2 release has been growing
more heads...


Initial problem:
 make install fails as it tries to run ranlib on a shared library:

ranlib: file: /usr/local/lib/python2.1/config/libpython2.1.dylib is not an
archive 

 
commented out that line in the makefile:

@if test -d $(LDLIBRARY); then :; else \ 
$(INSTALL_DATA) $(LDLIBRARY) $(LIBPL)/$(LDLIBRARY) ; \ 
# $(RANLIB) $(LIBPL)/$(LDLIBRARY) ; \ 

make and install seem to work, however, if you run python from
somewhere other than the build directory, you get a fatal error:

dyld: python2.1 can't open library: libpython2.1.dylib (No such file or
directory, errno = 2) 

looking at executable  with 'otool -L' shows that while system
frameworks have their complete pathnames, libpython2.1.dylib 
has no path, so it's expected to be in the current directory.


Added "-install_name $(LIBPL)/$(LDLIBRARY)" to the libtool command
to tell it that it will be installed somewhere other than the current
build directory. 

'make' fails on setup when python can't find os module.


Investigating that, it looks like sys.path is all confused. 

Looking at Modules/getpath.c, it looks like the WITH_NEXT_FRAMEWORK
conditional code is getting the path from the shared library and not the
executable. 





-- Steve Majewski