[Python-bugs-list] [ python-Bugs-433234 ] Problems building under HP-UX 11.0
noreply@sourceforge.net
noreply@sourceforge.net
Mon, 20 Aug 2001 13:11:41 -0700
Bugs item #433234, was opened at 2001-06-14 13:35
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=433234&group_id=5470
Category: Build
Group: Platform-specific
Status: Open
Resolution: None
Priority: 5
Submitted By: Ivan Munoz (imbunche)
>Assigned to: Martin v. Löwis (loewis)
Summary: Problems building under HP-UX 11.0
Initial Comment:
My system:
HP-UX dev1 B.11.00 A 9000/782 2015744842 two-user
license
I'm using gcc, gcc version 2.95.2 19991024 (release)
Trying to compile Python 2.1 I ran into a number of
problems.
After the customary configure; make I get the following
error while making the modules
ld: DP relative code in file
build/temp.hp-ux-B.11.00-9000/782-2.1/_weakref.o -
shared library must be position
independent. Use +z or +Z to recompile.
WARNING: building of extension "_weakref" failed:
command 'ld' failed with exit status 1
The error message is the same for all extensions.
I fixed it by defining in the Makefile
CFLAGSFORSHARED=-fpic
tried again ... better but:
gcc -Wl,-E -Wl,+s
-Wl,+b/home/imunoz/local/hp/lib/python2.1/lib-dynload
-o python \
Modules/python.o \
libpython2.1.a -lnsl -ldld -lpthread
-lm
/usr/bin/ld: Data Linkage Table (+z) overflow in file
libpython2.1.a(exceptions.o) - use +Z option to
recompile
collect2: ld returned 1 exit status
make: *** [python] Error 1
Then I changed -fpic by -fPIC and voila! (tip found
thanx to a google search).
still problems when generating the module's shared
libraries. Fixed by:
Makefile:301
# Build the shared modules
sharedmods: $(PYTHON)
PY_CFLAGS= $(CFLAGS) $(CFLAGSFORSHARED) -fPIC
PYTHONPATH= ./$(PYTHON) $(srcdir)/setup.py build
This last step I don't understand but Python won't make
the modules without it.
Finally got Python 2.1 in HP-UX 11. Does anyone knows a
better way?
----------------------------------------------------------------------
>Comment By: Neil Schemenauer (nascheme)
Date: 2001-08-20 13:11
Message:
Logged In: YES
user_id=35752
Assigned to Martin as I think he knowns more about shared
libraries than I do. I think for gcc that -fPIC should
be supplied if shared libraries are being built. So,
CFLAGSFORSHARED should include -fPIC.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=433234&group_id=5470