Re: Assistance re-building adaptor for MacOSX with Apache v2.4
Re: Assistance re-building adaptor for MacOSX with Apache v2.4
- Subject: Re: Assistance re-building adaptor for MacOSX with Apache v2.4
- From: Paul Yu <email@hidden>
- Date: Fri, 28 Aug 2015 08:59:02 -0400
Is there a CentOS 6 version of this?
Paul
> On Aug 28, 2015, at 7:01 AM, Fabian Peters <email@hidden> wrote:
>
> Hi Peter,
>
> Benjamin Chew made his compiled version available – see below. <https://www.dropbox.com/s/zxdbp1wbfx4uyuc/mod_WebObjects.so?dl=0>
>
> Fabian
>
>> Anfang der weitergeleiteten Nachricht:
>>
>> Von: Benjamin Chew <email@hidden>
>> Betreff: Aw: Precompiled WOAdaptor for apache 2.4
>> Datum: 6. November 2014 18:58:28 MEZ
>> An: John Pollard <email@hidden>
>> Kopie: WebObjects-Dev Mailing List List <email@hidden>
>>
>> No problem, John. Glad someone tested my instructions out. ;)
>>
>> Yeah, setting up SSL is always a pain. I might have missed out some steps that I did for that...
>>
>> Ben
>>
>> On Thu, Nov 6, 2014 at 5:21 AM, John Pollard <email@hidden> wrote:
>> Ben,
>> Thanks for your notes which helped me to get the config up and running, so I am back using apache in dev.
>> Also good of you to make the binary available.
>> I gave up with: Include /private/etc/apache2/extra/httpd-ssl.conf
>> because it demanded a string of other modules be enabled and then a missing server.crt file, but I don’t need ssl in development for now.
>> I also use mod_rewrite which has changed a bit in config, but easy to google for those changes.
>> I deploy to apache2.2 still, so that switch will be saved for another day.
>> John
>>
>>> On 4 Nov 2014, at 20:40, Benjamin Chew <email@hidden> wrote:
>>>
>>> Sorry for the confusion, the mailing list didn't like attachments over 300k and did not distribute my email below.
>>>
>>> Here is a link to the binary:
>>> https://www.dropbox.com/s/zxdbp1wbfx4uyuc/mod_WebObjects.so?dl=0
>>>
>>> If you want to see how I got things to work, read on...
>>>
>>> ---------
>>>
>>> Okay, I figured it out. Turns out that I needed to update my Xcode command line tools.
>>>
>>> These are the steps that you need to perform:
>>>
>>> - Install Xcode (6.1)
>>>
>>> - If you already had Xcode 6.1 installed, run this to reinstall the command line tools:
>>> /usr/bin/xcode-select --install
>>>
>>> - Add link to Xcode toolchain:
>>> cd /Applications/Xcode.app/Contents/Developer/Toolchains
>>> sudo ln -s XcodeDefault.xctoolchain OSX10.10.xctoolchain
>>>
>>> - Download Wonder adaptors
>>> cd /tmp
>>> svn co https://github.com/wocommunity/wonder.git/Utilities/Adaptors
>>>
>>> - Edit makefile
>>> vi /tmp/Adaptors/Apache2.4/Makefile
>>> and remove the argument "-macosx_version_min 10.5"
>>>
>>> - Build adaptor
>>> cd /tmp/Adaptors
>>> gnumake (some bits fail, but carry on)
>>> gnumake Apache2.4
>>>
>>> This creates mod_WebObjects.so
>>> in /tmp/Adaptors/Apache2.4
>>>
>>> Other things that I had to do after I built the adaptor:
>>>
>>> - I then created the directory /System/Library/WebObjects/Adaptors/Apache2.4/ and moved the adaptor there
>>>
>>> - Copied the apache.conf file from
>>> /System/Library/WebObjects/Adaptors/Apache2.2
>>> to
>>> /System/Library/WebObjects/Adaptors/Apache2.4
>>>
>>> - Change the path in the 2nd line of apache.conf to:
>>> LoadModule WebObjects_module /System/Library/WebObjects/Adaptors/Apache2.4/mod_WebObjects.so
>>>
>>> - Make sure all the file permissions in the Apache2.4 directory were identical to the ones in the Apache2.2 directory
>>>
>>> === Steps below detail how I edited the stock Yosemite httpd.conf in /etc/apache2 ===
>>>
>>> - Add line in httpd.conf:
>>> Include /System/Library/WebObjects/Adaptors/Apache2.4/apache.conf
>>>
>>> - Uncomment line:
>>> Include /private/etc/apache2/extra/httpd-ssl.conf
>>>
>>> - Change the "Directory /" section to allow access:
>>> <Directory />
>>> AllowOverride none
>>> Require all granted <--- THIS IS A NEW APACHE 2.4 DIRECTIVE TO "ALLOW FROM ALL"
>>> </Directory>
>>>
>>> - I did find it a little weird that this was already in my httpd.conf (maybe it wasn't stock after all?), but if you don't have it, you need to add it:
>>> <IfModule alias_module>
>>> ScriptAliasMatch ^/cgi-bin/((?!(?i:webobjects)).*$) "/Library/WebServer/CGI-Executables/$1" <--- ADD THIS LINE
>>> </IfModule>
>>>
>>> Ben
>>>
>>> Ben
>>>
>>> On Mon, Nov 3, 2014 at 9:31 AM, Benjamin Chew <email@hidden> wrote:
>>> I attached the binary to my last email. Please let me know how testing goes. :)
>>>
>>> Ben
>>>
>>> On Sat, Nov 1, 2014 at 2:14 PM, Michael Kondratov <email@hidden> wrote:
>>> Could anyone post a binary? I have server we could use to test it.
>>>
>>> Michael
>>>
>>> On Nov 1, 2014, at 4:56 PM, Ken Anderson <email@hidden> wrote:
>>>
>>> Has anyone tested this successfully yet?
>>>
>>> On Oct 30, 2014, at 7:18 PM, Benjamin Chew <email@hidden> wrote:
>>>
>>> Patrick, thanks for the write-up. I rearranged John's instructions to this:
>>>
>>> Install XCode (6.1)
>>>
>>> cd /Applications/Xcode.app/Contents/Developer/Toolchains
>>> sudo ln -s XcodeDefault.xctoolchain OSX10.10.xctoolchain
>>>
>>> cd /tmp
>>> svn co https://github.com/wocommunity/wonder.git/Utilities/Adaptors
>>>
>>> vi /tmp/Adaptors/Apache2.4/Makefile
>>> and remove the arg -macosx_version_min 10.5
>>>
>>> cd /tmp/Adaptors
>>> gnumake (some bits fail, but carry on)
>>> gnumake Apache2.4
>>>
>>> ----------
>>>
>>> When I did the "gnumake", I got some errors at the end, but I expected that because Patrick said FastCGI wouldn't build. But when I did the "gnumake Apache2.4", I got this (unexpected):
>>>
>>> /usr/sbin/apxs -c -S CC=gcc -Wc,"-I/usr/include/apache2 -I../Adaptor -DSINGLE_THREADED_ADAPTOR -DMACOS -DFORKING_WEBSERVER -DAPACHE -Wall -arch x86_64 -arch i386" -Wl," -arch x86_64 -arch i386 -lm -module" mod_WebObjects.c ../Adaptor/MoreURLCUtilities.c ../Adaptor/Platform.c ../Adaptor/WOURLCUtilities.c ../Adaptor/WOURLCUtilities_3.c ../Adaptor/appcfg.c ../Adaptor/cfgparse.c ../Adaptor/config.c ../Adaptor/hostlookup.c ../Adaptor/list.c ../Adaptor/listing.c ../Adaptor/loadaverage.c ../Adaptor/loadbalancing.c ../Adaptor/log.c ../Adaptor/nbsocket.c ../Adaptor/random.c ../Adaptor/request.c ../Adaptor/response.c ../Adaptor/roundrobin.c ../Adaptor/shmem.c ../Adaptor/strdict.c ../Adaptor/strtbl.c ../Adaptor/transaction.c ../Adaptor/transport.c ../Adaptor/wastring.c ../Adaptor/womalloc.c ../Adaptor/xmlcparser.c ../Adaptor/xmlctokenizer.c ../Adaptor/xmlparse.c
>>> /usr/share/apr-1/build-1/libtool --silent --mode=compile gcc -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10 -I/usr/include/apache2 -I/usr/include/apr-1 -I/usr/include/apr-1 -O2 -I/usr/include/apache2 -I../Adaptor -DSINGLE_THREADED_ADAPTOR -DMACOS -DFORKING_WEBSERVER -DAPACHE -Wall -arch x86_64 -arch i386 -c -o mod_WebObjects.lo mod_WebObjects.c && touch mod_WebObjects.slo
>>> mod_WebObjects.c:63:10: fatal error: 'httpd.h' file not found
>>> #include <httpd.h>
>>> ^
>>> 1 error generated.
>>> apxs:Error: Command failed with rc=65536
>>> .
>>> gnumake: *** [mod_WebObjects.so] Error 1
>>>
>>> ----------
>>>
>>> Does anyone know how to resolve this?
>>>
>>> Thanks,
>>> Ben
>>>
>>> On Tue, Oct 28, 2014 at 10:51 AM, Gino Pacitti <email@hidden> wrote:
>>> +1
>>>> On 28 Oct 2014, at 17:50, John Pollard <email@hidden> wrote:
>>>>
>>>> Patrick's instructions on how to build worked for me, compressed for dummies (like me) as this:
>>>>
>>>> Install XCode (6.1)
>>>>
>>>> cd /Applications/Xcode.app/Contents/Developer/Toolchains
>>>> sudo ln -s XcodeDefault.xctoolchain OSX10.10.xctoolchain
>>>>
>>>> vi /tmp/Adaptors/Apache2.4/Makefile
>>>> and remove the arg -macosx_version_min 10.5
>>>>
>>>> cd /tmp
>>>> svn co https://github.com/wocommunity/wonder.git/Utilities/Adaptors
>>>> cd /tmp/Adaptors
>>>> gnumake (some bits fail, but carry on)
>>>> gnumake Apache2.4
>>>>
>>>> This creates:
>>>> mod_WebObjects.so
>>>> in /tmp/Adaptors/Apache2.4
>>>>
>>>> I haven't tried using it yet, out of time today. If anyone has advice on changes needed to httpd.conf for using Apache2.4 with WO, that would be of interest. I will report back once I have tried it.
>>>>
>>>> John
>>>>
>>>>> On 28 Oct 2014, at 15:35, Gino Pacitti <email@hidden> wrote:
>>>>>
>>>>> so you have a compiled WOAdaptor?
>>>>>
>>>>> I originally had difficulty with that and so just went the simpler route and down versioned Apache to 2.2
>>>>>
>>>>>
>>>>>> On 28 Oct 2014, at 15:31, Patrick Middleton <email@hidden> wrote:
>>>>>>
>>>>>> I am puzzled by this entire thread.
>>>>>>
>>>>>> The other day, at home, at my Mac running Yosemite with the newest shiniest Xcode tools installed,
>>>>>> I did something like this...
>>>>>>
>>>>>> cd /tmp/
>>>>>> svn co https://github.com/wocommunity/wonder.git/trunk/Utilities/Adaptors
>>>>>> cd /tmp/Adaptors
>>>>>> gnumake
>>>>>> gnumake Apache2.4
>>>>>>
>>>>>> and that built me the module; copying stuff by hand was not onerous.
>>>>>>
>>>>>> There were some gotchas. On OSX, the project is set up to build the WO adaptor internals (this works), the CGI adaptor (this works), the FastCGI adaptor (does not work, missing headers) and the Apache2.2 adaptor (never got there because of FastCGI; didn't care). The project will build the Apache 2.4 adaptor, provided the WO adaptor internals have been built.
>>>>>>
>>>>>> /usr/sbin/apxs will not work as-is: it tries to use a compiler toolchain that doesn't exist, referring to IIRC /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.10.xctoolchain/usr/bin/cc . apxs is your friend; it's there to let you build Apache modules with the same compiler and flags (especially optimisation flags) as was used to build Apache.
>>>>>>
>>>>>> So we do something like (from memory)
>>>>>>
>>>>>> cd /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.10.xctoolchain/
>>>>>> sudo ln -s XcodeDefault.xctoolchain OSX10.10.xctoolchain
>>>>>>
>>>>>> and if I have that right, we can now use Xcode tools via the same filenames as were used by whoever at Apple built Apache 2.4 for Yosemite. Have a read of the /usr/sbin/apxs script. Even if (like me) you don't code in perl, you should find yourself looking at /usr/share/httpd/build/config_vars.mk next, which will have the reference to /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.10.xctoolchain/usr/bin/cc , and you will also see no optimisation flags listed in CFLAGS -- personally, here I would remove -O2 from CFLAGS in all the Makefiles that build any code loaded by Apache.
>>>>>>
>>>>>> In an ideal world, those of us interested in Apache only would rework this project to avoid invoking the compiler or linker directly, we'd have apxs do it for us, noting we can still get at some settings as 'apxs -q CFLAGS', 'apxs -q CC' etc.
>>>>>>
>>>>>>
>>>>>> You will also likely need to remove any '-macosx_version_min 10.5' compiler/linker arguments because the recent OSX C compilers don't appear to support that any more.
>>>>>>
>>>>>>
>>>>>> -- Patrick
>>>>>>
>>>>>> _______________________________________________
>>>>>> Do not post admin requests to the list. They will be ignored.
>>>>>> Webobjects-dev mailing list (email@hidden)
>>>>>> Help/Unsubscribe/Update your Subscription:
>>>>>>
>>>>>> This email sent to email@hidden
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Do not post admin requests to the list. They will be ignored.
>>>>> Webobjects-dev mailing list (email@hidden)
>>>>> Help/Unsubscribe/Update your Subscription:
>>>>>
>>>>> This email sent to email@hidden
>>>>
>>>>
>>>> _______________________________________________
>>>> Do not post admin requests to the list. They will be ignored.
>>>> Webobjects-dev mailing list (email@hidden)
>>>> Help/Unsubscribe/Update your Subscription:
>>>>
>>>> This email sent to email@hidden
>>>
>>>
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list (email@hidden)
>>> Help/Unsubscribe/Update your Subscription:
>>>
>>> This email sent to email@hidden
>>>
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list (email@hidden)
>>> Help/Unsubscribe/Update your Subscription:
>>>
>>> This email sent to email@hidden
>>>
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list (email@hidden)
>>> Help/Unsubscribe/Update your Subscription:
>>>
>>> This email sent to email@hidden
>>>
>>>
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list (email@hidden)
>>> Help/Unsubscribe/Update your Subscription:
>>>
>>> This email sent to email@hidden
>>
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
>
>> Am 28.08.2015 um 12:47 schrieb Peter Thompson <email@hidden>:
>>
>> Hello,
>>
>> We are looking at rebuilding a WebObjects application onto newer hardware (MacOSX), which means newer software, which means we have some compatibility issues e.g. the one I have just come across is that the new version of the Mac OSX by default installs Apache 2.4 but alas there is not a compiled version of the WOAdaptor (mod_WebObjects.so) for that version - when trying to use the latest compiled version I can find, which is for Apache 2.2) we get an error:
>>
>> httpd: Syntax error on line 541 of /private/etc/apache2/httpd.conf: Syntax error on line 2 of /System/Library/WebObjects/Adaptors/Apache2.2/apache.conf: Cannot load /System/Library/WebObjects/Adaptors/Apache2.2/mod_WebObjects.so into server: dlopen(/System/Library/WebObjects/Adaptors/Apache2.2/mod_WebObjects.so, 10): Symbol not found: _ap_get_server_version\n Referenced from: /System/Library/WebObjects/Adaptors/Apache2.2/mod_WebObjects.so\n Expected in: flat namespace\n in /System/Library/WebObjects/Adaptors/Apache2.2/mod_WebObjects.so
>>
>> Is anyone aware of the availability of any compiled version of the adaptor for MacOSX for Apache 2.4?
>>
>> I have read some discussion / resources around how one might compile a new adaptor (via Project Wonder) but this is a bit beyond me technically.
>>
>> Appreciate any help that we can get.
>>
>> Thanks,
>> Peter
>>
>> Peter Thompson | TXT2GET | Wellington, New Zealand | email@hidden | www.txt2get.co.nz
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden