[Pythonmac-SIG] Problems building 2.3.5 source on MacOS X Tiger
I am trying to build Python 2.3.5 sources on MacOS X 10.4.2 using gcc-4. My reason for doing this is to get a Tkinter linked against Tk X11 including BLT. I ran into considerable problems with the main link which is Makefile.pre.in:370-371 which reads libtool -o $(LDLIBRARY) -dynamic $(OTHER_LIBTOOL_OPT) $(LIBRARY) \ -framework System @LIBTOOL_CRUFT@ I have checked that this seems to be the same in the current cvs. I had edited Modules/Setup after running configure to reflect the locations of my Tcl, Tk X11 and BLT libraries and headers. The compilation ran without problem although there are a very large number of warnings. My first attempt at the link failed because none of the Tcl/Tk/BLT symbols were being found. Adding $(LOCALMODLIBS) to the link line above solved this. I was then left with a number of missing symbols relating to printf functions such as _fprintf$LDBLStub. This seems to happen because these functions in Tiger with gcc-4.0 are actually macros which translate into symbols in the System stub library which is not included on the link line. A little Googling revealed the underlying cause as trying to use libtool to link the libraries. The right way being to use the gcc compiler driver, which automatically includes all the necessary system libraries. I eventually succeeded with a command that looks like this: $(CC) -o $(LDLIBRARY) -dynamiclib $(OTHER_LIBTOOL_OPT) -all_load $(LIBRARY) $(LOCALMODLIBS) \ @LIBTOOL_CRUFT@ Apart from using the compiler driver the other changes are: -dynamiclib the appropriate option for the driver -all_load without this, ld just searches the libPythonXX.a for unresolved symbols from previous objects of which their are none. - all_load includes all objects in the static library into the link, which is what is needed. The reference to the System framework is no longer required because the compiler driver looks after that. This change enabled the make stage to complete. I am currently stuck with one of the apps not building properly with 'make frameworkinstall'. The framework appears to have built correctly. Bill Northcott ___ Pythonmac-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Problems building 2.3.5 source on MacOS X Tiger
On Jul 23, 2005, at 7:35 PM, Bill Northcott wrote: > I am trying to build Python 2.3.5 sources on MacOS X 10.4.2 using > gcc-4. I think you should try it with gcc 3.3 instead. -bob ___ Pythonmac-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Problems building 2.3.5 source on MacOS X Tiger
On 24/07/2005, at 4:01 PM, Bob Ippolito wrote: >> I am trying to build Python 2.3.5 sources on MacOS X 10.4.2 using >> gcc-4. >> > > I think you should try it with gcc 3.3 instead. I am well aware that it work better with gcc-3.3. However, gcc-4 is the default compiler for Tiger and the Makefile is just incorrect. Libtool should not be invoked to build a shared library because it is very dependent on operating system and compiler in ways which are not documented. Bill ___ Pythonmac-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/pythonmac-sig
Re: [Pythonmac-SIG] Problems building 2.3.5 source on MacOS X Tiger
On Jul 23, 2005, at 8:11 PM, Bill Northcott wrote: > On 24/07/2005, at 4:01 PM, Bob Ippolito wrote: > >>> I am trying to build Python 2.3.5 sources on MacOS X 10.4.2 using >>> gcc-4. >>> >>> >> >> I think you should try it with gcc 3.3 instead. >> > > I am well aware that it work better with gcc-3.3. However, gcc-4 is > the default compiler for Tiger and the Makefile is just incorrect. > Libtool should not be invoked to build a shared library because it is > very dependent on operating system and compiler in ways which are not > documented. I fixed this problem for 2.4.1 (CVS HEAD should be fine too). I don't really consider 2.3 important enough to spend my time backporting. If you notice, Apple didn't compile Python 2.3 under gcc 4 either. -bob ___ Pythonmac-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/pythonmac-sig
