Skip site navigation (1) Skip section navigation (2)

Re: Compiling 8.0beta on mingw with openssl support

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "G Reina" <reina_ga(at)hotmail(dot)com>,<pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: Compiling 8.0beta on mingw with openssl support
Date: 2004-08-24 14:49:09
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE475B11@algol.sollentuna.se (view raw or flat)
Thread:
Lists: pgsql-hackers-win32
This is a known issue with the SSL build. ATM, it requires a small hack
in the OpenSSL sources to make it work. IIRC, it's just a single
function (or was it even a line) that has to be removed.

//Magnus 

> -----Original Message-----
> From: G Reina [mailto:reina_ga(at)hotmail(dot)com] 
> Sent: Tuesday, August 24, 2004 4:18 PM
> To: pgsql-hackers-win32(at)postgresql(dot)org
> Subject: [pgsql-hackers-win32] Compiling 8.0beta on mingw 
> with openssl support
> 
> I've had no trouble compiling 8.0beta on a Windows XP box 
> with mingw, but am having a devil of a time doing it with 
> OpenSSL support. Specifically, the configure script is 
> throwing an error when it attempts to use the SSL library. 
> I've tried compiling OpenSSL 0.9.7d within mingw, from my MS 
> Visual Studio compiler, and from a packaged binary. The mingw 
> OpenSSL version seems to be the only usable one since it is 
> the only one that seems to be installing libcrypto.a and 
> libssl.a. The other two are just building DLLs (libeay32.dll 
> and ssleay32.dll). The configure script error with the mingw 
> openssl try is:
> 
> ...
> configure:5916: checking for inflate in -lz
> configure:5949: gcc -o conftest.exe -O2 -fno-strict-aliasing
> -I./src/include/port/win32 -DEXEC_BACKEND  -I/usr/local/include 
> -I/usr/local/ssl/include/openssl   -L/usr/local/lib 
> -L/usr/local/ssl/lib 
> conftest.c -lz  -lwsock32 -lm  >&5
> configure:5952: $? = 0
> configure:5955: test -s conftest.exe
> configure:5958: $? = 0
> configure:5969: result: yes
> configure:6566: checking for CRYPTO_new_ex_data in -lcrypto
> configure:6599: gcc -o conftest.exe -O2 -fno-strict-aliasing
> -I./src/include/port/win32 -DEXEC_BACKEND  -I/usr/local/include 
> -I/usr/local/ssl/include/openssl   -L/usr/local/lib 
> -L/usr/local/ssl/lib 
> conftest.c -lcrypto  -lz -lwsock32 -lm  >&5
> configure:6602: $? = 0
> configure:6605: test -s conftest.exe
> configure:6608: $? = 0
> configure:6619: result: yes
> configure:6635: checking for SSL_library_init in -lssl
> configure:6668: gcc -o conftest.exe -O2 -fno-strict-aliasing
> -I./src/include/port/win32 -DEXEC_BACKEND  -I/usr/local/include 
> -I/usr/local/ssl/include/openssl   -L/usr/local/lib 
> -L/usr/local/ssl/lib 
> conftest.c -lssl  -lcrypto -lz -lwsock32 -lm  >&5
> C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xae3)
> :rand_win.c: 
> undefined reference to `CreateDCA(at)16'
> C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xaf4)
> :rand_win.c: 
> undefined reference to `CreateCompatibleDC(at)4'
> C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xb09)
> :rand_win.c: 
> undefined reference to `GetDeviceCaps(at)8'
> C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xb19)
> :rand_win.c: 
> undefined reference to `GetDeviceCaps(at)8'
> C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xb33)
> :rand_win.c: 
> undefined reference to `CreateCompatibleBitmap(at)12'
> C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xb41)
> :rand_win.c: 
> undefined reference to `SelectObject(at)8'
> C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xb53)
> :rand_win.c: 
> undefined reference to `GetObjectA(at)12'
> C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xbc1)
> :rand_win.c: 
> undefined reference to `BitBlt(at)36'
> C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xbcb)
> :rand_win.c: 
> undefined reference to `GetBitmapBits(at)12'
> C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xc22)
> :rand_win.c: 
> undefined reference to `SelectObject(at)8'
> C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xc29)
> :rand_win.c: 
> undefined reference to `DeleteObject(at)4'
> C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xc33)
> :rand_win.c: 
> undefined reference to `DeleteDC(at)4'
> C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xc3d)
> :rand_win.c: 
> undefined reference to `DeleteDC(at)4'
> configure:6671: $? = 1
> configure: failed program was:
> #line 6642 "configure"
> //#include "confdefs.h"
> 
> /* Override any gcc2 internal prototype to avoid an error.  
> */ #ifdef __cplusplus extern "C"
> #endif
> /* We use char because int might match the return type of a gcc2
>    builtin and then its argument prototype would still apply. 
>  */ char SSL_library_init (); #ifdef F77_DUMMY_MAIN #  ifdef 
> __cplusplus
>      extern "C"
> #  endif
>    int F77_DUMMY_MAIN() { return 1; }
> #endif
> int
> main ()
> {
> SSL_library_init ();
>   ;
>   return 0;
> }
> configure:6688: result: no
> configure:6698: error: library 'ssl' is required for OpenSSL
> 
> ## ---------------- ##
> ## Cache variables. ##
> ## ---------------- ##
> 
> ac_cv_build=i686-pc-mingw32
> ac_cv_build_alias=i686-pc-mingw32
> ac_cv_c_compiler_gnu=yes
> 
> ...
> 
> So it would seem that something is wrong with rand_win.c in 
> my crypto library????
> 
> Has anyone who's compiled on mingw with openssl support run 
> into this? I think Magnus' download page has a nightly 
> snapshot that is compiled with openssl support. Perhaps he 
> knows the voodoo involved?
> 
> Thanks.
> -Tony
> 
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today 
> - it's FREE! 
> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
> 
> 
> ---------------------------(end of 
> broadcast)---------------------------
> TIP 6: Have you searched our list archives?
> 
>                http://archives.postgresql.org
> 
> 

Responses

pgsql-hackers-win32 by date

Next:From: Tony and Bryn ReinaDate: 2004-08-24 14:54:19
Subject: Re: Compiling 8.0beta on mingw with openssl support
Previous:From: Tom LaneDate: 2004-08-24 14:37:54
Subject: Re: REPOST: InitDB Failure on install

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group