Compiling Python 2.2 with GCC in HPUX 10.20 does not work
Michael Piotrowski
mxp at dynalabs.de
Wed Mar 6 19:41:04 EST 2002
pekka niiranen <krissepu at vip.fi> writes:
> True, HP-UX's default compiler is only meant for compliling the kernel
> therefore I installed binutils v2.11.2, gcc v3.01 and gmake v3.79.1 from
> HP's software repository and tried compiling with this script:
>
> #! /usr/bin/sh
> export CCOPTS='+z'
> unset LANG
> gmake distclean
> CC=gcc ./configure --with-gcc --with-threads=no --without-cxx
> --prefix=/opt/python
Just a note: The CCOPTS environment variable is only used by HP's ANSI
C compiler, gcc doesn't use it.
> gmake fails twice:
>
> 1)
> /osasto/home/niirape/python_softa/Python-2.2/Modules/getaddrinfo.c:544:
> warning: `h_error' might be used uninitialized in this funcn
[...]
Use -D_XOPEN_SOURCE_EXTENDED to get the definition of h_error.
> ld -b build/temp.hp-ux-B.10.20-9000/777-2.2/_cursesmodule.o
> -L/usr/local/lib -lncurses -o
> build/lib.hp-ux-B.10.20-9000/777-2.2/_curl
> ld: DP relative code in file /usr/local/lib/libncurses.a(lib_addch.o)
> -
> shared library must be position
> independent. Use +z or +Z to recompile.
> WARNING: building of extension "_curses" failed: command 'ld' failed
> with exit status 1
The ncurses library must either be a shared library, or it must
contain only position-independent code.
Thus, you need to rebuild ncurses with the appropriate options: +z for
the HP ANSI C compiler, -fpic for gcc.
--
Michael Piotrowski, M.A. <mxp at dynalabs.de>
More information about the Python-list
mailing list