haroldyong / modwsgi

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

mod_wsgi.c:9633: error: 'wsgi_set_dont_write_bytecode' undeclared here (not in a function) #294

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
This is on OpenBSD 5.1 box with Apache 3

What steps will reproduce the problem?
1. downloaded and unpacked mod_wsgi-3.4.tar.gz
2. ./configure
3. make

$ make
/usr/sbin/apxs -c -I/usr/local/include/python2.7 -DNDEBUG 
-DTHREAD_STACK_SIZE=0x20000  mod_wsgi.c -L/usr/local/lib 
-L/usr/local/lib/python2.7/config -lpython2.7 -pthread  -lutil -lm
cc -O2 -pipe -DINET6 -Dss_family=__ss_family -Dss_len=__ss_len 
-DHAVE_SOCKADDR_LEN -DMOD_SSL=208116 -DEAPI -DUSE_SETUSERCONTEXT -fPIC 
-DSHARED_MODULE -I/usr/lib/apache/include -I/usr/local/include/python2.7 
-DNDEBUG -DTHREAD_STACK_SIZE=0x20000  -c mod_wsgi.c
mod_wsgi.c:9633: error: 'wsgi_set_dont_write_bytecode' undeclared here (not in 
a function)
apxs:Break: Command failed with rc=1
*** Error code 1

What does that tell me? Should it work on my kind of system or not?
BTW: compiling for Apache 2 worked fine on the same system. But I dont use 
Apache2

Original issue reported on code.google.com by tpfen...@gmail.com on 18 Mar 2013 at 9:17

GoogleCodeExporter commented 8 years ago
There is no such things as Apache 3.

If you mean Apache 2.3, you shouldn't really use that as that was a development 
stream of Apache. You should be using Apache 2.2 or Apache 2.4.

I perhaps suspect though that the problem may be that you are using Apache 1.3. 
It is quite possible from looking at the mod_wsgi code, that Apache 1.3 may not 
work if you are using Python 2.7 or later.

If it is Apache 1.3, then perhaps go back and try mod_wsgi 3.3 instead. Better 
still, stop using Apache 1.3 as it is no longer supported by the Apache 
software foundation. Support for Apache 1.3 was being dropped completely in 
mod_wsgi 4.0. If I have managed to break support for it in mod_wsgi 3.4 by 
accident, not sure if I will be in a hurry to fix it it at all since Apache 1.3 
should no longer be used.

Original comment by Graham.Dumpleton@gmail.com on 19 Mar 2013 at 12:52

GoogleCodeExporter commented 8 years ago
Apache 1.3 it is , sorry, mistyped.

The version of Apache 1.3 is maintained by OpenBSD. Apache 2 currently does not 
work with PHP on that machine for some reason. Thanks for the hints, I will 
check.

Original comment by tpfen...@gmail.com on 19 Mar 2013 at 6:36

GoogleCodeExporter commented 8 years ago
I can report back, that compilation indeed works perfectly with version 3.3. 
Thank you!

Original comment by tpfen...@gmail.com on 19 Mar 2013 at 9:07

GoogleCodeExporter commented 8 years ago
This issue only exists with mod_wsgi 3.4 code. It is because of a faulty 
preprocessor check. The functions were only being implemented when had:

#if AP_SERVER_MAJORVERSION_NUMBER >= 2

Should have been:

#if PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION >= 6

Issue doesn't exist in mod_wsgi 4.0 code.

Original comment by Graham.Dumpleton@gmail.com on 28 Mar 2013 at 6:21

GoogleCodeExporter commented 8 years ago
Fixed in:

https://github.com/GrahamDumpleton/mod_wsgi/tree/mod_wsgi-3.X

Original comment by Graham.Dumpleton@gmail.com on 28 Mar 2013 at 6:24

GoogleCodeExporter commented 8 years ago

Original comment by Graham.Dumpleton@gmail.com on 28 Mar 2013 at 6:41

GoogleCodeExporter commented 8 years ago

Original comment by Graham.Dumpleton@gmail.com on 12 Nov 2014 at 10:21