Обсуждение: Compiling beta2 with openssl on XP Pro
I couldn't get beta1 with openssl (snapshot of 27August) past configure on mingw so I thought I'd just skip to beta2 and re-try.
The snag I'm hitting is that the configure script doesn't seem to find the -lcrypto library. I'm specifying that library as /usr/local/ssl/lib from the --with-libs switch:
./configure --with-openssl --with-includes=/usr/local/include:/usr/ssl/include --with-libs=/usr/local/lib:/usr/ssl/lib
I'm assuming that to include multiple directories you add the colon (:) in between, but perhaps this is wrong (??)
In any case, when the configure script tries to compile conftest.c, it can't find -lcrypto:
configure:7321: gcc -o conftest.exe -O2 -fno-strict-aliasing -I./src/include/port/win32 -DEXEC_BACKEND -I/usr/local/include -L/usr/local/lib conftest.c -lcrypto -lz -lwsock32 -lm >&5
c:\mingw\bin\..\lib\gcc-lib\mingw32\3.2.3\..\..\..\..\mingw32\bin\ld.exe: cannot find -lcrypto
c:\mingw\bin\..\lib\gcc-lib\mingw32\3.2.3\..\..\..\..\mingw32\bin\ld.exe: cannot find -lcrypto
BUT, note that only the /usr/local/include and /usr/local/lib are added to the compile command. The script seems to be missing my additional directories of /usr/local/ssl/lib and /usr/local/ssl/include.
Can someone steer me in the right direction? How do I specify multiple search directories with the configure switches?
Thanks.
-Tony
p.s. If I cut out the conftest.c code and try to compile with the above command but add the missing -L and -I switches, it finds -lcrypto but gives the error:
gcc -o conftest.exe -O2 -fno-strict-aliasing -I./src/include/port/win32 -DEXEC_BACKEND
-I/usr/local/include -I/usr/local/ssl/include -L/usr/local/lib -L/usr/local/ssl/lib con
ftest.c -lcrypto -lz -lwsock32 -lm
C:/DOCUME~1/Tony/LOCALS~1/Temp/ccyUbaaa.o(.text+0x15):conftest.c: undefined reference to `fdatasync'
-I/usr/local/include -I/usr/local/ssl/include -L/usr/local/lib -L/usr/local/ssl/lib con
ftest.c -lcrypto -lz -lwsock32 -lm
C:/DOCUME~1/Tony/LOCALS~1/Temp/ccyUbaaa.o(.text+0x15):conftest.c: undefined reference to `fdatasync'
$ ./configure --with-openssl --with-includes=/usr/local/include:/usr/ssl/include --with-libs=/usr/local/lib:/usr/ssl/lib
## --------- ##
## Platform. ##
## --------- ##
## 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
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
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: .
PATH: /usr/local/bin
PATH: /mingw/bin
PATH: /bin
PATH: /c/Perl/bin/
PATH: /c/WINDOWS/system32
PATH: /c/WINDOWS
PATH: /c/WINDOWS/system32/WBEM
PATH: /c/matlab6p5/bin/win32
PATH: /c/Program Files/SSH Communications Security/SSH Secure Shell
PATH: /usr/local/bin
PATH: /mingw/bin
PATH: /bin
PATH: /c/Perl/bin/
PATH: /c/WINDOWS/system32
PATH: /c/WINDOWS
PATH: /c/WINDOWS/system32/WBEM
PATH: /c/matlab6p5/bin/win32
PATH: /c/Program Files/SSH Communications Security/SSH Secure Shell
configure:7291: checking for CRYPTO_new_ex_data in -lcrypto
configure:7321: gcc -o conftest.exe -O2 -fno-strict-aliasing -I./src/include/port/win32 -DEXEC_BACKEND -I/usr/local/include -L/usr/local/lib conftest.c -lcrypto -lz -lwsock32 -lm >&5
c:\mingw\bin\..\lib\gcc-lib\mingw32\3.2.3\..\..\..\..\mingw32\bin\ld.exe: cannot find -lcrypto
configure:7327: $? = 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@postgresql.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
| /* 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 CRYPTO_new_ex_data ();
| int
| main ()
| {
| CRYPTO_new_ex_data ();
| ;
| return 0;
| }
configure:7353: result: no
configure:7363: error: library 'crypto' is required for OpenSSL
configure:7321: gcc -o conftest.exe -O2 -fno-strict-aliasing -I./src/include/port/win32 -DEXEC_BACKEND -I/usr/local/include -L/usr/local/lib conftest.c -lcrypto -lz -lwsock32 -lm >&5
c:\mingw\bin\..\lib\gcc-lib\mingw32\3.2.3\..\..\..\..\mingw32\bin\ld.exe: cannot find -lcrypto
configure:7327: $? = 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@postgresql.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
| /* 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 CRYPTO_new_ex_data ();
| int
| main ()
| {
| CRYPTO_new_ex_data ();
| ;
| return 0;
| }
configure:7353: result: no
configure:7363: error: library 'crypto' is required for OpenSSL
Użytkownik Tony and Bryn Reina napisał: Tony, see your output: > configure:7353: result: no > configure:7363: error: library 'crypto' is required for OpenSSL You are missing crypt-bin and crypt-lib mingw packages. Best regards Rony
"Tony and Bryn Reina" <reina_ga@hotmail.com> writes: > Can someone steer me in the right direction? How do I specify multiple sear > ch directories with the configure switches? It looks to me like the configure script follows the local convention for path separators --- in other words, use ';' not ':' on Windows. regards, tom lane
I just tried: configure --with-openssl --with-includes=/usr/local/include;/usr/local/ssl/include --with-libs=/usr/local/lib;/usr/local/ssl/lib but the configure.log states the command was: configure --with-openssl --with-includes=/usr/local/include so it appears that everything after the first semi-colon (;) is lost. Can you show me how to specify the correct configure command for these directories? Thanks. -Tony ----- Original Message ----- From: "Tom Lane" <tgl@sss.pgh.pa.us> To: "Tony and Bryn Reina" <reina_ga@hotmail.com> Cc: <pgsql-hackers-win32@postgresql.org> Sent: Thursday, September 02, 2004 12:29 AM Subject: Re: [pgsql-hackers-win32] Compiling beta2 with openssl on XP Pro > "Tony and Bryn Reina" <reina_ga@hotmail.com> writes: >> Can someone steer me in the right direction? How do I specify multiple >> sear >> ch directories with the configure switches? > > It looks to me like the configure script follows the local convention > for path separators --- in other words, use ';' not ':' on Windows. > > regards, tom lane >
"Tony and Bryn Reina" <reina_ga@hotmail.com> writes: > I just tried: > configure --with-openssl --with-includes=/usr/local/include;/usr/local/ssl/include > --with-libs=/usr/local/lib;/usr/local/ssl/lib > but the configure.log states the command was: > configure --with-openssl --with-includes=/usr/local/include > so it appears that everything after the first semi-colon (;) is lost. Presumably you need to quote that parameter --- certainly you would need to quote a semicolon in a Unix shell. configure --with-openssl '--with-includes=/usr/local/include;/usr/local/ssl/include' ... regards, tom lane
> Presumably you need to quote that parameter --- certainly you would need > to quote a semicolon in a Unix shell. > > configure --with-openssl > '--with-includes=/usr/local/include;/usr/local/ssl/include' ... > configure --with-openssl --with-cassert --with-odbc '--with-include=/usr/local/ssl/include;/usr/local/include' '--with-libs=/usr/local/ssl/lib;/usr/local/lib' Still no dice. It sends the switches fine, but still doesn't seem to be looking in the second directory. So zlib is not found since it's in /usr/local/include and /usr/local/lib. But if I do: configure --with-cassert --with-odbc '--with-include=/usr/local/include' '--with-libs=/usr/local/lib' everything is fine for the configure script. Just seems to neglect anything after the first additional directory. -Tony p.s. If I move the openssl and zlib to the same directory, the configure bombs out on rand_win.c. This is the same problem that I posted last week with beta1. Magnus said that the fix was a one-line change in openssl, but didn't remember the change. Does anyone else know the fix? Thanks.
"Tony and Bryn Reina" <reina_ga@hotmail.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 PATH_SEPARATOR 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
Haven't tried CVStip yet, but did give one more try to different permutation: configure --with-openssl --with-cassert --with-odbc '--with-include=/usr/local/ssl/include:/usr/local/include' '--with-libs=/usr/local/ssl/lib:/usr/local/lib' 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-include=/usr/local/ssl/include:/usr/local/include --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 C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xb13):rand_win.c: undefined reference to `CreateDCA@16' C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xb24):rand_win.c: undefined reference to `CreateCompatibleDC@4' C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xb39):rand_win.c: undefined reference to `GetDeviceCaps@8' C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xb49):rand_win.c: undefined reference to `GetDeviceCaps@8' C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xb63):rand_win.c: undefined reference to `CreateCompatibleBitmap@12' C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xb71):rand_win.c: undefined reference to `SelectObject@8' C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xb83):rand_win.c: undefined reference to `GetObjectA@12' C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xbf1):rand_win.c: undefined reference to `BitBlt@36' C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xbfb):rand_win.c: undefined reference to `GetBitmapBits@12' C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xc52):rand_win.c: undefined reference to `SelectObject@8' C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xc59):rand_win.c: undefined reference to `DeleteObject@4' C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xc63):rand_win.c: undefined reference to `DeleteDC@4' C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xc6d):rand_win.c: undefined reference to `DeleteDC@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@postgresql.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@sss.pgh.pa.us> To: "Tony and Bryn Reina" <reina_ga@hotmail.com> Cc: <pgsql-hackers-win32@postgresql.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@hotmail.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 > PATH_SEPARATOR > 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 >
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 uglyand yes it needs a proper fix. //Magnus >-----Ursprungligt meddelande----- >Från: Tony and Bryn Reina [mailto:reina_ga@hotmail.com] >Skickat: den 2 september 2004 19:57 >Till: Tom Lane >Kopia: pgsql-hackers-win32@postgresql.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 >permutation: > > configure --with-openssl --with-cassert --with-odbc >'--with-include=/usr/local/ssl/include:/usr/local/include' >'--with-libs=/usr/local/ssl/lib:/usr/local/lib' > >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-include=/usr/local/ssl/include:/usr/local/include > --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 >C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xb13): >rand_win.c: >undefined reference to `CreateDCA@16' >C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xb24): >rand_win.c: >undefined reference to `CreateCompatibleDC@4' >C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xb39): >rand_win.c: >undefined reference to `GetDeviceCaps@8' >C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xb49): >rand_win.c: >undefined reference to `GetDeviceCaps@8' >C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xb63): >rand_win.c: >undefined reference to `CreateCompatibleBitmap@12' >C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xb71): >rand_win.c: >undefined reference to `SelectObject@8' >C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xb83): >rand_win.c: >undefined reference to `GetObjectA@12' >C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xbf1): >rand_win.c: >undefined reference to `BitBlt@36' >C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xbfb): >rand_win.c: >undefined reference to `GetBitmapBits@12' >C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xc52): >rand_win.c: >undefined reference to `SelectObject@8' >C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xc59): >rand_win.c: >undefined reference to `DeleteObject@4' >C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xc63): >rand_win.c: >undefined reference to `DeleteDC@4' >C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xc6d): >rand_win.c: >undefined reference to `DeleteDC@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@postgresql.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@sss.pgh.pa.us> >To: "Tony and Bryn Reina" <reina_ga@hotmail.com> >Cc: <pgsql-hackers-win32@postgresql.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@hotmail.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 >> PATH_SEPARATOR >> 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 >broadcast)--------------------------- >TIP 1: subscribe and unsubscribe commands go to >majordomo@postgresql.org >
Ooooo. That is ugly. Ok so if I understand correctly, I'll just need to edit rand_win.c and remove references to the functions like CreateDCA@16 and SelectObject@8? Will I run into the problem that these references are in other files or other things are dependant on them? -Tony p.s. Tom. I just downloaded from the CVS server. Still not working with the semi-colon and single quotes. From the looks of it, none of the additional includes are being listed in the compile command. When I use a colon and single quotes they are added correctly. $ /configure --with-openssl --with-cassert --with-odbc --with-include=/usr/local/ssl/include;/usr/local/include --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:5800: result: yes configure:5916: checking for inflate in -lz configure:5949: gcc -o onftest.exe -O2 -fno-strict-aliasing -I./src/include/port/win32 -DEXEC_BACKEND conftest.c -lz -lwsock32 -lm >&5 c:\mingw\bin\..\lib\gcc-lib\mingw32\3.2.3\..\..\..\..\mingw32\bin\ld.exe: cannot find -lz configure:5952: $? = 1 configure: failed program was: #line 5923 "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 inflate (); #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" # endif int F77_DUMMY_MAIN() { return 1; } #endif int main () { inflate (); ; return 0; } configure:5969: result: no configure:5982: error: zlib library not found If you have zlib already installed, see config.log for details on the failure. It is possible the compiler isn't looking in the proper directory. Use --without-zlib to disable zlib support. ----- Original Message ----- From: "Magnus Hagander" <mha@sollentuna.net> To: "Tony and Bryn Reina" <reina_ga@hotmail.com>; "Tom Lane" <tgl@sss.pgh.pa.us> Cc: <pgsql-hackers-win32@postgresql.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. //Magnus >-----Ursprungligt meddelande----- >Från: Tony and Bryn Reina [mailto:reina_ga@hotmail.com] >Skickat: den 2 september 2004 19:57 >Till: Tom Lane >Kopia: pgsql-hackers-win32@postgresql.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 >permutation: > > configure --with-openssl --with-cassert --with-odbc >'--with-include=/usr/local/ssl/include:/usr/local/include' >'--with-libs=/usr/local/ssl/lib:/usr/local/lib' > >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-include=/usr/local/ssl/include:/usr/local/include > --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 >C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xb13): >rand_win.c: >undefined reference to `CreateDCA@16' >C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xb24): >rand_win.c: >undefined reference to `CreateCompatibleDC@4' >C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xb39): >rand_win.c: >undefined reference to `GetDeviceCaps@8' >C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xb49): >rand_win.c: >undefined reference to `GetDeviceCaps@8' >C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xb63): >rand_win.c: >undefined reference to `CreateCompatibleBitmap@12' >C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xb71): >rand_win.c: >undefined reference to ` >C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xb83): >rand_win.c: >undefined reference to `GetObjectA@12' >C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xbf1): >rand_win.c: >undefined reference to `BitBlt@36' >C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xbfb): >rand_win.c: >undefined reference to `GetBitmapBits@12' >C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xc52): >rand_win.c: >undefined reference to `SelectObject@8' >C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xc59): >rand_win.c: >undefined reference to `DeleteObject@4' >C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xc63): >rand_win.c: >undefined reference to `DeleteDC@4' >C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xc6d): >rand_win.c: >undefined reference to `DeleteDC@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@postgresql.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@sss.pgh.pa.us> >To: "Tony and Bryn Reina" <reina_ga@hotmail.com> >Cc: <pgsql-hackers-win32@postgresql.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@hotmail.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 >> PATH_SEPARATOR >> 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 >broadcast)--------------------------- >TIP 1: subscribe and unsubscribe commands go to >majordomo@postgresql.org >
Correct, you should only need to tweak that one place. //Magnus >-----Ursprungligt meddelande----- >Från: Tony and Bryn Reina [mailto:reina_ga@hotmail.com] >Skickat: den 2 september 2004 20:36 >Till: Magnus Hagander; Tom Lane >Kopia: pgsql-hackers-win32@postgresql.org >Ämne: Re: [pgsql-hackers-win32] Compiling beta2 with openssl on XP Pro > > >Ooooo. That is ugly. > >Ok so if I understand correctly, I'll just need to edit rand_win.c and >remove references to the functions like CreateDCA@16 and >SelectObject@8? >Will I run into the problem that these references are in other >files or >other things are dependant on them? > >-Tony > >p.s. Tom. I just downloaded from the CVS server. Still not >working with the >semi-colon and single quotes. From the looks of it, none of >the additional >includes are being listed in the compile command. When I use a >colon and >single quotes they are added correctly. > >$ >/configure --with-openssl --with-cassert --with-odbc >--with-include=/usr/local/ssl/include;/usr/local/include > --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:5800: result: yes >configure:5916: checking for inflate in -lz >configure:5949: gcc -o >onftest.exe -O2 -fno-strict-aliasing >-I./src/include/port/win32 -DEXEC_BACKEND >conftest.c -lz -lwsock32 -lm >&5 >c:\mingw\bin\..\lib\gcc-lib\mingw32\3.2.3\..\..\..\..\mingw32\b >in\ld.exe: >cannot find -lz >configure:5952: $? = 1 >configure: failed program was: >#line 5923 "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 inflate (); >#ifdef F77_DUMMY_MAIN ># ifdef __cplusplus > extern "C" ># endif > int F77_DUMMY_MAIN() { return 1; } >#endif >int >main () >{ >inflate (); > ; > return 0; >} >configure:5969: result: no >configure:5982: error: zlib library not found >If you have zlib already installed, see config.log for details on the >failure. It is possible the compiler isn't looking in the >proper directory. >Use --without-zlib to disable zlib support. > > > >----- Original Message ----- >From: "Magnus Hagander" <mha@sollentuna.net> >To: "Tony and Bryn Reina" <reina_ga@hotmail.com>; "Tom Lane" ><tgl@sss.pgh.pa.us> >Cc: <pgsql-hackers-win32@postgresql.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. > >//Magnus > > >>-----Ursprungligt meddelande----- >>Från: Tony and Bryn Reina [mailto:reina_ga@hotmail.com] >>Skickat: den 2 september 2004 19:57 >>Till: Tom Lane >>Kopia: pgsql-hackers-win32@postgresql.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 >>permutation: >> >> configure --with-openssl --with-cassert --with-odbc >>'--with-include=/usr/local/ssl/include:/usr/local/include' >>'--with-libs=/usr/local/ssl/lib:/usr/local/lib' >> >>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-include=/usr/local/ssl/include:/usr/local/include >> --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 >>C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xb13): >>rand_win.c: >>undefined reference to `CreateDCA@16' >>C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xb24): >>rand_win.c: >>undefined reference to `CreateCompatibleDC@4' >>C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xb39): >>rand_win.c: >>undefined reference to `GetDeviceCaps@8' >>C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xb49): >>rand_win.c: >>undefined reference to `GetDeviceCaps@8' >>C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xb63): >>rand_win.c: >>undefined reference to `CreateCompatibleBitmap@12' >>C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xb71): >>rand_win.c: >>undefined reference to ` >>C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xb83): >>rand_win.c: >>undefined reference to `GetObjectA@12' >>C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xbf1): >>rand_win.c: >>undefined reference to `BitBlt@36' >>C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xbfb): >>rand_win.c: >>undefined reference to `GetBitmapBits@12' >>C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xc52): >>rand_win.c: >>undefined reference to `SelectObject@8' >>C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xc59): >>rand_win.c: >>undefined reference to `DeleteObject@4' >>C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xc63): >>rand_win.c: >>undefined reference to `DeleteDC@4' >>C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xc6d): >>rand_win.c: >>undefined reference to `DeleteDC@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@postgresql.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@sss.pgh.pa.us> >>To: "Tony and Bryn Reina" <reina_ga@hotmail.com> >>Cc: <pgsql-hackers-win32@postgresql.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@hotmail.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 >>> PATH_SEPARATOR >>> 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 >>broadcast)--------------------------- >>TIP 1: subscribe and unsubscribe commands go to >>majordomo@postgresql.org >> >
Magnus and Tom, I may have found the "SSL compiles" fix. I ran across a similar problem at http://archive.neotonic.com/archive/clanlib-devel/browse_frm/thread/1621/6940 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? -Tony ----- Original Message ----- From: "Magnus Hagander" <mha@sollentuna.net> To: "Tony and Bryn Reina" <reina_ga@hotmail.com>; "Tom Lane" <tgl@sss.pgh.pa.us> Cc: <pgsql-hackers-win32@postgresql.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. //Magnus >-----Ursprungligt meddelande----- >Från: Tony and Bryn Reina [mailto:reina_ga@hotmail.com] >Skickat: den 2 september 2004 19:57 >Till: Tom Lane >Kopia: pgsql-hackers-win32@postgresql.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 >permutation: > > configure --with-openssl --with-cassert --with-odbc >'--with-include=/usr/local/ssl/include:/usr/local/include' >'--with-libs=/usr/local/ssl/lib:/usr/local/lib' > >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-include=/usr/local/ssl/include:/usr/local/include > --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 >C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xb13): >rand_win.c: >undefined reference to `CreateDCA@16' >C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xb24): >rand_win.c: >undefined reference to `CreateCompatibleDC@4' >C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xb39): >rand_win.c: >undefined reference to `GetDeviceCaps@8' >C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xb49): >rand_win.c: >undefined reference to `GetDeviceCaps@8' >C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xb63): >rand_win.c: >undefined reference to `CreateCompatibleBitmap@12' >C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xb71): >rand_win.c: >undefined reference to `SelectObject@8' >C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xb83): >rand_win.c: >undefined reference to `GetObjectA@12' >C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xbf1): >rand_win.c: >undefined reference to `BitBlt@36' >C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xbfb): >rand_win.c: >undefined reference to `GetBitmapBits@12' >C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xc52): >rand_win.c: >undefined reference to `SelectObject@8' >C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xc59): >rand_win.c: >undefined reference to `DeleteObject@4' >C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xc63): >rand_win.c: >undefined reference to `DeleteDC@4' >C:/msys/1.0/local/ssl/lib/libcrypto.a(rand_win.o)(.text+0xc6d): >rand_win.c: >undefined reference to `DeleteDC@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@postgresql.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@sss.pgh.pa.us> >To: "Tony and Bryn Reina" <reina_ga@hotmail.com> >Cc: <pgsql-hackers-win32@postgresql.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@hotmail.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 >> PATH_SEPARATOR >> 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 >broadcast)--------------------------- >TIP 1: subscribe and unsubscribe commands go to >majordomo@postgresql.org >
The gdi32 library seems to be the trick for the openssl fix. Note that the order of the libraries seems to be critical: -lssl -lcrypto -lgdi32. Any other order seems to throw an error for gcc. I changed the configure file as follows: 6626,6627d6625 < LIBS="-lcrypto $LIBS" < 6634d6631 < 6641c6638 < LIBS="-lssl $LIBS" --- > LIBS="-lssl -lcrypto -lgdi32 $LIBS" 6695c6692 < LIBS="-lssl $LIBS" --- > LIBS="-lssl -lcrypto -lgdi32 $LIBS" and the src/Makefile.shlib to: 327c327 < $(DLLWRAP) -o $(shlib) --dllname $(shlib) $(DLLWRAP_FLAGS) --def $(NAME).def $(OBJS) $(SHLIB_LINK) --- > $(DLLWRAP) -o $(shlib) --dllname $(shlib) $(DLLWRAP_FLAGS) --def > $(NAME).def $(OBJS) $(SHLIB_LINK) -lgdi32 The Makefile wasn't picking up the -lgdi32 flag from configure (or wherever it should get it from). In any case, with these simple changes OpenSSL doesn't have to be tweaked to incorporate it into the Mingw build of PostgreSQL. I was able to compile and install the CVS tip from last night with these minor changes. Having trouble doing an initdb, but still working on it. -Tony ----- Original Message ----- From: "Magnus Hagander" <mha@sollentuna.net> To: "Tony and Bryn Reina" <reina_ga@hotmail.com>; "Tom Lane" <tgl@sss.pgh.pa.us> Cc: <pgsql-hackers-win32@postgresql.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. //Magnus
>Magnus and Tom, > >I may have found the "SSL compiles" fix. I ran across a >similar problem at >http://archive.neotonic.com/archive/clanlib-devel/browse_frm/th >read/1621/6940 > >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? That is at least partially correct. It does fix the issue, but I'm not 100% sure it's the fix we want. I'm looking at two different ways right now. Right now we also build exclusively against a static version of OpenSSL, and I (and everyone I spoke to about it) think it's better to go with the DLL version. Which will require a couple of different fixes. But it is a correct fix insofar as it enables you to compile and run. //Magnus
Ok. I figured it was more complicated than that. Thanks for the info. -Tony ----- Original Message ----- From: "Magnus Hagander" <mha@sollentuna.net> To: "Tony and Bryn Reina" <reina_ga@hotmail.com>; "Tom Lane" <tgl@sss.pgh.pa.us> Cc: <pgsql-hackers-win32@postgresql.org> Sent: Sunday, September 05, 2004 9:00 PM Subject: SV: [pgsql-hackers-win32] Compiling beta2 with openssl on XP Pro >Magnus and Tom, > >I may have found the "SSL compiles" fix. I ran across a >similar problem at >http://archive.neotonic.com/archive/clanlib-devel/browse_frm/th >read/1621/6940 > >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? That is at least partially correct. It does fix the issue, but I'm not 100% sure it's the fix we want. I'm looking at two different ways right now. Right now we also build exclusively against a static version of OpenSSL, and I (and everyone I spoke to about it) think it's better to go with the DLL version. Which will require a couple of different fixes. But it is a correct fix insofar as it enables you to compile and run. //Magnus
"Magnus Hagander" <mha@sollentuna.net> writes: > That is at least partially correct. It does fix the issue, but I'm not > 100% sure it's the fix we want. I'm looking at two different ways right > now. Right now we also build exclusively against a static version of > OpenSSL, and I (and everyone I spoke to about it) think it's better to > go with the DLL version. Which will require a couple of different fixes. Okay, I'll leave this as an open item till you send a patch. regards, tom lane