Compiling Python 2.2 with GCC in HPUX 10.20 does not work
Kevin Smith
Kevin.Smith at theMorgue.org
Tue Mar 5 15:05:10 EST 2002
I got Python 2.2 to compile on HPUX 10.20 with gcc 2.95.3. I got a very
similar error to what was in your message. I actually just added the
following line to Modules/socketmodule.c at line 161 just above the
'#ifndef RISCOS' block.
int h_errno;
Otherwise, it didn't look like h_errno was ever being declared. I can't
help you with the curses problem. I still haven't gotten that to work.
Kevin Smith
In <3C84F129.70905 at vip.fi> pekka niiranen <krissepu at vip.fi> wrote:
>
>--------------020604040107000300090304
>Content-Type: text/plain; charset=us-ascii; format=flowed
>Content-Transfer-Encoding: 7bit
>
>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
>>
>
>
>--------------020604040107000300090304
>Content-Type: text/html; charset=us-ascii
>Content-Transfer-Encoding: 7bit
>
><html>
><head>
></head>
><body>
>True, HP-UX's default compiler is only meant for compliling the kernel <br>
>therefore I installed binutils v2.11.2, gcc v3.01 and
>gmake v3.79.1 from<br>
>HP's software repository and tried compiling with this script:<br>
><br>
>#! /usr/bin/sh<br>
>export CCOPTS='+z'<br>
>unset LANG<br>
>gmake distclean<br>
>CC=gcc ./configure --with-gcc --with-threads=no --without-cxx -
>-prefix=/opt/python
><br>
><br>
>gmake fails twice:<br>
><br>
>1)<br>
>/osasto/home/niirape/python_softa/Python-2.2/Modules/getaddrinfo.c:544:
>warning:
>`h_error' might be used uninitialized in this funcn<br>
>In file included from /osasto/home/niirape/python_softa/Python
>-2.2/Modules/socketmodule.c:239:<br>
>/osasto/home/niirape/python_softa/Python-2.2/Modules/getnameinfo.c: In
>function
>`getnameinfo':<br>
>/osasto/home/niirape/python_softa/Python-2.2/Modules/getnameinfo.c:184:
>`h_errno'
>undeclared (first use in this function)<br>
>/osasto/home/niirape/python_softa/Python-2.2/Modules/socketmodule.c: In
>function
>`gethost_common':<br>
>/osasto/home/niirape/python_softa/Python-2.2/Modules/socketmodule.c:1975:
>`h_errno' undeclared (first use in this function)<br>
>WARNING: building of extension "_socket" failed: command 'gcc' failed with
>exit status 1 <br>
><br>
>2)<br>
>gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I.
>-I/osasto/home/niirape/python_softa/Python-2.2/./Include
>-I/usr/local/incluo<br>
>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<br>
>ld: DP relative code in file /usr/local/lib/libncurses.a(lib_addch.o) - shared
>library must be position<br>
> independent. Use +z or +Z to recompile.<br>
>WARNING: building of extension "_curses" failed: command 'ld' failed with
>exit status 1 <br>
><br>
>Anybody solved these problems<br>
><br>
>-pekka-<br>
><br>
>Martin von Loewis wrote:<br>
><blockquote type="cite" cite="mid:j4664b73qp.fsf at informatik.hu-berlin.de">
> <pre wrap="">pekka niiranen <a class="moz-txt-link-rfc2396E"
> href="mailto:krissepu at vip.fi"><krissepu at vip.fi></a>
> writes:<br><br></pre>
> <blockquote type="cite">
> <pre wrap="">I tried the build script below in HP-UX 10.20<br>( HP
> -UX B.10.20 A 9000/777 2002144332 two-user license)<br>and got the
> following errors during make:<br><br>cc -Ae -c -DNDEBUG -O -I.
> -I./Include -DHAVE_CONFIG_H -o<br>Modules/python.o
> Modules/python.c<br>(Bundled) cc: warning 480: The -A option is
> available only with the<br>C/ANSI C product; ignored.<br>(Bundled)
> cc: warning 480: The -O option is available only with the<br>C/ANSI
> C product; ignored.<br></pre>
> </blockquote>
> <pre wrap=""><!----><br>It seems that you are using the bundled
> compiler. Python source code<br>is ANSI C, you need an ANSI C
> compiler to compile it. Try either the<br>HP ANSI C compiler, or gcc
> (the former being recommended).<br><br>Regards,<br>Martin<br></pre>
> </blockquote>
> <br>
> </body>
> </html>
>>--------------020604040107000300090304-->
More information about the Python-list
mailing list