apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "carlo\.bramix" <carlo.bra...@libero.it>
Subject Re: apr 1.3.2 compile fails with mingw/gcc
Date Mon, 28 Jul 2008 16:28:07 GMT
I downloaded the latest snapshot of APR and I fixed it under Mingw+MSys.

Description of changes:

(1) libtool does not work if $top_builddir is undefined.

(2) I cannot really understand why the configure script made this crap:

Checking for libraries...
checking for getpid in -lmsvcrt... yes
checking for SetErrorMode@4 in kernel32... yes
checking for GetSecurityInfo@32 in advapi32... yes
checking for gethostbyname@4 in ws2_32... yes
checking for CommandLineToArgvW@8 in shell32... yes
checking for CreateFileMappingA@24 in kernel32... yes
checking for UuidCreate@4 in rpcrt4... yes

You must never add kernel32 or user32 directly on the command line!
You must leave the decision to Mingw if they must be used or not.
If you add them manually on Mingw, it may happen a disaster.
So, I just added the libraries we need.

(3) I saw you enabled a feature by checking if CreateFileMappingA@24 is found.
Actually this is an useless test, because there is no doubt that this function is available
under Win32/Win64.
At them moment I simply made "ac_cv_func_CreateFileMapping=yes" for detecting right mode with
Perhaps you may prefer a different or more clean coding style, I just wanted to show you the
right direction.

(4) I added "-no-undefined" to the options of libtool, otherwise it cannot create shared libraries
under mingw and cygwin.

(5) I added dependency to tlhelp32.h for fixing the error at compile time about missing PROCESS32
I think it's also better to move the test for windows.h and winsock2.h here.


Carlo Bramini.

---------- Initial Header -----------

>From      : "William A. Rowe, Jr." wrowe@rowe-clan.net
To          : dev@apr.apache.org
Cc          : 
Date      : Sun, 27 Jul 2008 19:22:43 -0500
Subject : Re: apr 1.3.2 compile fails with mingw/gcc

> Bob Rossi wrote:
> >>
> >> In file included from apr/apr-1.3.2/apr-1.3.2/include/arch/win32/apr_arch_file_io.h:29,
> >>                  from dso/win32/dso.c:20:
> >> apr/apr-1.3.2/apr-1.3.2/include/arch/win32/apr_arch_misc.h:419: error: expected
declaration specifiers or '...' before 'LPPROCESSENTRY32W'
> >> apr/apr-1.3.2/apr-1.3.2/include/arch/win32/apr_arch_misc.h:419: error: expected
declaration specifiers or '...' before 'LPPROCESSENTRY32W'
> >> apr/apr-1.3.2/apr-1.3.2/include/arch/win32/apr_arch_misc.h: In function 'apr_winapi_Process32FirstW':
> >> apr/apr-1.3.2/apr-1.3.2/include/arch/win32/apr_arch_misc.h:419: error: 'lppe'
undeclared (first use in this function)
> >> apr/apr-1.3.2/apr-1.3.2/include/arch/win32/apr_arch_misc.h:419: error: (Each
undeclared identifier is reported only once
> >> apr/apr-1.3.2/apr-1.3.2/include/arch/win32/apr_arch_misc.h:419: error: for each
function it appears in.)
> >> apr/apr-1.3.2/apr-1.3.2/include/arch/win32/apr_arch_misc.h:419: error: too many
arguments to function 'apr_winapi_pfn_Process32FirstW'
> >>
> >> Is this a known issue? I can give more details if not.
> > 
> > Ping. Anything I can do to help?
> Well, it seems LPPROCESSENTRY32W is undefined, and I can't tell you why.
> Perhaps grep your includes to determine if there is a mingw specific include
> we needed?  It's got to be somewhere, that's a pretty old type.
> Are your certain your toolchain is up to date?

View raw message