Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python is not linked with mod_python.so #85

Open
rohan-97 opened this issue Jan 12, 2020 · 3 comments
Open

Python is not linked with mod_python.so #85

rohan-97 opened this issue Jan 12, 2020 · 3 comments

Comments

@rohan-97
Copy link

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
Copy link
Author

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

@jenner
Copy link

jenner commented Jan 12, 2020

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

@ewah
Copy link

ewah commented Feb 10, 2020

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"))'`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants