From: Pierre Joye <pierre.php@gmail.com>
To: pgsql-ports@postgresql.org
Subject: Libpq visual c++ build errors, addrinfo and sockaddr_storage redefinition error
Date: Tue, 6 May 2008 10:29:02 +0200
Message-ID: <fe05d1540805060129i35cd33c4rb2d62fea090907d5@mail.gmail.com> (raw)
hi,
While trying to update the PHP postgresql extension to 8.3.1, I met a
couple of issues.
The first was about not using kerberos, the makefile is incorrect as
an error will be raised when kerberos is used and no kerberos is used.
I added the following lines to avoid libpath error:
!IFDEF USE_SSL
CPP_PROJ=$(CPP_PROJ) /D USE_SSL
SSL_LIBS=ssleay32.lib libeay32.lib gdi32.lib
SSL_LIBPATH_ARG= /libpath:"$(SSL_LIB_PATH)"
!ENDIF
!IFDEF USE_KFW
CPP_PROJ=$(CPP_PROJ) /D KRB5
KFW_LIBS=krb5_32.lib comerr32.lib gssapi32.lib
KFW_LIBPATH_ARG= /libpath:"$(KFW_LIB_PATH)"
!ENDIF
and use XXX_LIBPATH_ARG in the LINK32_FLAG
The 2nd problem is about Shell32.lib, it is missing in the lib list.
It is required for SHGetFolderPath.
The last two problems are more tricky. It is about addrinfo and
sockaddr. addrinfo is actually defined on windows and seems to have
the correct order of the structure elements (see the comment in
src/include/getaddrinfo.h). Removing this declaration seems to work
(not tested yet).
I'm now trying to figure out the sockaddr_storage redclaration. The
windows struct is different
(http://msdn.microsoft.com/en-us/library/aa917505.aspx) and I'm not
sure it is a good idea to force the related HAVE_* definitions. Does
anyone have an idea about how to fix these two problems? If not, I can
try to fix them and run some tests using PHP, any help welcome as I'm
not a pgsql user (only building php releases and snapshots,
www.php.net/download and snaps.php.net).
The last version of my win32.mak file is available here:
http://pecl2.php.net/downloads/php-windows-builds/source/libpq/win32.mak
Cheers,
--
Pierre
http://blog.thepimp.net | http://www.libgd.org
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-ports@postgresql.org
Cc: pierre.php@gmail.com
Subject: Re: Libpq visual c++ build errors, addrinfo and sockaddr_storage redefinition error
In-Reply-To: <fe05d1540805060129i35cd33c4rb2d62fea090907d5@mail.gmail.com>
References: <fe05d1540805060129i35cd33c4rb2d62fea090907d5@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox