jvandal / modwsgi

Automatically exported from code.google.com/p/modwsgi
0 stars 0 forks source link

undefined symbol: floor #115

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I've compiled mod_wsgi 2.3 with a custom build of Python 2.5.2 on a 64bit
Linux machine. Apache fails to start with the module

apache2: Syntax error on line 185 of /etc/apache2/apache2.conf: Syntax
error on line 1 of /etc/apache2/mods-enabled/wsgi.load: Cannot load
/usr/lib/apache2/modules/mod_wsgi.so into server:
/usr/lib/apache2/modules/mod_wsgi.so: undefined symbol: floor

The problem is caused by a missing "-lm" in LDLIBS:

LDFLAGS = -L/path/to/lib/python2.5/config
LDLIBS = -lpython2.5 -lpthread -ldl  -lutil

The problem can be solved by adding "-lm" manually. I suggest you replace
the custom distutils hack in configure.in with a call to $(PYTHON)-config
--ldflags

Christian

Original issue reported on code.google.com by tiran79 on 24 Oct 2008 at 5:05

GoogleCodeExporter commented 8 years ago
Same problem happening on Pardus Linux 2008 with the standart installation of 
Apache. 

Original comment by sle...@gmail.com on 25 Oct 2008 at 12:14

GoogleCodeExporter commented 8 years ago
This is happening because recent httpd on some platforms aren't linking -lm any 
more.

The python-config is new to Python 2.5 and therefore can't be used.

The python-config script does highlight though that could at least also be 
linking in value of SYSLIBS.

Check in changes to configure script in revision 1098 of subversion trunk for 
mod_wsgi 3.0.

Hopefully adding in the extra libs will not cause problems. On some BSD systems 
it runs the risk of screwing 
up things badly because of the different threading libraries that exist and may 
be in use.

Original comment by Graham.Dumpleton@gmail.com on 25 Oct 2008 at 9:46

GoogleCodeExporter commented 8 years ago

Original comment by Graham.Dumpleton@gmail.com on 25 Oct 2008 at 10:12

GoogleCodeExporter commented 8 years ago
The simple semi-automatic fix is as follows (example of building mod_wsgi 2.3 
for
Python 2.6):

./configure --with-python=/usr/local/bin/python2.6
sed -i 's/\(^LDLIBS = .*$\)/\1 -lm/' Makefile
make
sudo make install

Original comment by mrts%mrt...@gtempaccount.com on 13 Feb 2009 at 2:55

GoogleCodeExporter commented 8 years ago
Backported to 2.X branch for 2.4 in revision 1252.

Original comment by Graham.Dumpleton@gmail.com on 20 Mar 2009 at 11:29

GoogleCodeExporter commented 8 years ago
Version 2.4 of mod_wsgi now released.

Original comment by Graham.Dumpleton@gmail.com on 11 Apr 2009 at 10:25