apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob Rossi <bob_ro...@cox.net>
Subject building apr on cygwin for mingw
Date Sat, 02 Dec 2006 03:10:39 GMT

I'm having trouble subscribing to dev-subscribe@apr.apache.org. I've
sent a half dozen subscribe emails, and haven't been added yet. 
(over several days) I've also sent emails to dev-help@apr.apache.org, 
and have received no response. Could someone please add me to this 
mailing list?

I've successfully cross compiled apr on cygwin to mingw. I've already
had one patch go upstream to autoconf, which fixes a problem

I have two very small other problems, that need to be sent upstream, and
then trunk should work out of the box.

First, and oddly enough, the buildconf script fails for me because
build/buildcheck.sh doesn't recognize my libtool --version. I don't know
sed well enough, and thought someone here would quickly be able to spot
the problem. If not, I'll have to look deeper.

  $ libtool --version 2>/dev/null

  ltmain.sh (GNU libtool) 1.5.23a (1.1220.2.412 2006/10/13 14:13:30)

  Copyright (C) 2006  Free Software Foundation, Inc.
  This is free software; see the source for copying conditions.  There is NO

This command is failing by giving me no output.
  $ libtool --version 2>/dev/null|sed -e 's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'

So, I changed it to 
  $ libtool --version 2>/dev/null|sed -e 's/([^)]*)//g;s/^[^0-9]*//;'

and it worked, but I don't think that is the correct fix. Any ideas?

Secondly, the APR_CHECK_SIZEOF_EXTENDED isn't working for me because the
default for the cross compiled size is 8. However, ssize_t for me is 4.
So, the configure fails. I made this change:

  -APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], ssize_t, 8)
  +AC_CHECK_SIZEOF([ssize_t], [#include <stdio.h>
  +#include <sys/types.h>])

and things work nicely. Would a patch like this be acceptable? There are
5 changes I made just like this. Finally, the macro
APR_CHECK_SIZEOF_EXTENDED could probably be removed.

So, after patching autoconf, and making these two patches to apr, I was 
able to cross compile on cygwin with this command,

  ./configure  apr_cv_tcp_nodelay_with_cork=no ac_cv_func_setpgrp_void=yes
  ac_cv_file__dev_zero=no --build=i686-pc-cygwin --host=i686-pc-mingw32
  CC='gcc -mno-cygwin' CXX='g++ -mno-cygwin' 

I was able to take a sample program, and run it on a machine that did
not have cygwin installed, and it ran fine. It was simply a hello world
type program with apr stuff in it.

I would really appreciate if these thoughts could be considered, so I
could create a patch to send upstream.

Bob Rossi

View raw message