I've tried to recompile libpq.dll with ssl support using mingw32
cross-compiler on Debian. I would like to create single lightweight
libpq-ssl.dll instead of almost 3MB
recently with Postgresql Windows package. My Postgresql source version
is 8.1.5. I have some success, but it's not enough.
1. Patching mingw32.
Windres is unknown application for Debian, so we need to create file
i586-mingw32msvc-windres -I /usr/i586-mingw32msvc/include/ $1 $2 $3 $4
$5 $6 $7
2. Creating makefile - without ssl support for now:
./configure --host=i586-mingw32msvc --without-zlib \
--prefix /usr/i586-mingw32msvc --target=i586-mingw32msvc \
3. dllwrap gives an error:
/usr/i586-mingw32msvc/bin/ld: unrecognised emulation mode: elf_i386
Supported emulations: i386pe
I've read somewhere, that dll's can be linked through gcc. Replacing
dll-tool with gcc in Makefile.shlib:
i586-mingw32msvc-gcc --strip-all -shared -DBUILDING_DLL -o $(shlib)
$(DLLTOOL_LIBFLAGS) $(OBJS) $(SHLIB_LINK)
solved the problem.
4. openssl is much easier to build:
./Configure mingw shared no-krb5
We have to replace "gcc" with "i586-mingw32msvc-gcc" in Makefile (CC=
After applying these patches I'm able to get:
- libpq.dll without ssl support
Postgresql8.1.5 configure script --with-openssl option gives me an error:
configure: error: library 'eay32' is required for OpenSSL
- I have no idea how to make openssl dll's visible to it. I suppose,
that cryptoeay32 is not expected library name.
- which openssl cyphers are really necessary to work with Postgresql ?
- when exactly is used libiconv.dll and libintl-2.dll - do I also need
- how to link all of these libraries into single libpq.dll file ?
pgsql-ports by date
|Next:||From: Peter Eisentraut||Date: 2006-11-10 11:44:21|
|Subject: Re: mingw cross-compiling libpq.dll+ssl on Debian|
|Previous:||From: Magnus Hagander||Date: 2006-10-05 07:33:01|
|Subject: Re: PostgreSQL and Kerberos 5 on Solaris|