compiling Python 2.3.3 Solaris 9 x86 question

Holger Joukl Holger.Joukl at LBBW.de
Tue Apr 13 04:39:49 EDT 2004


Stefan wrote:
> Hi,
>
> I am trying to build Python 2.3.3 on Solaris 9 x86. Everything goes fine
> except that I have some issues with curses module ...
>

Hi Stefan,
I had some python 2.3.3 build problems a while ago on a
solaris 8 system. I ended up modifying setup.py to know about
the "non-standard" paths where our stuff is installed, e.g. the
detect_modules method:

   241      def detect_modules(self):
   242          ### Ensure that /usr/local is always used
   243          ##add_dir_to_list(self.compiler.library_dirs,
'/usr/local/lib')
   244          ##add_dir_to_list(self.compiler.include_dirs,
'/usr/local/include')
   245
   246          # add_dir inserts as first list element, so /apps/prod
should come last
   247          add_dir_to_list(self.compiler.library_dirs,
'/apps/local/lib')
   248          add_dir_to_list(self.compiler.include_dirs,
'/apps/local/include')
   249          add_dir_to_list(self.compiler.library_dirs,
'/apps/prod/lib')
   250          add_dir_to_list(self.compiler.include_dirs,
'/apps/prod/include')
   251
   252          # fink installs lots of goodies in /sw/... - make sure we
   253          # check there
   254          if sys.platform == "darwin":
   255              add_dir_to_list(self.compiler.library_dirs, '/sw/lib')
   256              add_dir_to_list(self.compiler.include_dirs,
'/sw/include')
   257
   258          ##??? Why would I want to set -I and -L paths for the
destination dir?
   259          ## (sys.prefix == --prefix=<installation PREFIX dir, given
to configure>
   260          ##if os.path.normpath(sys.prefix) != '/usr':
   261          ##    add_dir_to_list(self.compiler.library_dirs,
   262          ##                    sysconfig.get_config_var("LIBDIR"))
   263          ##    add_dir_to_list(self.compiler.include_dirs,
   264          ##
sysconfig.get_config_var("INCLUDEDIR"))
   265

and also some runtime lib paths:

  667          # Curses support, requring the System V version of curses,
often
   668          # provided by the ncurses library.
   669          if platform == 'sunos4':
   670              inc_dirs += ['/usr/5include']
   671              lib_dirs += ['/usr/5lib']
   672
   673          if (self.compiler.find_library_file(lib_dirs, 'ncurses')):
   674              curses_libs = ['ncurses']
   675              exts.append( Extension('_curses', ['_cursesmodule.c'],
   676
define_macros=[('HAVE_NCURSES_H', 1)],
   677
runtime_library_dirs=['/apps/prod/lib'],
   678                                     libraries = curses_libs) )

Without the modifications, some of the extension modules (gdbm, curses,
readline) would
not build. Not exactly nice and portable, but I do not have the time right
now.

>Regarding this problem looks like 'configure' does not pickup
>Solaris's curses library.
>I had to manually pass to configure command libncurses library
>
>
>LDFLAGS="-L/opt/sfw/lib -R/opt/sfw/lib -lncurses"
>CPPFLAGS="-I/optsfw/include" ./configure --prefix=/usr/local
>--with-threads --enable-shared
>

Does this work for you when you finally run setup.py?

>Does this mean that python needs libncurses and can not work with
>Solaris curses library !?

I´m afraid I have no clues. Where does the Solaris curses reside?

Bye,
  Holger

Der Inhalt dieser E-Mail ist vertraulich. Falls Sie nicht der angegebene
Empfänger sind oder falls diese E-Mail irrtümlich an Sie adressiert wurde,
verständigen Sie bitte den Absender sofort und löschen Sie die E-Mail
sodann. Das unerlaubte Kopieren sowie die unbefugte Übermittlung sind nicht
gestattet. Die Sicherheit von Übermittlungen per E-Mail kann nicht
garantiert werden. Falls Sie eine Bestätigung wünschen, fordern Sie bitte
den Inhalt der E-Mail als Hardcopy an.

The contents of this  e-mail are confidential. If you are not the named
addressee or if this transmission has been addressed to you in error,
please notify the sender immediately and then delete this e-mail.  Any
unauthorized copying and transmission is forbidden. E-Mail transmission
cannot be guaranteed to be secure. If verification is required, please
request a hard copy version.





More information about the Python-list mailing list