[SOLVED] Re: compiling Python 2.3.3 Solaris 9 x86 question
Stefan
sp at sunguru.com
Tue Apr 13 09:25:14 EDT 2004
More details: I found that using Sun's cc compiler will do the work
without any problem. Make sure two things:
1. Make sure you are not using any libncurses library ...
For instance: SFWncur from companion CD
2. Install the 60day trial version of Sun's compiler or if you have
already the Sun's compiler installed just use CC=cc instead of GCC.
Using this config it will do the trick. For some reasons
gcc and configure are not picking up the correct config !
regards,
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,
More information about the Python-list
mailing list