On Thu, Nov 30, 2006 at 07:29:32AM -0800, Justin Erenkrantz wrote:
> On 11/30/06, Bob Rossi <[EMAIL PROTECTED]> wrote:
> >Does anyone know the status of building apr with mingw on windows?
> 
> If you use trunk, MinGW should work fine.  -- justin

Hi Justin, 

Thanks for the quick reply. 

Unfortunately, this didn't work for me. I'm using mingw via cygwin. The
first problem I ran into was this:

  $ ./buildconf 
  buildconf: checking installation...
  buildconf: python version 2.4.3 (ok)
  buildconf: autoconf version 2.60 (ok)
  buildconf: libtool not found.
             You need libtool version 1.4 or newer installed
             to build APR from SVN.

  $ libtool --version

  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.

So, I modified build/buildcheck.sh with the attached patch. I'm sure the
patch isn't "correct", but it helped me get a build going.

Now, I did 

  CFLAGS=-mno-cygwin ./configure 2>&1 | tee out.txt

to configure apr, but it failed with:
  checking for /dev/zero... yes
  ./configure:Error: decision on anonymous shared memory allocation method 
failed

Any idea why this is?

Finally, apr still doesn't work with the posix thread library on cygwin.
  Checking for Threads...
  APR will be non-threaded
Do you know why?

I found out that if I do ./configure --build=mingw32, then I get a
threaded build. I'm not sure if this is safe though. Any recommendations?
Attached is the patch to buildcheck and the output of configure.

Thanks,
Bob Rossi
Index: build/buildcheck.sh
===================================================================
--- build/buildcheck.sh (revision 480999)
+++ build/buildcheck.sh (working copy)
@@ -39,7 +39,7 @@

 # Require libtool 1.4 or newer
 libtool=`build/PrintPath glibtool libtool libtool15 libtool14`
-lt_pversion=`$libtool --version 2>/dev/null|sed -e 
's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'`
+lt_pversion=`$libtool --version 2>/dev/null|sed -e 
's/([^)]*)//g;s/^[^0-9]*//;'`
 if test -z "$lt_pversion"; then
 echo "buildconf: libtool not found."
 echo "           You need libtool version 1.4 or newer installed"

checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin
checking target system type... i686-pc-cygwin
Configuring APR library
Platform: i686-pc-cygwin
checking for working mkdir -p... yes
APR Version: 1.3.0
checking for chosen layout... apr
checking for gcc... gcc
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
Applying APR hints file rules for i686-pc-cygwin
  setting CPPFLAGS to "-DCYGWIN"
(Default will be unix)
checking whether make sets $(MAKE)... yes
checking how to run the C preprocessor... gcc -E
checking for gawk... gawk
checking whether ln -s works... yes
checking for ranlib... ranlib
checking for a BSD-compatible install... /usr/bin/install -c
checking for rm... rm
checking for as... as
checking for cpp... cpp
checking for ar... ar
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for AIX... no
checking for library containing strerror... none required
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether system uses EBCDIC... no
performing libtool configuration...
checking for a sed that does not truncate output... /usr/bin/sed
checking for ld used by gcc... /usr/i686-pc-cygwin/bin/ld.exe
checking if the linker (/usr/i686-pc-cygwin/bin/ld.exe) is GNU ld... yes
checking for /usr/i686-pc-cygwin/bin/ld.exe option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking how to recognize dependent libraries... file_magic ^x86 archive 
import|^x86 DLL
checking dlfcn.h usability... no
checking dlfcn.h presence... yes
configure: WARNING: dlfcn.h: present but cannot be compiled
configure: WARNING: dlfcn.h:     check for missing prerequisite headers?
configure: WARNING: dlfcn.h: see the Autoconf documentation
configure: WARNING: dlfcn.h:     section "Present But Cannot Be Compiled"
configure: WARNING: dlfcn.h: proceeding with the preprocessor's result
configure: WARNING: dlfcn.h: in the future, the compiler will take precedence
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for gfortran... no
checking for g95... no
checking for f95... no
checking for fort... no
checking for xlf95... no
checking for ifort... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for ftn... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether  accepts -g... no
checking the maximum length of command line arguments... 8192
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... (cached) ar
checking for ranlib... (cached) ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -DDLL_EXPORT
checking if gcc PIC flag -DDLL_EXPORT works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/i686-pc-cygwin/bin/ld.exe) supports 
shared libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/i686-pc-cygwin/bin/ld.exe
checking if the linker (/usr/i686-pc-cygwin/bin/ld.exe) is GNU ld... yes
checking whether the g++ linker (/usr/i686-pc-cygwin/bin/ld.exe) supports 
shared libraries... yes
checking for g++ option to produce PIC... -DDLL_EXPORT
checking if g++ PIC flag -DDLL_EXPORT works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/i686-pc-cygwin/bin/ld.exe) supports 
shared libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool

Check for compiler flags...
checking whether to enable -D_LARGEFILE64_SOURCE... no

Checking for libraries...
checking for library containing gethostbyname... no
checking for library containing gethostname... no
checking for library containing socket... no
checking for library containing crypt... -lcrypt
checking for main in -ltruerand... no
checking for library containing modf... none required

Checking for Threads...
APR will be non-threaded
checking for sigsuspend... no
checking for sigwait... no
checking for poll... no
checking for kqueue... no
checking for port_create... no
checking for epoll support... no
checking for getpwnam_r... no
checking for getpwuid_r... no
checking for getgrnam_r... no
checking for getgrgid_r... no

Checking for Shared Memory Support...
checking for library containing shm_open... no
checking for sys/types.h... (cached) yes
checking sys/mman.h usability... no
checking sys/mman.h presence... yes
configure: WARNING: sys/mman.h: present but cannot be compiled
configure: WARNING: sys/mman.h:     check for missing prerequisite headers?
configure: WARNING: sys/mman.h: see the Autoconf documentation
configure: WARNING: sys/mman.h:     section "Present But Cannot Be Compiled"
configure: WARNING: sys/mman.h: proceeding with the preprocessor's result
configure: WARNING: sys/mman.h: in the future, the compiler will take precedence
checking for sys/mman.h... yes
checking sys/ipc.h usability... no
checking sys/ipc.h presence... yes
configure: WARNING: sys/ipc.h: present but cannot be compiled
configure: WARNING: sys/ipc.h:     check for missing prerequisite headers?
configure: WARNING: sys/ipc.h: see the Autoconf documentation
configure: WARNING: sys/ipc.h:     section "Present But Cannot Be Compiled"
configure: WARNING: sys/ipc.h: proceeding with the preprocessor's result
configure: WARNING: sys/ipc.h: in the future, the compiler will take precedence
checking for sys/ipc.h... yes
checking sys/mutex.h usability... no
checking sys/mutex.h presence... no
checking for sys/mutex.h... no
checking sys/shm.h usability... no
checking sys/shm.h presence... yes
configure: WARNING: sys/shm.h: present but cannot be compiled
configure: WARNING: sys/shm.h:     check for missing prerequisite headers?
configure: WARNING: sys/shm.h: see the Autoconf documentation
configure: WARNING: sys/shm.h:     section "Present But Cannot Be Compiled"
configure: WARNING: sys/shm.h: proceeding with the preprocessor's result
configure: WARNING: sys/shm.h: in the future, the compiler will take precedence
checking for sys/shm.h... yes
checking sys/file.h usability... yes
checking sys/file.h presence... yes
checking for sys/file.h... yes
checking kernel/OS.h usability... no
checking kernel/OS.h presence... no
checking for kernel/OS.h... no
checking os2.h usability... no
checking os2.h presence... no
checking for os2.h... no
checking windows.h usability... yes
checking windows.h presence... yes
checking for windows.h... yes
checking for mmap... no
checking for munmap... no
checking for shm_open... no
checking for shm_unlink... no
checking for shmget... no
checking for shmat... no
checking for shmdt... no
checking for shmctl... no
checking for create_area... no
checking for MAP_ANON in sys/mman.h... yes
checking for /dev/zero... yes
./configure:Error: decision on anonymous shared memory allocation method failed

Reply via email to