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

Re: Compiling beta2 with openssl on XP Pro

From: "Tony and Bryn Reina" <reina_ga(at)hotmail(dot)com>
To: "Magnus Hagander" <mha(at)sollentuna(dot)net>,"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: Compiling beta2 with openssl on XP Pro
Date: 2004-09-03 19:06:09
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers-win32
Magnus and Tom,

I may have found the "SSL compiles" fix. I ran across a similar problem at

The solution was to also link to gdi32.lib by using the compile 
flag -lgdi32. At least the compiler doesn't seem to balk about these missing 
functions any more and that DLL does seem to have the appropriate bitmap 
function names.

Does this sound right?


----- Original Message ----- 
From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Tony and Bryn Reina" <reina_ga(at)hotmail(dot)com>; "Tom Lane" 
Cc: <pgsql-hackers-win32(at)postgresql(dot)org>
Sent: Thursday, September 02, 2004 8:09 PM
Subject: SV: [pgsql-hackers-win32] Compiling beta2 with openssl on XP Pro

This is the known issue that's on the open items list as "fix SSL compiles".

The way to get it done now is to edit the source to openssl and remove the 
references to those functions. Yes, it's ugly and yes it needs a proper fix.


>-----Ursprungligt meddelande-----
>Från: Tony and Bryn Reina [mailto:reina_ga(at)hotmail(dot)com]
>Skickat: den 2 september 2004 19:57
>Till: Tom Lane
>Kopia: pgsql-hackers-win32(at)postgresql(dot)org
>Ämne: Re: [pgsql-hackers-win32] Compiling beta2 with openssl on XP Pro
>Haven't tried CVStip yet, but did give one more try to different
> configure --with-openssl --with-cassert --with-odbc
>which correctly sees the additional directories. So colon with
>single quotes
>around structure is passed correctly (which from your
>description of the fix
>sounds correct).
>Still have the error I reported last week with the SSL stuff.
>It's finding
>SSL, but bombing out on some definitions in rand_win.c. Magnus
>said it was
>an easy fix to the SSL includes, but he didn't remember what
>the fix was. I
>think other than that I should be good to go for compiling on mingw.
> $
>/configure --with-openssl --with-cassert --with-odbc
> --with-libs=/usr/local/ssl/lib:/usr/local/lib
>## --------- ##
>## Platform. ##
>## --------- ##
>hostname = KING
>uname -m = i686
>uname -r = 1.0.10(0.46/3/2)
>uname -s = MINGW32_NT-5.1
>uname -v = 2004-03-15 07:17
>configure:7291: checking for CRYPTO_new_ex_data in -lcrypto
>configure:7321: gcc -o
>onftest.exe -O2 -fno-strict-aliasing
>-I./src/include/port/win32 -DEXEC_BACKEND
>    -L/usr/local/ssl/lib -L/usr/local/lib
>conftest.c -lcrypto  -lz -lwsock32 -lm  >&5
>configure:7327: $? = 0
>configure:7331: test -z
>    || test ! -s conftest.err
>configure:7334: $? = 0
>configure:7337: test -s conftest.exe
>configure:7340: $? = 0
>configure:7353: result: yes
>configure:7369: checking for SSL_library_init in -lssl
>configure:7399: gcc -o
>onftest.exe -O2 -fno-strict-aliasing
>-I./src/include/port/win32 -DEXEC_BACKEND
>    -L/usr/local/ssl/lib -L/usr/local/lib
>conftest.c -lssl  -lcrypto -lz -lwsock32 -lm  >&5
>undefined reference to `CreateDCA(at)16'
>undefined reference to `CreateCompatibleDC(at)4'
>undefined reference to `GetDeviceCaps(at)8'
>undefined reference to `GetDeviceCaps(at)8'
>undefined reference to `CreateCompatibleBitmap(at)12'
>undefined reference to `SelectObject(at)8'
>undefined reference to `GetObjectA(at)12'
>undefined reference to `BitBlt(at)36'
>undefined reference to `GetBitmapBits(at)12'
>undefined reference to `SelectObject(at)8'
>undefined reference to `DeleteObject(at)4'
>undefined reference to `DeleteDC(at)4'
>undefined reference to `DeleteDC(at)4'
>configure:7405: $? = 1
>configure: failed program was:
>| /* confdefs.h.  */
>| #define PACKAGE_NAME "PostgreSQL"
>| #define PACKAGE_TARNAME "postgresql"
>| #define PACKAGE_VERSION "8.0.0beta2"
>| #define PACKAGE_STRING "PostgreSQL 8.0.0beta2"
>| #define PACKAGE_BUGREPORT "pgsql-bugs(at)postgresql(dot)org"
>| #define PG_VERSION "8.0.0beta2"
>| #define DEF_PGPORT 5432
>| #define DEF_PGPORT_STR "5432"
>| #define PG_VERSION_STR "PostgreSQL 8.0.0beta2 on
>i686-pc-mingw32, compiled
>by GCC gcc.exe (GCC) 3.2.3 (mingw special 20030504-1)"
>| #define PG_KRB_SRVNAM "postgres"
>| #define USE_SSL 1
>| #define HAVE_LIBM 1
>| #define HAVE_LIBWSOCK32 1
>| #define HAVE_LIBZ 1
>| #define HAVE_SPINLOCKS 1
>| #define HAVE_LIBCRYPTO 1
>| /* end 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 ();
>| int
>| main ()
>| {
>| SSL_library_init ();
>|   ;
>|   return 0;
>| }
>configure:7431: result: no
>configure:7441: error: library 'ssl' is required for OpenSSL
>----- Original Message ----- 
>From: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
>To: "Tony and Bryn Reina" <reina_ga(at)hotmail(dot)com>
>Cc: <pgsql-hackers-win32(at)postgresql(dot)org>
>Sent: Thursday, September 02, 2004 5:46 PM
>Subject: Re: [pgsql-hackers-win32] Compiling beta2 with
>openssl on XP Pro
>> "Tony and Bryn Reina" <reina_ga(at)hotmail(dot)com> writes:
>>> Still no dice. It sends the switches fine, but still
>doesn't seem to be
>>> looking in the second directory.
>> On looking into it, I found that the with-includes/libraries parts of
>> the configure script weren't aware they were supposed to use
>> instead of a hardwired ':'.  So that's at least part of the issue.
>> Could you try CVS-tip configure and see if it works better?
>> regards, tom lane
>---------------------------(end of
>TIP 1: subscribe and unsubscribe commands go to

In response to

pgsql-hackers-win32 by date

Next:From: Jaime CasanovaDate: 2004-09-03 23:01:55
Subject: Developers page is down
Previous:From: Bruce MomjianDate: 2004-09-03 17:28:45
Subject: Re: Win32 code

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