Compiling Python 2.2 with GCC in HPUX 10.20 does not work
pekka niiranen
krissepu at vip.fi
Tue Mar 5 11:23:22 EST 2002
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
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
In file included from
/osasto/home/niirape/python_softa/Python-2.2/Modules/socketmodule.c:239:
/osasto/home/niirape/python_softa/Python-2.2/Modules/getnameinfo.c: In
function `getnameinfo':
/osasto/home/niirape/python_softa/Python-2.2/Modules/getnameinfo.c:184:
`h_errno' undeclared (first use in this function)
/osasto/home/niirape/python_softa/Python-2.2/Modules/socketmodule.c: In
function `gethost_common':
/osasto/home/niirape/python_softa/Python-2.2/Modules/socketmodule.c:1975:
`h_errno' undeclared (first use in this function)
WARNING: building of extension "_socket" failed: command 'gcc' failed
with exit status 1
2)
gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I.
-I/osasto/home/niirape/python_softa/Python-2.2/./Include -I/usr/local/incluo
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
Anybody solved these problems
-pekka-
Martin von Loewis wrote:
>pekka niiranen <krissepu at vip.fi> writes:
>
>>I tried the build script below in HP-UX 10.20
>>( HP-UX B.10.20 A 9000/777 2002144332 two-user license)
>>and got the following errors during make:
>>
>>cc -Ae -c -DNDEBUG -O -I. -I./Include -DHAVE_CONFIG_H -o
>>Modules/python.o Modules/python.c
>>(Bundled) cc: warning 480: The -A option is available only with the
>>C/ANSI C product; ignored.
>>(Bundled) cc: warning 480: The -O option is available only with the
>>C/ANSI C product; ignored.
>>
>
>It seems that you are using the bundled compiler. Python source code
>is ANSI C, you need an ANSI C compiler to compile it. Try either the
>HP ANSI C compiler, or gcc (the former being recommended).
>
>Regards,
>Martin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20020305/9fa321db/attachment.html>
More information about the Python-list
mailing list