[ python-Bugs-1397850 ] libpython2.4.so get not installed

SourceForge.net noreply at sourceforge.net
Wed Jan 11 23:55:38 CET 2006


Bugs item #1397850, was opened at 2006-01-05 17:01
Message generated for change (Comment added) made by loewis
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1397850&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Installation
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: hajo (hajoehlers)
Assigned to: Nobody/Anonymous (nobody)
Summary: libpython2.4.so get not installed 

Initial Comment:
Given:
AIX 5.1
GCC 3.3.2
Python 2.4.2 ( Python-2.4.2.tar.gz )

./configure       \
 --enable-unicode \
 --enable-shared  \
 --with-gcc       \
 --mandir=/usr/local/man  \
 --infodir=/usr/local/info

Problem:
during " gmake install "  the libpython2.4.a will not
be installed in /usr/local/lib and the link for
libpython2.4.so does not exist then.

I did not dig further but below is the output from
"gmake install"

For me the 
...
if test -f libpython2.4.so; then ...

look wrong because it does not contain a Path and will
fail.

regards
Hajo

output during "gmake install"

...
if test -f libpython2.4.so; then \^M
        if test ".so" = .dll; then \^M
                /opt/freeware/bin/install -c -m 555
libpython2.4.so /usr/local/bin; \^M
        else \^M
                /opt/freeware/bin/install -c -m 555
libpython2.4.so /usr/local/lib/libpython2.4.a; \^M
                if test libpython2.4.so !=
libpython2.4.a; then \^M
                        (cd /usr/local/lib; ln -sf
libpython2.4.a libpython2.4.so); \^M
                fi \^M
        fi; \^M
else    true; \^M
...


----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2006-01-11 23:55

Message:
Logged In: YES 
user_id=21627

--enable-shared simply isn't supported on AIX. I'm tempted
to reject this as "won't fix".

If anything should be fixed, we should add

  *) AC_MSG_ERROR(--enable-shared not supported on this system)
  ;;

to the 

# Other platforms follow
if test $enable_shared = "yes"; then

block.

----------------------------------------------------------------------

Comment By: hajo (hajoehlers)
Date: 2006-01-10 22:26

Message:
Logged In: YES 
user_id=1420117

Hi Neal
if give up to test/fix the configure.in With the help from
Ulrich Berning i build a static version and convert these to
a shared one. See notes down below.

Tnx for supporting
Hajo


$ cat ./mkshared.python <<EOF

#!/bin/ksh
# Task: Create a shared/dynamic version of python

user=`whoami`
if [ $user != 'root' ]; then
  echo "Try again as root ..."
  exit 1
fi
case $1 in
        -gcc)
        cmd="gcc -o python_shared Modules/python.o \
 -Wl,-bE:Modules/python.exp \
 -L/usr/local/lib -lpython2.4 -lpthread -ldl -lm -lc"
        ;;
        -xlc)
        cmd="cc_r -o python_shared Modules/python.o \
 -bE:Modules/python.exp \
 -L/usr/local/lib -lpython2.4 -lpthread -ldl -lm -lc"
        ;;
        *)
        echo "Usage $0 -gcc|-xlc"
        exit 0
        ;;
esac

echo "Creating temporary directory '.extract' ..."
mkdir -p .extract

echo "Creating a shared object from the static library ..."
ld -o .extract/shr.o libpython2.4.a -bnoentry \
 -bM:SRE -bE:Modules/python.exp \
 -H512 -T512 -lpthread -ldl -lm -lc
chmod 555 .extract/shr.o

echo "Creating shared library 'libpython2.4.so' ..."
ar vr libpython2.4.so .extract/shr.o

echo "Removing temporary directory '.extract' ..."
rm -rf .extract

echo "Installing shared library 'libpython2.4.so' as
'libpython2.4.a'
in /usr/local/lib ..."
slibclean
cp libpython2.4.so /usr/local/lib/libpython2.4.a
chmod 555 /usr/local/lib/libpython2.4.a
strip /usr/local/lib/libpython2.4.a
rm -f libpython2.4.so

echo "Linking new python executable with shared library ..."
eval $cmd

echo "Removing old executables in /usr/local/bin ..."
rm -f /usr/local/bin/python
rm -f /usr/local/bin/python2.4

echo "Installing new binary in /usr/local/lib ..."
cp python_shared /usr/local/bin/python2.4
strip /usr/local/bin/python2.4
chmod 755 /usr/local/bin/python2.4
ln -f /usr/local/bin/python2.4 /usr/local/bin/python
rm -f python_shared

echo "Calling dump -H on new executable to check the use of
the shared
library ..."
dump -H /usr/local/bin/python2.4

echo "All done ..."
EOF

# Clean Up LIBPATH or verify its setting.
unset LIBPATH

# Change into Python build directory
cd ./Python-2.4.2

# Start the converstion script
../mkshared.python -xlc

Now is /usr/local/bin/python an small executable which load
libpython2.4.so 

----------------------------------------------------------------------

Comment By: Neal Norwitz (nnorwitz)
Date: 2006-01-09 06:34

Message:
Logged In: YES 
user_id=33168

The problem seems to be in configure.in.  Search for
Py_ENABLE_SHARED.  Try adding a line for LDLIBRARY (like for
BeOS).  You may also need a line for INSTSONAME and others
variables too.  After modifying configure.in, you will need
to regenerate with autoconf.  You can try modifying
configure which is generated by autoconf.  Then re-run
configure.  Search for libpython in the generated Makefile.
 That should have a .so ending.

----------------------------------------------------------------------

Comment By: Neal Norwitz (nnorwitz)
Date: 2006-01-09 06:21

Message:
Logged In: YES 
user_id=33168

The problem seems to be in configure.in.  Search for
Py_ENABLE_SHARED.  Try adding a line for LDLIBRARY (like for
BeOS).  You may also need a line for INSTSONAME and others
variables too.  After modifying configure.in, you will need
to regenerate with autoconf.  You can try modifying
configure which is generated by autoconf.  Then re-run
configure.  Search for libpython in the generated Makefile.
 That should have a .so ending.

----------------------------------------------------------------------

Comment By: hajo (hajoehlers)
Date: 2006-01-06 17:24

Message:
Logged In: YES 
user_id=1420117

Its looked like that the libpython2.4.so will not be build.
I took a lock at the Makefile but could not get a clear view
what option is needed to let the system build a libpython2.4.so



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1397850&group_id=5470


More information about the Python-bugs-list mailing list