Apache Mod-Python - Re: FreeBSD compile problem (was Getting ready for 3.2 beta 2)

This is Interesting: Free IT Magazines  
Home > Archive > Apache Mod-Python > September 2005 > Re: FreeBSD compile problem (was Getting ready for 3.2 beta 2)





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: FreeBSD compile problem (was Getting ready for 3.2 beta 2)
Jim Gallacher

2005-09-12, 5:52 pm

Nicolas Lehuen wrote:
> OK, so on a non-threaded Apache, we can suppose we will be using the
> prefork MPM, so we don't need any code to support threading in
> mod_python, then, right ?


Makes sense to me.

> In this case instead of testing for WITH_THREAD in mod_python.c :
>
> #ifdef WITH_THREAD
>
> maybe we could test for WITH_THREAD and APR_HAS_THREADS :
>
> #if APR_HAS_THREADS && defined(WITH_THREAD)
>
> Right ? This would remove all threading-related code from mod_python
> when only prefork is available or when Python isn't compiled to support
> threads (I which case I wonder how it works in a threaded Apache...).


Seems reasonable. It compiles and passes the unit tests on debian.

> I have given up using QEMU for now, minotaur is sufficient to make sure
> mod_python builds on FreeBSD. Granted, it won't allow me to give any +1
> since I cannot run the unit tests (or can I ?)...


I got FreeBSD running under QEMU, and the results are the same as on
minotaur. With the "#if APR_HAS_THREADS && defined(WITH_THREAD)" code
change, mod_python compiles but the final link step generates a warning
on both minotaur and qemu:

/usr/local/share/apache2/build/libtool --silent --mode=link cc -o
mod_python.la -rpath /usr/local/libexec/apache2 -module -avoid-version
hlistobject.lo hlist.lo filterobject.lo connobject.lo
serverobject.lo util.lo tableobject.lo requestobject.lo _apachemodule.lo
mod_python.lo -Wl,--export-dynamic -pthread -lm
/usr/local/lib/python2.4/config/libpython2.4.a -lutil -lm

*** Warning: Linking the shared library mod_python.la against the
*** static library /usr/local/lib/python2.4/config/libpython2.4.a is not
portable!

Likewise, the unit tests on both QEMU and minotaur fail.

On minotaur:
Syntax error on line 44 of
/home/jgallacher/tmp/mod_python/test/conf/test.conf:
Cannot load /home/jgallacher/tmp/mod_python/src/mod_python.so into
server: /home/jgallacher/tmp/mod_python/src/mod_python.so: Undefined
symbol "btowc"

On qemu:
Syntax error on line 44 of /usr/home/jim/tmp/mod_python/test/conf/test.conf:
Cannot load /usr/home/jim/tmp/mod_python/src/mod_python.so into server:
/usr/home/jim/tmp/mod_python/src/mod_python.so: Undefined symbol
"pthread_attr_init"

It is quite possible I don't have things configured correctly on the
QEMU version and hence the different undefined symbol but it doesn't
really matter since it fails either way. I don't have time to
investigate further right now. I'll revisit this tonight.

Regards,
Jim

> Regards,
> Nicolas
> #if APR_HAS_THREADS && defined(WITH_THREAD)
> 2005/9/11, Jim Gallacher <jg.lists@sympatico.ca
> <mailto:jg.lists@sympatico.ca>>:
>
> FYI, I found the following note in the INSTALL file in the apache
> source:
>
> * If you are building on FreeBSD, be aware that threads will
> be disabled and the prefork MPM will be used by default,
> as threads do not work well with Apache on FreeBSD. If
> you wish to try a threaded Apache on FreeBSD anyway, use
> "./configure --enable-threads".
>
> I'm also setting up FreeBSD under QEMU... so far so good, but installing
> anything using ports is really slow. QEMU's performance here is just
> killing me. I guess I should have read the manual first and used the
> binary packages for the software I wanted to install. :-(
>
> Regards,
> Jim
>
> Jim Gallacher wrote:
> Win32 and
> defined.
> that
> are in
> <mailto:nicolas.lehuen@gmail.com>
> <mailto:nicolas.lehuen@gmail.com>>>:
> (I used
> patch by
> APR
> available,
> instead ?
> platforms ?
> all
> FreeBSD
> computer, but
> on this
> <mailto:jg.lists@sympatico.ca>
> 3.2.1b and
> storage class
> undeclared (first
> apr_thread_mutex_create(& interpreters_lock,APR_THREAD_MUTEX_UNNES
TED,p);
> srclib/apr/locks/unix/thread_mutex.c,
> going on
>
>



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com