Re: Cannot force configure/setup.py to pick up location of readline (SFWrline) on Solaris 10
Thanks to those who offered suggestions for this. It appears that building Python 2.4.3 on Solaris 10 with readline (SFWrline package) support is a little long-winded but possible, using the following steps: $ ./configure --prefix=/opt/python-2.4.3 --enable-shared $ vi Modules/Setup.local --- add one line: --- readline readline.c -I/opt/sfw/include -L/opt/sfw/lib -lreadline -ltermcap - $ make ### will fail with ld error: ### Undefined first referenced symbol in file initreadline./libpython2.4.so ld: fatal: Symbol referencing errors. No output written to python collect2: ld returned 1 exit status *** Error code 1 make: Fatal error: Command failed for target `python' ### however, just running make again ends up building fine ... ### $ make $ make install # might need root access (sudo/su) I hope this process can be improved, and if I have time I'll look at why make fails half way but works fine when kicked off a second time. I'd like to get /opt/sfw/ added to the standard lib/include path for Solaris (10 at least) as this is where Sun's open-source packages get installed. Is this just a matter of raising a ticket? Cheers, Chris Chris Miles wrote: On a standard Solaris 10 installation with Sun-supplied open-source packages installed (like SFWrline for readline libs) I cannot seem to force Python configure/setup.py to build with readline support. -- http://chrismiles.info/ -- http://mail.python.org/mailman/listinfo/python-list
Re: Cannot force configure/setup.py to pick up location of readline (SFWrline) on Solaris 10
Chris Miles schrieb: I hope this process can be improved, and if I have time I'll look at why make fails half way but works fine when kicked off a second time. You need to use GNU make for that to work. The build regenerates the makefile, but Sun make doesn't recognize the change. There was a message telling you so. GNU make will see that the makefile was rebuilt, and re-read it before proceeding. I'd like to get /opt/sfw/ added to the standard lib/include path for Solaris (10 at least) as this is where Sun's open-source packages get installed. Is this just a matter of raising a ticket? Not easily - resolving this might take months or years. If you provide a well-engineered patch, chances that Python changes are much higher. Also, your original complaint wasn't that readline isn't considered, but that setup.py didn't find it even though configure did. A patch fixing that has a higher chance of being accepted than a patch adding /opt/sfw to the standard search path (which is really a decision Sun should take, not the Python maintainers - in absence of a Sun change, it's then the local administrator who decides). Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list
Re: Cannot force configure/setup.py to pick up location of readline (SFWrline) on Solaris 10
Martin v. Löwis wrote: You need to use GNU make for that to work. The build regenerates the makefile, but Sun make doesn't recognize the change. There was a message telling you so. Thanks Martin, you are totally correct. Using gmake avoids the problem. Also, your original complaint wasn't that readline isn't considered, but that setup.py didn't find it even though configure did. A patch fixing that has a higher chance of being accepted than a patch adding /opt/sfw to the standard search path (which is really a decision Sun should take, not the Python maintainers - in absence of a Sun change, it's then the local administrator who decides). Fair point. If time permits I'll look into constructing such a patch. Cheers, Chris -- http://chrismiles.info/ -- http://mail.python.org/mailman/listinfo/python-list
Cannot force configure/setup.py to pick up location of readline (SFWrline) on Solaris 10
On a standard Solaris 10 installation with Sun-supplied open-source packages installed (like SFWrline for readline libs) I cannot seem to force Python configure/setup.py to build with readline support. SFWrline installs readline in /opt/sfw/lib /opt/sfw/include (This is all attempted with Python-2.4.3 on Solaris 10 06/06 i386) With this configure: ./configure --prefix=/opt/python-2.4.3 --enable-shared CPPFLAGS=-I/opt/sfw/include CFLAGS=-I/opt/sfw/include LDFLAGS=-L/opt/sfw/lib The resulting output includes: ... checking for rl_callback_handler_install in -lreadline... yes checking for rl_pre_input_hook in -lreadline... yes checking for rl_completion_matches in -lreadline... yes ... and config.log contains: ... ac_cv_lib_readline_rl_callback_handler_install=yes ac_cv_lib_readline_rl_completion_matches=yes ac_cv_lib_readline_rl_pre_input_hook=yes ... However, make doesn't build a readline module and I think this is because setup.py is not taking the custom *FLAGS into account. Even if I export them as environment variables, I get no readline module. How do I force the build to use the custom paths? And/or: can we teach configure/setup.py to include /opt/sfw/ when on Solaris, as this is the standard location for Sun's supplied open-source packages (ie: on the Companion disc) ? btw: an answer to this is not to install other 3rd party readline packages such as from sunfreeware.com or blastwave, as that should not be necessary when Sun supply the packages themselves (and some organisations will not allow those packages). Cheers, Chris -- http://chrismiles.info/ -- http://mail.python.org/mailman/listinfo/python-list
Re: Cannot force configure/setup.py to pick up location of readline (SFWrline) on Solaris 10
Chris However, make doesn't build a readline module and I think this is Chris because setup.py is not taking the custom *FLAGS into account. Chris Even if I export them as environment variables, I get no readline Chris module. Try ./python setup.py build_ext --help There are a couple flags you can give to the build_ext command that direct to the appropriate include and library directories. It would be nice if distutils could be persuaded to listen to *FLAGS, but it doesn't. Maybe someone reading this would like to make it so. Skip -- http://mail.python.org/mailman/listinfo/python-list
Re: Cannot force configure/setup.py to pick up location of readline (SFWrline) on Solaris 10
Chris Miles schrieb: How do I force the build to use the custom paths? Not through setup.py. Instead, you edit Modules/Setup to provide per-module compile and link flags. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list