delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/06/16/00:23:01

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <42B0FF08.638BBAD0@dessent.net>
Date: Wed, 15 Jun 2005 21:24:40 -0700
From: Brian Dessent <brian AT dessent DOT net>
MIME-Version: 1.0
To: Jorge Handl <jhandl AT fibertel DOT com DOT ar>
CC: cygwin AT cygwin DOT com
Subject: Re: Apache DSO modules under Cygwin
References: <42AE5A3D DOT 9020907 AT fibertel DOT com DOT ar>
X-Spam-Report: -5.8/5.0 ---- Start SpamAssassin results * -3.3 ALL_TRUSTED Did not pass through any untrusted hosts * -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] * 0.1 AWL AWL: From: address is in the auto white-list ---- End SpamAssassin results
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com
Note-from-DJ: This may be spam

Jorge Handl wrote:

> I'm sorry to bother you with this, but I'm in dire need of a helping
> hand and don't know who else to ask...
> I'm new to linux, cygwin and apache (yes, a newbie!)
> 
> I want to make a module for apache and can't build the .so file. I'm
> actually following the steps described in
> http://threebit.net/tutorials/apache2_modules/tut1/tutorial1.html. I'm
> getting the "undefined reference to `_ap_hook_handler'" message when
> make-ing the module. I believe I should add a -l directive for the
> linker, pointing to some httpd library, but I can't figure out which
> library and where to insert that directive.
> 
> Could you please point me in the right direction? I've tried to
> understand the thread in
> http://sourceware.org/ml/cygwin/2004-09/msg01200.html but it's way over
> my head...

In the future please send questions to the Cygwin mailing list, that way
they will be archived and others can comment as well.

First of all, you didn't state what version of Apache or what module
you're trying to compile.  Apache 2.x and 1.x are significantly
different.  I've no experience building DSOs with 2.x, and I suspect
that it will not compile under Cygwin without some patching and porting.

The thread you refer to was in reference to building mod_php for apache
1.x, and if that's not what you're trying to do then ignore it
completely.

I don't know off the top of my head where the symbol ap_hook_handler
lives but I suspect it's in the main -lhttp module.  Unfortunately the
1.3 Apache package in Cygwin does not include the import library for
this module, so you have to change your link command line to link
explicitly /usr/bin/libhttp.dll, which is also named wrong.  If the
packaging were correct, this file would be /usr/bin/cyghttpd.dll and
there would be a /usr/lib/libhttp.dll.a which would cause "-lhttp" to
work properly.  (Insert grumble about Apache package problems here.)

However, the build system should add this -lhttp for you to the link
command line, which normally results in an error about not being able to
find the library, which apparently you are not getting, so I suspect
it's something else.  A common problem of porting to Cygwin is the fact
that there can be no "lazy" symbol resolution, everything must be
accounted for at link time.  Because of this you often have to do
something like LDFLAGS="-Wl,-no-undefined" when configuring, or patching
the makefile.{am,in} to accomplish the same thing.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019