apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob Rossi <bob_ro...@cox.net>
Subject Re: building apr on cygwin for mingw
Date Mon, 04 Dec 2006 15:30:35 GMT
On Fri, Dec 01, 2006 at 10:10:39PM -0500, Bob Rossi wrote:
> Hi,
> 
> I've successfully cross compiled apr on cygwin to mingw. I've already
> had one patch go upstream to autoconf, which fixes a problem
> AC_CHECK_SIZEOF.
> 
> 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
>   warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> 
> 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.

I'm very interested in feedback on this issue. Sorry if I'm to
impatient, I know a release was just made and everyone is probably very
busy.

Thanks,
Bob Rossi

Mime
View raw message