You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Jeff Trawick <tr...@gmail.com> on 2013/08/20 21:47:46 UTC

Did anybody ever play with cmake+apr and/or have any advice applicable to cmake+apr?

I plan to spend some time tilting at that windmill starting later this
week, for the purposes of getting a flexible build on Windows.  Enough time
to get something working?  Dunno :(

-- 
Born in Roswell... married an alien...
http://emptyhammock.com/

Re: Did anybody ever play with cmake+apr and/or have any advice applicable to cmake+apr?

Posted by Alexander Broekhuis <a....@gmail.com>.
If you need someone testing the CMake stuff, feel free to ping me. While I
don't have much time, I have experience with CMake in the Celix project.



2013/8/21 Jeff Trawick <tr...@gmail.com>

> On Tue, Aug 20, 2013 at 10:12 PM, William A. Rowe Jr. <wrowe@rowe-clan.net
> > wrote:
>
>> On Tue, 20 Aug 2013 15:47:46 -0400
>> Jeff Trawick <tr...@gmail.com> wrote:
>>
>> > I plan to spend some time tilting at that windmill starting later this
>> > week, for the purposes of getting a flexible build on Windows.
>> > Enough time to get something working?  Dunno :(
>>
>> Feel free to attack it from either angle, once we have a unix or
>> a windows starting point, the rest is straightforward.
>>
>> I've looked some at what it will take.  Was going to use what the
>> pcre project has done as a starting point.
>>
>
> Yeah.  I had looked at that very briefly before, but after staring at that
> some more today and spending a couple of hours starting a spec for APR
> trunk, I'm very happy with my progress.  I hope to have the core library
> and test suite building today.
>
>
> --
> Born in Roswell... married an alien...
> http://emptyhammock.com/
>



-- 
Met vriendelijke groet,

Alexander Broekhuis

Re: Did anybody ever play with cmake+apr and/or have any advice applicable to cmake+apr?

Posted by Jeff Trawick <tr...@gmail.com>.
On Tue, Aug 20, 2013 at 10:12 PM, William A. Rowe Jr.
<wr...@rowe-clan.net>wrote:

> On Tue, 20 Aug 2013 15:47:46 -0400
> Jeff Trawick <tr...@gmail.com> wrote:
>
> > I plan to spend some time tilting at that windmill starting later this
> > week, for the purposes of getting a flexible build on Windows.
> > Enough time to get something working?  Dunno :(
>
> Feel free to attack it from either angle, once we have a unix or
> a windows starting point, the rest is straightforward.
>
> I've looked some at what it will take.  Was going to use what the
> pcre project has done as a starting point.
>

Yeah.  I had looked at that very briefly before, but after staring at that
some more today and spending a couple of hours starting a spec for APR
trunk, I'm very happy with my progress.  I hope to have the core library
and test suite building today.

-- 
Born in Roswell... married an alien...
http://emptyhammock.com/

Re: Did anybody ever play with cmake+apr and/or have any advice applicable to cmake+apr?

Posted by "William A. Rowe Jr." <wr...@rowe-clan.net>.
On Tue, 20 Aug 2013 15:47:46 -0400
Jeff Trawick <tr...@gmail.com> wrote:

> I plan to spend some time tilting at that windmill starting later this
> week, for the purposes of getting a flexible build on Windows.
> Enough time to get something working?  Dunno :(

Feel free to attack it from either angle, once we have a unix or 
a windows starting point, the rest is straightforward.

I've looked some at what it will take.  Was going to use what the
pcre project has done as a starting point.

Re: Did anybody ever play with cmake+apr and/or have any advice applicable to cmake+apr?

Posted by Jeff Trawick <tr...@gmail.com>.
On Wed, Aug 21, 2013 at 3:49 PM, William A. Rowe Jr. <wr...@rowe-clan.net>wrote:

> On Tue, 20 Aug 2013 15:47:46 -0400
> Jeff Trawick <tr...@gmail.com> wrote:
>
> > I plan to spend some time tilting at that windmill starting later this
> > week, for the purposes of getting a flexible build on Windows.
> > Enough time to get something working?  Dunno :(
>
> Just FYI, RELWITHDEBINFO was a broken model, but that's the model we
> have always aimed for with separate .pdb symbol files for win builds.
> We want several things that the attached patch to cmake 2.8.7 addresses
> (it isn't the most elegant, but it works);
>
> * disable stack corruption^Woptimization so that user crash dumps
>   with no debug info are still nominally decipherable
>
> * a release build is *never* incremental (duh)
>
> * /opt:ref to toss useless/unreferenced debug leftovers for release
>
> * there was a stupid bug where shared lib link flags in RELWITHDEBINFO
>   inherited DEBUG model, not RELWITHDEBINFO model from exe link flags.
>
> I've never worked out how to propagate the actual .pdb file into the
> install lib/ or bin/ dir when performing the .exe / .dll install step.
> Hints on improving the patch would be great.
>
>
>
I guess all of this necessarily goes in the cmake backend, but possibly
with a knob in the APR spec to turn it on?


-- 
Born in Roswell... married an alien...
http://emptyhammock.com/

Re: Did anybody ever play with cmake+apr and/or have any advice applicable to cmake+apr?

Posted by "William A. Rowe Jr." <wr...@rowe-clan.net>.
On Tue, 20 Aug 2013 15:47:46 -0400
Jeff Trawick <tr...@gmail.com> wrote:

> I plan to spend some time tilting at that windmill starting later this
> week, for the purposes of getting a flexible build on Windows.
> Enough time to get something working?  Dunno :(

Just FYI, RELWITHDEBINFO was a broken model, but that's the model we
have always aimed for with separate .pdb symbol files for win builds.
We want several things that the attached patch to cmake 2.8.7 addresses
(it isn't the most elegant, but it works);

* disable stack corruption^Woptimization so that user crash dumps
  with no debug info are still nominally decipherable

* a release build is *never* incremental (duh)

* /opt:ref to toss useless/unreferenced debug leftovers for release

* there was a stupid bug where shared lib link flags in RELWITHDEBINFO
  inherited DEBUG model, not RELWITHDEBINFO model from exe link flags.

I've never worked out how to propagate the actual .pdb file into the
install lib/ or bin/ dir when performing the .exe / .dll install step.
Hints on improving the patch would be great.

  

Re: Did anybody ever play with cmake+apr and/or have any advice applicable to cmake+apr?

Posted by Jeff Trawick <tr...@gmail.com>.
On Thu, Aug 22, 2013 at 6:47 PM, Tom Donovan <do...@bellatlantic.net>wrote:

> On 08/22/2013 04:55 PM, Jeff Trawick wrote:
> > On Thu, Aug 22, 2013 at 10:49 AM, Tom Donovan <donovant@bellatlantic.net
> > <ma...@bellatlantic.net>> wrote:
> >
> >     On 08/20/2013 03:47 PM, Jeff Trawick wrote:
> >     > I plan to spend some time tilting at that windmill starting later
> this week, for the purposes of
> >     > getting a flexible build on Windows.  Enough time to get something
> working?  Dunno :(
> >     >
> >     > --
> >     > Born in Roswell... married an alien...
> >     > http://emptyhammock.com/
> >
> >     I gave it a try last March, but I never found the time to follow up
> and finish it.
> >     I was able to build apr and httpd (trunk) on Windows7.
> >
> >     My Windows-only CMakeLists.txt files for both apr & httpd, along
> with some notes, are at:
> >
> >        http://people.apache.org/~tdonovan/cmake/HTTPD_CMake.zip
> >
> >     Please help yourself to anything here which is useful to your effort.
> >
> >     -t-
> >
> >
> > Hi Tom,
> >
> > By chance did you experiment with FindOpenSSL, FindZLIB, etc.?
> >
> > --
> > Born in Roswell... married an alien...
> > http://emptyhammock.com/
>
> Hi Jeff,
>
> I looked at them briefly, but no, I didn't experiment much.
>
> On Windows, those CMake modules seem to have an impossible job.  There is
> really no "standard"
> location on Windows for OpenSSL, Zlib, et. al. - especially since headers
> are needed in addition to
> the runtime libraries.   These modules pose a risk of finding some
> unrelated OpenSSL or Zlib library
> which might have been built with a different Windows compiler, and might
> use a different C runtime
> library.
>
> I used my own rules instead to locate the eleven prerequisites that APR or
> HTTPD might use on
> Windows.  The rules I made for PCRE, ICONV, LUA, LIBXML2 (or EXPAT), ZLIB,
> OPENSSL, SQLITE3, PGSQL,
> MYSQL, ORACLE, and BDB (Berkeley DB) were:
>
> *  If the symbol is defined on the CMake command-line, it points to the
> directory that the
> prerequisite is installed in.  i.e. the directory containing bin, include,
> and lib subdirectories.
>
> e.g.
> CMAKE -D SQLITE3=C:/work/sqlite3 -D PCRE=D:/build/pcre  -D
> ICONV=C:/work/libiconv ...
>
> *  If the symbol is not defined, a check is made for directories named:
>
> srclib\pcre, srclib\libiconv, srclib\lua, srclib\libxml2, srclib\zlib,
> srclib\openssl,
> srclib\sqlite3, srclib\postgresql, srclib\mysql, srclib\oracle, or
> srclib\berkeleydb.
>
> *  If the symbol isn't defined and the srclib\XXX subdirectory doesn't
> exist - then the
> prerequisite is not present.
>
> -tom-
>
>
Thanks...

I haven't gotten nearly far enough with optional prerequisites to judge
FindXXX vs. custom logic.  For now, this setting before starting cmake has
been enough to allow FindExpat and FindLibXml2 to work:

set
CMAKE_LIBRARY_PATH=c:\Users\Trawick\libxml2-2.7.8.win32\lib;c:\Users\Trawick\Expat2.1.0\Bin;
set
CMAKE_INCLUDE_PATH=c:\Users\Trawick\libxml2-2.7.8.win32\include;c:\Users\Trawick\Expat2.1.0\Source\lib

I'll see how far that gets me :)

Another difference in my direction, tied up in the same cmake logic, is not
copying some other project's DLLs around, such as into the apr (or httpd
for that matter) install directory.  Theoretically it should just work by
choosing the same install prefix for each project.  Otherwise the user
would have to update PATH.  I fear that the magic to avoid that hides the
steps that might be necessary when they later update one particular support
library.

A bundler that delivers a complete application package and can't get the
cmake install logic in all the support library packages to agree would just
copy the DLLs to the desired place in their own scripts.

Either of these choices may fall by the wayside because of what lurks right
around the corner.

-- 
Born in Roswell... married an alien...
http://emptyhammock.com/

Re: Did anybody ever play with cmake+apr and/or have any advice applicable to cmake+apr?

Posted by Alexander Broekhuis <a....@gmail.com>.
I accidentally send my mail direct, instead of to the list, so now to the
list again.

>
>> > Please do the smart thing and use them from the start. Saves you a lot
>> of trouble later on. Using
>> > the FindModules probably makes the build work for more then 80% on
>> other platforms from the start.
>> > Also using standard stuff gives you less custom CMake scripts to
>> maintain.
>> >
>>
>
> That's my plan, except when I find things that don't appear workable, such
> as no cmake-bundled FindXXX for some project.  (Over time maybe we need
> build up our own libraries, but I don't have enough time for that at
> present.)
>

Good to hear. In the case CMake doesn't have a bundled find file, often
something can be found on other projects. On the other hand, making an own
Find module is straightforward and simple if only the library and headers
are needed (most likely enough to start with).


>
> So far OpenSSL, Expat, and LibXml2 seem very easy to deal with on Windows
> based on the cmake-bundled FindXXX packages.
>

Good the hear, there is a big chance the CMake script will work on other
platforms as well.

Do you also intend to use CMake for project file generation?


-- 
Met vriendelijke groet,

Alexander Broekhuis

Re: Did anybody ever play with cmake+apr and/or have any advice applicable to cmake+apr?

Posted by Tom Donovan <do...@bellatlantic.net>.
On 08/22/2013 04:55 PM, Jeff Trawick wrote:
> On Thu, Aug 22, 2013 at 10:49 AM, Tom Donovan <donovant@bellatlantic.net
> <ma...@bellatlantic.net>> wrote:
> 
>     On 08/20/2013 03:47 PM, Jeff Trawick wrote:
>     > I plan to spend some time tilting at that windmill starting later this week, for the purposes of
>     > getting a flexible build on Windows.  Enough time to get something working?  Dunno :(
>     >
>     > --
>     > Born in Roswell... married an alien...
>     > http://emptyhammock.com/
> 
>     I gave it a try last March, but I never found the time to follow up and finish it.
>     I was able to build apr and httpd (trunk) on Windows7.
> 
>     My Windows-only CMakeLists.txt files for both apr & httpd, along with some notes, are at:
> 
>        http://people.apache.org/~tdonovan/cmake/HTTPD_CMake.zip
> 
>     Please help yourself to anything here which is useful to your effort.
> 
>     -t-
> 
> 
> Hi Tom,
> 
> By chance did you experiment with FindOpenSSL, FindZLIB, etc.?
> 
> -- 
> Born in Roswell... married an alien...
> http://emptyhammock.com/

Hi Jeff,

I looked at them briefly, but no, I didn't experiment much.

On Windows, those CMake modules seem to have an impossible job.  There is really no "standard"
location on Windows for OpenSSL, Zlib, et. al. - especially since headers are needed in addition to
the runtime libraries.   These modules pose a risk of finding some unrelated OpenSSL or Zlib library
which might have been built with a different Windows compiler, and might use a different C runtime
library.

I used my own rules instead to locate the eleven prerequisites that APR or HTTPD might use on
Windows.  The rules I made for PCRE, ICONV, LUA, LIBXML2 (or EXPAT), ZLIB, OPENSSL, SQLITE3, PGSQL,
MYSQL, ORACLE, and BDB (Berkeley DB) were:

*  If the symbol is defined on the CMake command-line, it points to the directory that the
prerequisite is installed in.  i.e. the directory containing bin, include, and lib subdirectories.

e.g.
CMAKE -D SQLITE3=C:/work/sqlite3 -D PCRE=D:/build/pcre  -D ICONV=C:/work/libiconv ...

*  If the symbol is not defined, a check is made for directories named:

srclib\pcre, srclib\libiconv, srclib\lua, srclib\libxml2, srclib\zlib, srclib\openssl,
srclib\sqlite3, srclib\postgresql, srclib\mysql, srclib\oracle, or srclib\berkeleydb.

*  If the symbol isn't defined and the srclib\XXX subdirectory doesn't exist - then the
prerequisite is not present.

-tom-


Re: Did anybody ever play with cmake+apr and/or have any advice applicable to cmake+apr?

Posted by Jeff Trawick <tr...@gmail.com>.
On Thu, Aug 22, 2013 at 10:49 AM, Tom Donovan <do...@bellatlantic.net>wrote:

> On 08/20/2013 03:47 PM, Jeff Trawick wrote:
> > I plan to spend some time tilting at that windmill starting later this
> week, for the purposes of
> > getting a flexible build on Windows.  Enough time to get something
> working?  Dunno :(
> >
> > --
> > Born in Roswell... married an alien...
> > http://emptyhammock.com/
>
> I gave it a try last March, but I never found the time to follow up and
> finish it.
> I was able to build apr and httpd (trunk) on Windows7.
>
> My Windows-only CMakeLists.txt files for both apr & httpd, along with some
> notes, are at:
>
>    http://people.apache.org/~tdonovan/cmake/HTTPD_CMake.zip
>
> Please help yourself to anything here which is useful to your effort.
>
> -t-
>

Hi Tom,

By chance did you experiment with FindOpenSSL, FindZLIB, etc.?

-- 
Born in Roswell... married an alien...
http://emptyhammock.com/

Re: Did anybody ever play with cmake+apr and/or have any advice applicable to cmake+apr?

Posted by Jeff Trawick <tr...@gmail.com>.
On Thu, Aug 22, 2013 at 10:49 AM, Tom Donovan <do...@bellatlantic.net>wrote:

> On 08/20/2013 03:47 PM, Jeff Trawick wrote:
> > I plan to spend some time tilting at that windmill starting later this
> week, for the purposes of
> > getting a flexible build on Windows.  Enough time to get something
> working?  Dunno :(
> >
> > --
> > Born in Roswell... married an alien...
> > http://emptyhammock.com/
>
> I gave it a try last March, but I never found the time to follow up and
> finish it.
> I was able to build apr and httpd (trunk) on Windows7.
>
> My Windows-only CMakeLists.txt files for both apr & httpd, along with some
> notes, are at:
>
>    http://people.apache.org/~tdonovan/cmake/HTTPD_CMake.zip
>
> Please help yourself to anything here which is useful to your effort.
>
> -t-
>

Wow, you got pretty darn far!  (too bad you didn't go ahead and commit ;) )

I currently anticipate

* fixing a few basic issues in what I have "soon" and then committing
* subsequently pulling in chunks of your stuff as I understand it/can try
it out

-- 
Born in Roswell... married an alien...
http://emptyhammock.com/

Re: Did anybody ever play with cmake+apr and/or have any advice applicable to cmake+apr?

Posted by Tom Donovan <do...@bellatlantic.net>.
On 08/20/2013 03:47 PM, Jeff Trawick wrote:
> I plan to spend some time tilting at that windmill starting later this week, for the purposes of
> getting a flexible build on Windows.  Enough time to get something working?  Dunno :(
> 
> -- 
> Born in Roswell... married an alien...
> http://emptyhammock.com/

I gave it a try last March, but I never found the time to follow up and finish it.
I was able to build apr and httpd (trunk) on Windows7.

My Windows-only CMakeLists.txt files for both apr & httpd, along with some notes, are at:

   http://people.apache.org/~tdonovan/cmake/HTTPD_CMake.zip

Please help yourself to anything here which is useful to your effort.

-t-