httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Bannert <aa...@clove.org>
Subject Re: app (Apache) references errno, threads in app use __errno2()
Date Thu, 24 Jan 2002 17:39:15 GMT
On Thu, Jan 24, 2002 at 08:09:04AM -0800, Justin Erenkrantz wrote:
[snip]
> Two major gotchas here:
> 
> - Apache 1.3 is built with Forte.  Module is built with gcc.
>   This almost never works.  I'm shocked it even ran.  mod_webapp
>   runs into all sorts of problems when this mismatch occurrs.
>   The compilers have different ideas about lots of things, so 
>   there could be a mismatch in how errno is handled.

With C this isn't a problem as long as you use the same linker (think
of system libraries). The problems we've seen on this mismatch were
really a bug in the interaction between gcc and solaris' ld. In short,
gcc would compile against symbols in libgcc, but would not provide the
linker with the implicit path to that library. Whenver you see problems
with __floatdisf and the like, this is probably what's going on. Please
enlighten me if I'm incorrect here.

> - Building httpd without _THREAD_SAFE with a module compiled for
>   _THREAD_SAFE is the root of your problem.  This goes to the 
>   discussion Aaron and I had a few days ago about always compiling
>   with _REENTRANT/thread-safety flags in httpd-2.0.  I know that
>   Solaris goes wonky when this mismatch occurs - it's entirely
>   unpredictable - which seems to be what's happening here.
> 
> Sorry, but I think Apache 1.3 just needs to be recompiled with
> _THREAD_SAFE and with the same compiler as the module.  Anything
> else is just asking for trouble like this.  

Yes, this is how I understand it.

> However, if this error occurs with a _THREAD_SAFE/same-compiler 
> build, then it's something we should look into.  I just wouldn't
> put any money on that happening.  -- justin

Totally agree.

-aaron

Mime
View raw message