Repository navigation
undefined symbol: PyExc_SystemError #81
Copy link
Copy link
Open
Description
OS: Debian Buster
mod_python: master HEAD (7af8011)
/usr/src/mod_python# ./configure --with-python=/usr/bin/python3
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for ar... ar
checking for a BSD-compatible install... /usr/bin/install -c
checking whether make sets $(MAKE)... yes
checking for main in -lm... yes
checking for an ANSI C-conforming const... yes
checking your blood pressure... a bit high, but we can proceed
configure: checking whether apxs is available...
checking for apxs2... /usr/bin/apxs2
checking Apache version... 2.4.38
checking for Apache libexec directory... /usr/lib/apache2/modules
checking for Apache include directory... -I/usr/include/apache2
checking for --with-python... /usr/bin/python3
checking Python version... 3.7
checking for --with-mutex-dir... no
Using MUTEX_DIR /tmp
checking for --with-max-locks... no
Using 8 MAX_LOCKS.
checking for --with-flex... no
checking for flex... /usr/bin/flex
found /usr/bin/flex, we'll use this. Use --with-flex to specify another.
checking flex version... configure: WARNING: Flex version 2.6.4 found.
Version 2.5.31 or greater is required. You can generally ignore this
warning unless you need to regenerate psp_parser.c from psp_parse.l.
If you do need regenerate psp_parser.c, use --with-flex to specify the
location of the correct flex version. See the README for more information.
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating Doc/Makefile
config.status: creating src/include/mod_python.h
config.status: creating test/Makefile
config.status: creating dist/setup.py
config.status: creating dist/Makefile
config.status: creating scripts/Makefile
config.status: creating scripts/mod_python
Running make test yields following errors: apache2: Syntax error on line 57 of /usr/src/mod_python/test/conf/test.conf: Cannot load /usr/src/mod_python/src/mod_python.so into server: /usr/src/mod_python/src/mod_python.so: undefined symbol: PyExc_SystemError
Seems like libpython is not linked properly:
:/usr/src/mod_python# ldd src/mod_python.so
linux-vdso.so.1 (0x00007fffd907c000)
libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007f4494320000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f44942ff000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f44942f0000)
libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f44942e0000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f4494110000)
/lib64/ld-linux-x86-64.so.2 (0x00007f449439d000)
Any hints on how to solve this?
Thanks in advance
Igor
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
jenner commentedon Nov 8, 2019
Found the problem: in ecbdcf1
print(distutils.sysconfig.get_config_var("LDLIBRARY"))yieldslibpython3.7m.so, which is not a valid linker argument. Replacing it withprint(distutils.sysconfig.get_config_var("BLDLIBRARY"))works though:I guess the config var depends on the platform.
ewah commentedon Feb 10, 2020
BLDLIBRARYisn't consistent depending on the how the original python got built.locally i've reverted the config code back to pre-ecbdcf17884551b823fcef12cd5bd91103bde1fc (nov 7, 2019)
thkatsou commentedon Dec 2, 2020
trying to compile mod-python on ubuntu 20.10 against python 2.7 .
Compilation and installation goes ok but apache2 does not start with same error.
apachectl configtest
apache2: Syntax error on line 146 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/python.load: Cannot load /usr/lib/apache2/modules/mod_python.so into server: /usr/lib/apache2/modules/mod_python.so: undefined symbol: PyExc_SystemError
Action 'configtest' failed.
The Apache error log may have more information.
tried all of the patches on makefile.in still no luck.
update: this modification on configure script worked ana apache2 started.
0e436f1
now I am facing
ImportError: Import by filename is not supported.
diegobill commentedon Apr 22, 2024
any update from this error? I am still seeing on Docker in Ubuntu 16.04: