mod_python icon indicating copy to clipboard operation
mod_python copied to clipboard

Python is not linked with mod_python.so

Open rohan-97 opened this issue 6 years ago • 3 comments

When I tried to compile with python3, and did ldd on mod_python.so found that python is not linked to mod_python.so

Steps to reproduce

# ./configure --with-python=/usr/bin/python3.5
# make
# make install
# ldd ./src/mod_python.so
or
# ldd ./src/.libs/mod_python.so

Output:

# ldd ./src/mod_python.so
        linux-vdso.so.1 (0x00007fff9c7ad000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fddbd36b000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fddbd167000)
        libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007fddbcf64000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fddbcbc5000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fddbd7b0000)

As we can see there is python is not linked to mod_python.so

rohan-97 avatar Jan 12 '20 10:01 rohan-97

after running configure, in src/Makefile I found LDLIBS=libpython3.5m.so -lpthread -ldl -lutil which should be LDLIBS=-lpython3.5m -lpthread -ldl -lutil

rohan-97 avatar Jan 12 '20 10:01 rohan-97

Related to #81, dunno why it's closed though.

jenner avatar Jan 12 '20 11:01 jenner

locally i've reverted the ./configure code back to pre-ecbdcf17884551b823fcef12cd5bd91103bde1fc (nov 7, 2019)

+    if test "$PyMAJVERSION" -eq "3"; then
+        LDLIBS1="-lpython${PyMAJVERSION}"
+    else
+        LDLIBS1="-lpython${PyVERSION}"
+    fi
-    LDLIBS1=`${PYTHON_BIN} -c 'import distutils.sysconfig;\
-        print(distutils.sysconfig.get_config_var("LDLIBRARY"))'`

ewah avatar Feb 10 '20 23:02 ewah