Re: FreeBSD compile problem (was Getting ready for 3.2 beta 2)
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > Apache Mod-Python > Re: FreeBSD compile problem (was Getting ready for 3.2 beta 2)




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

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


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-12-05 10: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 installi
ng
>     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 
>
>







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 02:34 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register