Adrift with Apache

View: New views
8 Messages — Rating Filter:   Alert me  

Adrift with Apache

by Steve Comstock :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

We pick up the story of our intrepid adventurer
trying to port Apache 2.2.9 to z/OS 1.9. ...



When we last left him, we was planning to run buildconf
as a preparatory step to the Apache configure. You may
recall this scene from the end of the last episode...



OK. Seems to have gone OK. Guess I'm ready to run buildconf

Yikes!! :

ADMINS:/Z19/usr/lpp/zApache/httpd-2.2.9: >./buildconf
found apr source: srclib/apr
found apr-util source: srclib/apr-util
rebuilding srclib/apr/configure
buildconf: checking installation...
buildconf: python not found.
            You need python installed
            to build APR from SVN.
./buildconf failed for apr


python? I need to install python? How come the docs don't
mention this?


... now we resume the tale...

OK. Guess I'll go get python (I was hoping someone would
jump in with a workaround; or at least an explanation as
to why python was not mentioned in the instructions).

Google is your friend: python z/OS

   http://www.teaser.fr/~jymengant/mvspython/mvsPythonPort.html

seems to contain the latest port of python, at level 2.4.1
which is only slightly down level from the general latest
version of python at 2.5

OK. Got it intstalled with a little help from Jean-Yves.



Try again:

ADMINS:/Z19/usr/lpp/zApache/httpd-2.2.9: >./buildconf
found apr source: srclib/apr
found apr-util source: srclib/apr-util
rebuilding srclib/apr/configure
buildconf: checking installation...
buildconf: python version entering (ok)
buildconf: autoconf not found.
            You need autoconf version 2.50 or newer installed
            to build APR from SVN.
./buildconf failed for apr


But... autoconf 2.54 _is_ installed; it comes with tools N toys
(ported tools) already mentioned, and it is in the PATH.

So, found /usr/local/bin contains autotconf that is late enough,
so added that to the PATH. Then...

ADMINS:/Z19/usr/lpp/zApache/httpd-2.2.9: >./buildconf
found apr source: srclib/apr
found apr-util source: srclib/apr-util
rebuilding srclib/apr/configure
buildconf: checking installation...
buildconf: python version entering (ok)
buildconf: autoconf version 2.54 (ok)
buildconf: libtool version 1.3.4 found.
            You need libtool version 1.4 or newer installed
            to build APR from SVN.
./buildconf failed for apr

but this is the libtool that was ported from the Apache for
z/OS page because it was non-GNU.

Looks like I need to have a newer non-GNU libtool, one
that has been 'tweaked' for z/OS. Anyone have any pointers
or suggestions?


Kind regards,

-Steve Comstock
The Trainer's Friend, Inc.

303-393-8716
http://www.trainersfriend.com

   z/OS Application development made easier
     * Our classes include
        + How things work
        + Programming examples with realistic applications
        + Starter / skeleton code
        + Complete working programs
        + Useful utilities and subroutines
        + Tips and techniques

==> Check out the Trainer's Friend Store to purchase z/OS  <==
==> application developer toolkits. Sample code in four    <==
==> programming languages, JCL to Assemble or compile,     <==
==> bind and test.                                         <==
==>   http://www.trainersfriend.com/TTFStore/index.html    <==



Re: Adrift with Apache

by Jeff Trawick :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Jul 3, 2008 at 1:41 PM, Steve Comstock <steve@...> wrote:
We pick up the story of our intrepid adventurer
trying to port Apache 2.2.9 to z/OS 1.9. ...

Let Greg know that you've switched mailing lists, and keep me off the cc ;)  He likely made more progress that he didn't share with you yet, and he's away for a few days anyway.  Some of us have been building/using Apache 2.2.x on different levels of z/OS for some time and he was trying to pick out the necessary build tweaks needed by the general community vs. tweaks that were somehow helpful on one particular machine or another.


Re: Adrift with Apache

by Greg Ames-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Jul 3, 2008 at 1:41 PM, Steve Comstock <steve@...> wrote:

ahem...remember that I said 2.2 was a little more complicated than 2.0 on z/OS?

> python? I need to install python?

yes and no.  In httpd-2.2, python is used to create make dependency
files srclib/apr[-util]/buildoutputs.mk .  But since you already have
those files in in your httpd tarball, you can patch the code to bypass
calling gen-build.py and the check for python.

> buildconf: autoconf not found.
>           You need autoconf version 2.50 or newer installed
>           to build APR from SVN.
> ./buildconf failed for apr
>
>
> But... autoconf 2.54 _is_ installed; it comes with tools N toys
> (ported tools) already mentioned, and it is in the PATH.

hmm, that check is in srclib/apr/build/buildcheck.sh if you want to
take a look/experiment.  it is massaging the output of "autoconf
--version".  it works for me but I picked up a newer autoconf
somewhere, maybe from GNU.  I am still bypassing an autoconf version
check in pcre, however.

You might want to take a look at
http://people.apache.org/~gregames/2.2-zOS-build/  The patch file
contains several build workarounds, plus an uncommitted runtime patch
to apr-util to accommodate the z/OS name for ISO8859-1.  It contains
libtool with updates for httpd 2.2 on z/OS.  The env vars file and
configure script are just examples that should be enough to get you
going.  My make install fails to copy libapr[util]-1.so to my
<prefix>/lib/ directory; haven't investigated.  I also tweaked my
httpd.conf to:

* comment out the bogus User and Group.  My ID can use port 80 etc, so
no need to run httpd as root
* comment out LoadModules for mod_auth_digest (silence complaints) and
mod_dbd (don't think I need it)
* add mod_charset_lite directives to translate EBCDIC content:

<Location />
CharsetSourceEnc IBM-1047
CharsetDefault   ISO8859-1
</Location>

Greg

Re: Adrift with Apache

by Steve Comstock :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Greg Ames wrote:

> On Thu, Jul 3, 2008 at 1:41 PM, Steve Comstock <steve@...> wrote:
>
> ahem...remember that I said 2.2 was a little more complicated than 2.0 on z/OS?
>
>> python? I need to install python?
>
> yes and no.  In httpd-2.2, python is used to create make dependency
> files srclib/apr[-util]/buildoutputs.mk .  But since you already have
> those files in in your httpd tarball, you can patch the code to bypass
> calling gen-build.py and the check for python.
>
>> buildconf: autoconf not found.
>>           You need autoconf version 2.50 or newer installed
>>           to build APR from SVN.
>> ./buildconf failed for apr
>>
>>
>> But... autoconf 2.54 _is_ installed; it comes with tools N toys
>> (ported tools) already mentioned, and it is in the PATH.
>
> hmm, that check is in srclib/apr/build/buildcheck.sh if you want to
> take a look/experiment.  it is massaging the output of "autoconf
> --version".  it works for me but I picked up a newer autoconf
> somewhere, maybe from GNU.  I am still bypassing an autoconf version
> check in pcre, however.
>
> You might want to take a look at
> http://people.apache.org/~gregames/2.2-zOS-build/  The patch file
> contains several build workarounds, plus an uncommitted runtime patch
> to apr-util to accommodate the z/OS name for ISO8859-1.  It contains
> libtool with updates for httpd 2.2 on z/OS.  The env vars file and
> configure script are just examples that should be enough to get you
> going.  My make install fails to copy libapr[util]-1.so to my
> <prefix>/lib/ directory; haven't investigated.  I also tweaked my
> httpd.conf to:
>
> * comment out the bogus User and Group.  My ID can use port 80 etc, so
> no need to run httpd as root
> * comment out LoadModules for mod_auth_digest (silence complaints) and
> mod_dbd (don't think I need it)
> * add mod_charset_lite directives to translate EBCDIC content:
>
> <Location />
> CharsetSourceEnc IBM-1047
> CharsetDefault   ISO8859-1
> </Location>
>
> Greg

Greg,

Thanks for the ideas. I need to shutdown for the day now, but
I'll have a go at these tomorrow. I'll keep ya' posted.



Kind regards,

-Steve Comstock
The Trainer's Friend, Inc.

303-393-8716
http://www.trainersfriend.com

   z/OS Application development made easier
     * Our classes include
        + How things work
        + Programming examples with realistic applications
        + Starter / skeleton code
        + Complete working programs
        + Useful utilities and subroutines
        + Tips and techniques

==> Check out the Trainer's Friend Store to purchase z/OS  <==
==> application developer toolkits. Sample code in four    <==
==> programming languages, JCL to Assemble or compile,     <==
==> bind and test.                                         <==
==>   http://www.trainersfriend.com/TTFStore/index.html    <==

Re: Adrift with Apache

by Steve Comstock :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Greg Ames wrote:

> On Thu, Jul 3, 2008 at 1:41 PM, Steve Comstock <steve@...> wrote:
>
> ahem...remember that I said 2.2 was a little more complicated than 2.0 on z/OS?
>
>> python? I need to install python?
>
> yes and no.  In httpd-2.2, python is used to create make dependency
> files srclib/apr[-util]/buildoutputs.mk .  But since you already have
> those files in in your httpd tarball, you can patch the code to bypass
> calling gen-build.py and the check for python.

Hmmm. Seems to me the configure script ought to do the check
for an existing file, maybe with an invocation option that
would overwrite existing files otherwise skip the overhead
of the python work.

But, that's just me. We have what we have.



>
>> buildconf: autoconf not found.
>>           You need autoconf version 2.50 or newer installed
>>           to build APR from SVN.
>> ./buildconf failed for apr
>>
>>
>> But... autoconf 2.54 _is_ installed; it comes with tools N toys
>> (ported tools) already mentioned, and it is in the PATH.
>
> hmm, that check is in srclib/apr/build/buildcheck.sh if you want to
> take a look/experiment.  it is massaging the output of "autoconf
> --version".  it works for me but I picked up a newer autoconf
> somewhere, maybe from GNU.  

I picked up autoconf-2.62 from a GNU mirror, but I was reluctant
to use it; since 2.54 is in toolsNtoys, which is in my PATH, I
thought that a simpler approach.

In all this work I find I'm ending up with many versions of
pieces of software I never even knew existed and I'm never
clear which version to use, and how to set my PATH to get
the correct version of each piece.


What I want to do is to find the minimal combination of
tools needed to do a simple install of Apache 2.2.9 to z/OS
1.9.


On your webpage, "Apache 2.0 on z/OS" you say you need:

* C compiler; no problem

* non-GNU libtool, and you provide a link; but I gather
    I'm better off to install libtool-zOS-httpd-2.2.tar.Z
    from the link in this email, right?

* GNU autocnf and m4; here you provide links, and also
    these are in the ported tools N toys; which to use?

* shell script to unpack tarball: xtar; I don't see
    that a really need it; just use pax, I think.

* apache sour tarball httpd-2.0.xx.tar.Z - well that
    is not on the apache site; all the tarballs end
    in .gz or .bz2; since gzip is in the ported tools
    and toys, I chose the .gz version


I am still bypassing an autoconf version
> check in pcre, however.

I don't get the meaning of that last sentence. What's the
implication for the work I'm doing? Do I need to replicate
that?

>
> You might want to take a look at
> http://people.apache.org/~gregames/2.2-zOS-build/  The patch file
> contains several build workarounds, plus an uncommitted runtime patch
> to apr-util to accommodate the z/OS name for ISO8859-1.  It contains
> libtool with updates for httpd 2.2 on z/OS.  

OK, I've uploaded the four files

   build.patch
   libtool-zOS-httpd-2.2.tar.Z
   my_config
   my_envs

I've unwound the tar ball using pax (my surprise: I had
to do it twice, since the first time I didn't include
-oto=ibm-1047; I figured this was for an EBCDIC system
so the stored text would be EBCDCIC. Might want a note
to that effect).


The env vars file and

> configure script are just examples that should be enough to get you
> going.  My make install fails to copy libapr[util]-1.so to my
> <prefix>/lib/ directory; haven't investigated.  I also tweaked my
> httpd.conf to:
>
> * comment out the bogus User and Group.  My ID can use port 80 etc, so
> no need to run httpd as root
> * comment out LoadModules for mod_auth_digest (silence complaints) and
> mod_dbd (don't think I need it)
> * add mod_charset_lite directives to translate EBCDIC content:
>
> <Location />
> CharsetSourceEnc IBM-1047
> CharsetDefault   ISO8859-1
> </Location>

Well, I'll work on those after I get the basic install / port
done. But now, where do I go?

Here are the pieces I have available:

in /usr/lpp/zApache:

bin/
   libtool           - these are from the previous libtool;
   libtool_printpath - I haven't done a make on your new libtool
   libtoolexe        - yet; I suppose I should start there
   libtoolize
   ltconfig
   shlibtool

httpd-2.2.9/ 30 files plus these subdirectories:
   build/
      pkg/
      rpm/
      win32/
   docs/
      cgi-examples/
      conf/
      extra/
      docroot/
      error/
        include/
      icons/
        small/
      man/
      manual/
        developer/
        faq/
        howto/
        images/
        misc/
        mod/
        platform/
        programs/
        rewrite/
        ssl/
        style/
          css/
          lang/
          latex/
          xsl/
            util/
        vhosts/
   include/
   modules/
     aaa/
     arch/
       netware/
       win32/
     cache/
     database/
     dav/
       fs/
       lock/
       main/
     debug/
     echo/
     experimental/
     filters/
     generators/
     http/
     ldap/
     loggers/
     mappers/
     metadata/
     proxy/
     ssl/
     test
   os/
     beos/
     bs2000/
     netware/
     os2/
     tpf/
       samples/
     unix/
     win32/
   server/
     mpm/
       beos/
       experimental/
          event/
       mpmt_os2/
       netware/
       prefork/
       winnt/
       worker/
   srclib/
     apr/
       atomic/
         netware/
         os390/
         unix/
         win32/
       build/
         pkg/
         rpm/
       docs/
         dso/
           aix/
           beos/
           netware/
           os2/
           os390/
           unix/
           win32/
       file_io/
         netware/
         os2/
         unix/
         win32/
       include/
         arch/
           aix/
           beos/
           netware/
           os2/
           os390/
           unix/
           win32/
       locks/
         beos/
         netware/
         os2/
         unix/
         win32/
       memory/
         unix/
       misc/
         netware/
         unix/
         win32/
       mmap/
         unix/
         win32/
       network_io/
         beos/
         os2/
         unix/
         win32/
       passwd/
       poll/
         os2/
         unix/
       random/
         unix/
       shmem/
         beos/
         os2/
         unix/
         win32/
       strings/
       support/
         unix/
       tables/
       test/
         data/
         internal/
       threadproc/
         beos/
         netware/
         os2/
         unix/
         win32/
       time/
         unix/
         win32/
       user/
         netware/
         unix/
         win32/
     apr-util/
       buckets/
       build/
         pkg/
         rpm/
       crypto/
       dbd/
       dbm/
         sdbm/
       docs/
       encoding/
       hooks/
       include/
         private/
       ldap/
       memcache/
       misc/
       strmatch/
       test/
         data/
       uri/
       xlate/
       xml/
         expat/
           conftools/
           lib/
     pcre/
       doc/
       testdata/
   support/
     SHA1/
     win32/
   test/


libtool/

share/
   alocal/
   libtool

libtool-zOS-httpd-2.2.tar.Z
libtool.tar.Z


in /usr/lpp/toolsNtoys:

... well, more of the same; I uploaded the binary file
     and untarred it. I know some of the code works (e.g.,
     gzip works), but I have this feeling many of the
     pieces will fail because the PDF doc assumes you are
     installing the utilities piece meal, and it doesn't
     give any clues how to proceed if you unload the whole
     ball of wax at once.

Also, now I have python installed.

Whew!


My guess is, I need to install the new libtool I just
untarred; that is, do a make and make install.

But then do I need to modify some other code?

Do I need to do a buildconf? A build? A configure?



Is build.patch a classic UNIX patch file? If so,
where do I apply it? If not, how do I use it?


Kind regards,

-Steve Comstock
The Trainer's Friend, Inc.

303-393-8716
http://www.trainersfriend.com

   z/OS Application development made easier
     * Our classes include
        + How things work
        + Programming examples with realistic applications
        + Starter / skeleton code
        + Complete working programs
        + Useful utilities and subroutines
        + Tips and techniques

==> Check out the Trainer's Friend Store to purchase z/OS  <==
==> application developer toolkits. Sample code in four    <==
==> programming languages, JCL to Assemble or compile,     <==
==> bind and test.                                         <==
==>   http://www.trainersfriend.com/TTFStore/index.html    <==

Re: Adrift with Apache

by Greg Ames-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Jul 9, 2008 at 1:00 PM, Steve Comstock <steve@...> wrote:

> Hmmm. Seems to me the configure script ought to do the check
> for an existing file,

that's in the patch, but it happens at buildconf time fwiw.

> I picked up autoconf-2.62 from a GNU mirror, but I was reluctant
> to use it; since 2.54 is in toolsNtoys, which is in my PATH, I
> thought that a simpler approach.

I'm looking at mine again and I see autoconf 2.54, not sure what I was
looking at the other day.  maybe it's time for new contacts.  with the
patch on, build tools installed, and $PATH all set for building httpd:

httpd-2.2.9]$ srclib/apr/build/buildcheck.sh
buildconf: checking installation...
buildconf: autoconf version 2.54 (ok)
buildconf: libtool version 1.3.9 (ok)

...i.e. you should be able to use the tool-N-toys autoconf.

> * non-GNU libtool, and you provide a link; but I gather
>   I'm better off to install libtool-zOS-httpd-2.2.tar.Z
>   from the link in this email, right?

yes.  that's what I use with 2.2.  The 2.0 vintage libtool will
probably work with 2.2 also, but more experimenting with env vars etc
may be required, and you will end up with apr and aprutil statically
linked into your apachecore.dll.

> * GNU autocnf and m4; here you provide links, and also
>   these are in the ported tools N toys; which to use?

go with the tools-N-toys versions.  they are more likely to be up to date.

>> I am still bypassing an autoconf version check in pcre, however.
>
> I don't get the meaning of that last sentence.

the patch does that for you.  look in the patch file for something
that hits srclib/pcre/ if you want to know the details.

> I've unwound the tar ball using pax (my surprise: I had
> to do it twice, since the first time I didn't include
> -oto=ibm-1047; I figured this was for an EBCDIC system
> so the stored text would be EBCDCIC. Might want a note
> to that effect).

it also works on BeOS (not EBCDIC).  will do, when I get a round tuit.

> Well, I'll work on those after I get the basic install / port
> done. But now, where do I go?
>
> Here are the pieces I have available:

> My guess is, I need to install the new libtool I just untarred; that is, do a make and make install.

you are very close...the README is your friend

> But then do I need to modify some other code?

yes, modify your httpd source tree with the patch I provided.

> Do I need to do a buildconf?

yes, mainly to hook the z/OS libtool into your source tree.

> A configure?

yes, then make + make install + copy over the libapr[util]-1.so files
into your <prefix>/lib/ dir

> Is build.patch a classic UNIX patch file?

yes.  normally I use unified diffs, but the tools N toys patch program
used to choke (S0C4) on them.  I provided a fix for the patch program
but don't know if it's on the web page or if you have it.  so the
patch was created via diff with no options.

> If so, where do I apply it?

to the top of your source tree, i.e. your unpacked httpd tarball.  you
should be able to tell by looking at the filepaths in the patch file.

Greg

Re: Adrift with Apache

by Steve Comstock :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Greg Ames wrote:

> On Wed, Jul 9, 2008 at 1:00 PM, Steve Comstock <steve@...> wrote:
>
>> Hmmm. Seems to me the configure script ought to do the check
>> for an existing file,
>
> that's in the patch, but it happens at buildconf time fwiw.
>
>> I picked up autoconf-2.62 from a GNU mirror, but I was reluctant
>> to use it; since 2.54 is in toolsNtoys, which is in my PATH, I
>> thought that a simpler approach.
>
> I'm looking at mine again and I see autoconf 2.54, not sure what I was
> looking at the other day.  maybe it's time for new contacts.  with the
> patch on, build tools installed, and $PATH all set for building httpd:
>
> httpd-2.2.9]$ srclib/apr/build/buildcheck.sh
> buildconf: checking installation...
> buildconf: autoconf version 2.54 (ok)
> buildconf: libtool version 1.3.9 (ok)
>
> ...i.e. you should be able to use the tool-N-toys autoconf.
>
>> * non-GNU libtool, and you provide a link; but I gather
>>   I'm better off to install libtool-zOS-httpd-2.2.tar.Z
>>   from the link in this email, right?
>
> yes.  that's what I use with 2.2.  The 2.0 vintage libtool will
> probably work with 2.2 also, but more experimenting with env vars etc
> may be required, and you will end up with apr and aprutil statically
> linked into your apachecore.dll.
>
>> * GNU autocnf and m4; here you provide links, and also
>>   these are in the ported tools N toys; which to use?
>
> go with the tools-N-toys versions.  they are more likely to be up to date.
>
>>> I am still bypassing an autoconf version check in pcre, however.
>> I don't get the meaning of that last sentence.
>
> the patch does that for you.  look in the patch file for something
> that hits srclib/pcre/ if you want to know the details.
>
>> I've unwound the tar ball using pax (my surprise: I had
>> to do it twice, since the first time I didn't include
>> -oto=ibm-1047; I figured this was for an EBCDIC system
>> so the stored text would be EBCDCIC. Might want a note
>> to that effect).
>
> it also works on BeOS (not EBCDIC).  will do, when I get a round tuit.
>
>> Well, I'll work on those after I get the basic install / port
>> done. But now, where do I go?
>>
>> Here are the pieces I have available:
>
>> My guess is, I need to install the new libtool I just untarred; that is, do a make and make install.
>
> you are very close...the README is your friend
>
>> But then do I need to modify some other code?
>
> yes, modify your httpd source tree with the patch I provided.
>
>> Do I need to do a buildconf?
>
> yes, mainly to hook the z/OS libtool into your source tree.
>
>> A configure?
>
> yes, then make + make install + copy over the libapr[util]-1.so files
> into your <prefix>/lib/ dir
>
>> Is build.patch a classic UNIX patch file?
>
> yes.  normally I use unified diffs, but the tools N toys patch program
> used to choke (S0C4) on them.  I provided a fix for the patch program
> but don't know if it's on the web page or if you have it.  so the
> patch was created via diff with no options.
>
>> If so, where do I apply it?
>
> to the top of your source tree, i.e. your unpacked httpd tarball.  you
> should be able to tell by looking at the filepaths in the patch file.
>
> Greg

Well, I see two options; in /usr/lpp/zApache I have build.patch,
and directories libtool, bin, share and httpd-2.2.9

if I am in /usr/lpp/zApache, I could issue:

   patch -n -i build.patch httpd-2.2.9

except that httpd-2-2.9 is a directory; I've not issued 'patch'
against a directory before, didn't even know you could do that.

The other choice, it seems to me, is:

   cd httpd-2.2.9
   patch -n -i ../build.patch

but then what file would I specify?


Kind regards,

-Steve Comstock
The Trainer's Friend, Inc.

303-393-8716
http://www.trainersfriend.com

   z/OS Application development made easier
     * Our classes include
        + How things work
        + Programming examples with realistic applications
        + Starter / skeleton code
        + Complete working programs
        + Useful utilities and subroutines
        + Tips and techniques

==> Check out the Trainer's Friend Store to purchase z/OS  <==
==> application developer toolkits. Sample code in four    <==
==> programming languages, JCL to Assemble or compile,     <==
==> bind and test.                                         <==
==>   http://www.trainersfriend.com/TTFStore/index.html    <==

Re: Adrift with Apache

by Eric Covener :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sat, Jul 12, 2008 at 10:15 AM, Steve Comstock
<steve@...> wrote:

> The other choice, it seems to me, is:

>  cd httpd-2.2.9
>  patch -n -i ../build.patch

The relative paths in the patch begin with "srclib", so you should be
in the httpd-2.2.9 directory.

> but then what file would I specify?

The patch file specifies the files to modify, you don't need any more
arguments on the command line.

--
Eric Covener
covener@...
LightInTheBox - Buy quality products at wholesale price