httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Musolino <>
Subject Compiling Apache 1.3.24 with enable-rule=SHARED_CORE on Mac OS X 10.1.4
Date Mon, 03 Jun 2002 15:31:26 GMT
I have run into a problem getting the enable-rule=SHARED_CORE option to 
compile under
Mac OSX v10.1.4.  I am using gcc 2.95.2 to compile apache 1.3.24.  

The problem is during the compile when making the libhttpd.ep program, 
it uses the -lhttpd flag, which will look for which is 
compiled right before libhttpd.ep.  Here is the exact error:

gcc -c  -I./os/unix -I./include   -DDARWIN -DUSE_HSREGEX  -DSHARED_CORE 
`./apaci` modules.c
gcc -c  -I./os/unix -I./include   -DDARWIN -DUSE_HSREGEX  -DSHARED_CORE 
`./apaci` buildmark.c
cc  -bundle -undefined suppress -flat_namespace -o 
buildmark.o modules.o modules/standard/libstandard.a main/libmain.a 
./os/unix/libos.a ap/libap.a regex/libregex.a  

gcc  -I./os/unix -I./include   -DDARWIN -DUSE_HSREGEX  -DSHARED_CORE 
`./apaci`    \
      -o libhttpd.ep -DSHARED_CORE_TIESTATIC main/http_main.c \
          -L. -lhttpd -lldap -llber -lssl -L/sw/lib 
-L/Users/pmusolin/httpdstuff/apache_1.3.24/src/ -lexpat -ldl
/usr/bin/ld: can't locate file for: -lhttpd
make: *** [libhttpd.ep] Error 1

I did some research, and what I came up with is that Darwin, when 
looking for dynamic libraries with the -l flag, does not look for 
anything but libraries ending in .a or .dylib.  It will not allow  
mach-o bundles to be used.  The first thing I tried was changing the 
to dylib in the src/Makefile.  This is the error I received:

gcc  -I./os/unix -I./include   -DDARWIN -DUSE_HSREGEX  -DSHARED_CORE 
`./apaci`    \
      -o libhttpd.ep -DSHARED_CORE_TIESTATIC main/http_main.c \
          -L. -lhttpd -lldap -llber -lssl -L/sw/lib 
-L/Users/pmusolin/httpdstuff/apache_1.3.24/src/ -lexpat -ldl
/usr/bin/ld: ./libhttpd.dylib is input for the dynamic link editor, is 
not relocatable by the static link editor again
make: *** [libhttpd.ep] Error 1

I tried the same thing with .a as a suffix, and got the same error.
Next I tried changing the line in the src/Makefile defining how to 
compile the, where I changed LDFLAGS_SHLIB=$(EXTRA_LDFLAGS) 
-bundle to be -dylib
This gave me the original error of not being able to locate -lhttpd
I changed the SHLIB_SUFFIX_NAME option to dylib once again and got the 
same error I received when doing so before.

I did more searching and found that there is an API to include bundles 
using either dlopen() and NSLinkModule() but I am not exactly sure where 
these would come into play in the source.

Just as some background, I am trying to get auth_ldap to work on this 
platform, and I have bee
n unsuccessful.  I used a slight variation under solaris 8 x86 of the 
configure line below and had no trouble when it came to getting that 
module to work, but under OS X, i have symbol table resolution problems. 
 But that is something I have already asked on the auth_ldap mailing 
list. The problem I am having is apache related.

 LIBS="-lldap -llber -lssl -L/sw/lib 
-L/Users/pmusolin/httpdstuff/apache_1.3.24/src" ./configure 
--enable-module=most --enable-shared=max --with-layout=Apache 

I have also set my DYLD_LIBRARY_PATH to include all the proper paths to 
any library I should theoretically need.
I have the fink package installed which includes a few libs as well, 
though I don't believe it is causing any problems.

Can anyone successfully compiled apache 1.3.24 on OS 10 with the 
SHARED_CORE rule?  If so what am I doing wrong?  Otherwise any 
information to send me in the right direction would be much appreciated.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message