OS X and Apache 2.0.x

cpk0

Registered
Ok, after a few weeks of trying to get the apache-php-mysql thing going, but failing gave up. Now i see that apache 2.0 is out in final, and im like ah this is my solution. So i DL it, and try to configure it, but i get a "could not guess host type" error "please specify" it says. Darwin...no, macosx...no, unix...no. Anyone know what host type i should specify to get this going? And also if you could give me a really quick list of what order to install the 3 things in, id really be happy.

-Chris
 
First you must do:

./configure ppc

Then there is usually "make." Only one problem. After one hour of "making," the terminal spits out:
Code:
/usr/bin/ld: Undefined symbols:
_pthread_sigmask
make[2]: *** [htpasswd] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1
I have NO idea what that means or how to fix it...none whatsoever. Anybody got any ideas?
Code:
undefined
 
Here is an extended version of the error:
Code:
Making all in support
/bin/sh /Users/myusername/Desktop/httpd-2.0.35/srclib/apr/libtool --silent --mode=link cc  -g -O2
-DAP_HAVE_DESIGNATED_INITIALIZER   -I. -I/Users/myusername/Desktop/httpd-2.0.35/os/unix
-I/Users/myusername/Desktop/httpd-2.0.35/server/mpm/prefork -I/Users/myusername/Desktop/httpd-2.0.35/modules/http
-I/Users/myusername/Desktop/httpd-2.0.35/modules/proxy -I/Users/myusername/Desktop/httpd-2.0.35/include
-I/Users/myusername/Desktop/httpd-2.0.35/srclib/apr/include -I/Users/myusername/Desktop/httpd-2.0.35/srclib/apr-util/include
-I/Users/myusername/Desktop/httpd-2.0.35/modules/dav/main -I/Users/myusername/Desktop/httpd-2.0.35/srclib/apr-util/include
-I/Users/myusername/Desktop/httpd-2.0.35/srclib/apr-util/xml/expat/lib -export-dynamic    -o htpasswd  htpasswd.lo  
/Users/myusername/Desktop/httpd-2.0.35/srclib/apr-util/libaprutil.la /Users/myusername/Desktop/httpd-2.0.35/srclib/apr/libapr.la -lm
/Users/myusername/Desktop/httpd-2.0.35/srclib/apr-util/xml/expat/lib/libexpat.la
/usr/bin/ld: Undefined symbols:
_pthread_sigmask
make[2]: *** [htpasswd] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1
[h70:~/Desktop/httpd-2.0.35] myusername%
 
pthread_sigmask is not yet implemented in Darwin (bug report and another). Is there a way to build with processes instead of threads (the old way)?
Maybe this'll get Darwin's pthread implementation improved...
 
Now, from what ive read, it says 2.0 can run on platforms that use both threads and processes. Not really sure what that means, but it seems like it would negate this error. Any ideas?
 
Can you make it NOT use threads? Something like "make --someoptionthatusesprocessesinsteadofthreads"?
 
is there anyway to install that pthread_sig thing? or is that actually part of the OS and whatnot
 
remove your uncompressed source directory so we know you're starting from scratch... then uncompress a freshy. cd in to the new dir and type:

cp /usr/libexec/config.* .

this copies a couple of files in to your dir letting apache know what type of system you're on and provides other necessary system vars.

do your configure and make.

lemme know.
 
Well, the ./configure still needs "ppc" after it. Not sure about the make, I'll let you know in about an hour. :D
 
Wow. That make went a lot faster. Faster, but with the same problems. It spat out the same thing at me. Damn.
 
Now that I've seen all the new Apache2 configure options, does it work if you give --with-mpm=prefork? That should tell it to use process-level children instead of thread-level.
 
<insert crying here>

Same set of errors during make. I assume since "make" doesn't like that option, it was for configure.
 
It seems the error (as well as the one requiring ppc) are coming from APR (under srclib/apr). It has a seperate configure (which the main one calls); not sure how to deal with this yet.
 
Well, I was wrong about the ppc part, that error comes from expat (the XML parser). This can be fixed by running (assuming you are in httpd-2.0.35)
Code:
cp -f /usr/share/libtool/config.* srclib/apr-util/xml/expat/conftools/
That should take care of needing to specify ppc.

As for the pthread_sigmask problem, this can be fixed by redoing configure for APR (again, while in httpd-2.0.35):
Code:
cd srclib/apr
patch -p0 < apr_patch_osx.txt
autoconf
cd ../..
That patch file is attached, so use the path to where you downloaded it.
Now you should be able to use configure (still using --with-mpm=prefork).
This builds, but fails on install with problems in trying to install modules (.so) files...
 

Attachments

  • apr_patch_osx.txt
    294 bytes · Views: 23
Back
Top