Operating System - HP-UX
1830938 Members
1948 Online
110017 Solutions
New Discussion

Installing Python 2.3.2 from source

 
Matt Hearn
Regular Advisor

Installing Python 2.3.2 from source

Hey y'all, I'm trying to install Python 2.3.2 from the source files (since last I checked there wasn't a depot for it yet).

I'm getting a host of errors. When I tried to compile as is, using cc, it would fail, mostly giving me errors about using options that are only available with ANSI/C. So I installed gcc 3.3.2 and tried again; it got a lot further, but then it gave me a lot of "_POSIX_C_SOURCE redefined" errors, and finally failed with this:

gcc -pthread -Wl,-E -Wl,+s -o python \
Modules/python.o \
libpython2.3.a -lnsl -lrt -ldld -lm
/usr/ccs/bin/ld: Unsatisfied symbols:
PyThread_acquire_lock (code)
PyThread_exit_thread (code)
PyThread_allocate_lock (code)
PyThread_free_lock (code)
PyThread_start_new_thread (code)
PyThread_release_lock (code)
PyThread_get_thread_ident (code)
PyThread__init_thread (code)
collect2: ld returned 1 exit status
*** Error exit code 1

I heard that editing out the "O" option from the makefile (turning off optimization) could help, but I get the same error. Any ideas?

Thanks!!!!
3 REPLIES 3
Hemanth Gurunath Basrur
Honored Contributor

Re: Installing Python 2.3.2 from source

Hello Matt,

Refer to the foll. link for info.

http://diveintopython.org/installing_python/source.html

HTH.

Regards,
Hemanth
Matt Hearn
Regular Advisor

Re: Installing Python 2.3.2 from source

That website details the commands used to install the software, which are already described in the README, and which I have already attempted.

Has nobody seen anything like this error before? When I google some of the errors I get a lot of hits, but no resolutions. Have I come across the unfixable bug?

Thanks!
Steve Post
Trusted Contributor

Re: Installing Python 2.3.2 from source

I have not compiled python on my HPUX11.0 platform. But I have compiled other stuff and seen similar errors.

libpython2.3.a -lnsl -lrt -ldld -lm
/usr/ccs/bin/ld: Unsatisfied symbols:

I would check your $PATH. Make sure gcc's directories are before the CC's. I bet it is still using part of the original c compiler.

Check to see if you need to set CC=GCC or cc=gcc ..or cc=/opt/gcc/bin/gcc...or.... you get the idea. But I assume that was in the documentation already.

Also I have had problems where I needed to install gmake and binutils before I could get gcc to work right. At least that's what I needed for compiling perl.

hope my guess helps.
steve