You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apreq-dev@httpd.apache.org by "Ward W. Vuillemot" <ww...@mac.com> on 2002/04/26 18:12:35 UTC

ERR: Mac OS X, apreq, apache

I followed the directions (albeit changes to use tsch vs zsh) found at 
<http://david.wheeler.net/osx.html>.
I used the source code found at <http://www.apache.org/~joes/>

Here is the error thrown when I issue '% apachectl configtest'

dyld: /usr/sbin/httpd Undefined symbols:
_ApacheCookie_as_string
_ApacheCookie_attr
_ApacheCookie_bake
_ApacheCookie_expires
_ApacheCookie_new
_ApacheCookie_parse

I am more than willing to send whatever files, gather whatever info you 
might require if you are interested in assisting.

Many, many thanks!
Ward


Re: ERR: Mac OS X, apreq, apache

Posted by Joe Schaefer <jo...@sunstarsys.com>.
"Ward W. Vuillemot" <ww...@mac.com> writes:

> I followed the directions (albeit changes to use tsch vs zsh) found at 
> <http://david.wheeler.net/osx.html>.

Looks good to me.

> I used the source code found at <http://www.apache.org/~joes/>
> 
> Here is the error thrown when I issue '% apachectl configtest'
> 
> dyld: /usr/sbin/httpd Undefined symbols:
> _ApacheCookie_as_string
> _ApacheCookie_attr
> _ApacheCookie_bake
> _ApacheCookie_expires
> _ApacheCookie_new
> _ApacheCookie_parse
> 
> I am more than willing to send whatever files, gather whatever info you 
> might require if you are interested in assisting.

Be sure you haven't forgot about --without-execstrip in your apache
./configure options.

% tail apache_1.3.23/src/main/http_main.c
#if defined(USE_APREQ) && !defined(SHARED_CORE_BOOTSTRAP)
#include "apache_request.h"
#include "apache_cookie.h"
ApacheRequest *suck_in_apreq(request_rec *r);
ApacheRequest *suck_in_apreq(request_rec *r)
{
    return ApacheCookie_new(r), ApacheRequest_new(r);
}
#endif /* USE_APREQ */


That's the portion of the apache tarball responsible for pulling 
the ApacheCookie and ApacheRequest symbols into httpd.  Your compiler 
might (erroneously) be optimizing away the ApacheCookie_new() call.
Try changing that to something like this instead:

--------------------------------------------------
#if defined(USE_APREQ) && !defined(SHARED_CORE_BOOTSTRAP)
#include "apache_request.h"
#include "apache_cookie.h"
ApacheRequest *suck_in_aprequest(request_rec *r);
ApacheCookie  *suck_in_apcookie(request_rec *r);

ApacheRequest *suck_in_aprequest(request_rec *r)
{
    return ApacheRequest_new(r);
}
ApacheCookie *suck_in_apcookie(request_rec *r)
{
    return ApacheCookie_new(r);
}
#endif /* USE_APREQ */
--------------------------------------------------


After compiling httpd, you can examine the symbols in the
httpd binary using "nm". Here's what I get on linux:

% nm apache_1.3.23/src/httpd | grep Apache[RC]
080b09c8 T ApacheCookie_as_string
080b03e8 T ApacheCookie_attr
080b0c30 T ApacheCookie_bake
080b03ac T ApacheCookie_expires
080b05ec T ApacheCookie_new
080b06bc T ApacheCookie_parse
080af18c T ApacheRequest___parse
080afd30 T ApacheRequest_expires
080aef2c T ApacheRequest_new
080aecd8 T ApacheRequest_param
080aed54 T ApacheRequest_params
080aedd0 T ApacheRequest_params_as_string
080af560 T ApacheRequest_parse_multipart
080af2b0 T ApacheRequest_parse_urlencoded
080aec24 T ApacheRequest_script_name
080aeca8 T ApacheRequest_script_path
080af410 T ApacheRequest_tmpfile

If you don't get something similar, post 

  1) the configure options you used for apache
  2) the output of make
  3) the output of the two commands above (check the
     manpage for "nm" on OS-X, you may need some extra flags).

-- 
Joe Schaefer
joe@sunstarsys.com