kmx via RT wrote: > Hi, > > I have experienced the enclosed failure during building of > openssl-1.0.0-beta4 by 32-bit native compiler from mingw-w64.sf.net project. > > At the beginning it might be good to summarize how many mingws we > currently have: > #1) 32-bit gcc-3.x toolchan from mingw.org project > #2) 32-bit gcc-4.x toolchan from mingw.org project > #3) 32-bit gcc-4.x toolchan from mingw-w64.sf.net project > #4) 64-bit gcc-4.x toolchan from mingw-w64.sf.net project > > Yes, it might be slightly confusing but mingw-w64 project delivers not > only 64-bit Windows toolchain but also 32-bit one. > > The main difference is that #1+#2 group uses completely different > c-runtime than group #3+#4. > > Compiling openssl-1.0.0-beta4 works fine with compilers: #1 and #2 > Tested by: "perl ./Configure shared mingw" + "make") > > Compiling openssl-1.0.0-beta4 with #4 works with no-asm option > Tested by: "perl ./Configure shared no-asm mingw64" + "make" > I have used compiler binaries from: > http://download.sourceforge.net/mingw-w64/mingw-w64-bin_x86_64-mingw_20091101_sezero.zip > > Compiling openssl-1.0.0-beta4 with #3 does not work - see enclosed error. > Tested by: "perl ./Configure shared mingw" + "make" > I have used compiler binaries from: > http://download.sourceforge.net/mingw-w64/mingw-w32-bin_i686-mingw_20091101_sezero.zip > > In theory compiler #3 uses exactly the same c-runtime headers as > compiler #4 so there is no obvious (at least obvious to me) reason why > #4 works and #3 does not. > > My investigation led to some #define/#undef X509_NAME clash between > c-runtime headers (wincrypt.h, ...) and openssl but I was not able to > prepare a sane patch to fix it. > > I would appreciate any help with this issue. > > Thanks. > > -- > kmx > > ##### > gcc -I.. -I../.. -I../asn1 -I../evp -I../../include -D_WINDLL > -DOPENSSL_USE_APP > LINK -DOPENSSL_PIC -DOPENSSL_THREADS -DDSO_WIN32 -mno-cygwin -DL_ENDIAN > -DOPENS > SL_NO_CAPIENG -fomit-frame-pointer -O3 -march=i486 -Wall > -DOPENSSL_BN_ASM_PART_W > ORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM > -DSHA512_ > ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -DWHIRLPOOL_ASM -c -o err_all.o > err_all.c > > In file included from err_all.c:96: > ../../include/openssl/ocsp.h:206: error: expected > specifier-qualifier-list befor > e '(' token > ../../include/openssl/ocsp.h:350: error: expected > specifier-qualifier-list befor > e '(' token > ../../include/openssl/ocsp.h:416: error: expected declaration specifiers > or '... > ' before '(' token > ../../include/openssl/ocsp.h:427: error: expected declaration specifiers > or '... > ' before '(' token > ../../include/openssl/ocsp.h:487: error: expected declaration specifiers > or '... > ' before '(' token > make[2]: *** [err_all.o] Error 1 > make[2]: Leaving directory `/z/_tmp/openssl-1.0.0-beta4/crypto/err' > make[1]: *** [subdirs] Error 1 > make[1]: Leaving directory `/z/_tmp/openssl-1.0.0-beta4/crypto' > make: *** [build_crypto] Error 1 > ##### > > > > > Hi, > > I have experienced the enclosed failure during building of openssl-1.0.0-beta4 > by 32-bit native compiler from mingw-w64.sf.net project. > > At the beginning it might be good to summarize how many mingws we currently > have: > #1) 32-bit gcc-3.x toolchan from mingw.org project > #2) 32-bit gcc-4.x toolchan from mingw.org project > #3) 32-bit gcc-4.x toolchan from mingw-w64.sf.net project > #4) 64-bit gcc-4.x toolchan from mingw-w64.sf.net project > > Yes, it might be slightly confusing but mingw-w64 project delivers not only > 64-bit Windows toolchain but also 32-bit one. > > The main difference is that #1+#2 group uses completely different c-runtime > than > group #3+#4. > > Compiling openssl-1.0.0-beta4 works fine with compilers: #1 and #2 > Tested by: "perl ./Configure shared mingw" + "make") > > Compiling openssl-1.0.0-beta4 with #4 works with no-asm option > Tested by: "perl ./Configure shared no-asm mingw64" + "make" > I have used compiler binaries from: > http://download.sourceforge.net/mingw-w64/mingw-w64-bin_x86_64-mingw_20091101_sezero.zip > > Compiling openssl-1.0.0-beta4 with #3 does not work - see enclosed error. > Tested by: "perl ./Configure shared mingw" + "make" > I have used compiler binaries from: > http://download.sourceforge.net/mingw-w64/mingw-w32-bin_i686-mingw_20091101_sezero.zip > > In theory compiler #3 uses exactly the same c-runtime headers as compiler #4 > so > there is no obvious (at least obvious to me) reason why #4 works and #3 does > not. > > My investigation led to some #define/#undef X509_NAME clash between c-runtime > headers (wincrypt.h, ...) and openssl but I was not able to prepare a sane > patch > to fix it. > > I would appreciate any help with this issue. > > Thanks. > > -- > kmx > > ##### > gcc -I.. -I../.. -I../asn1 -I../evp -I../../include -D_WINDLL > -DOPENSSL_USE_APP > LINK -DOPENSSL_PIC -DOPENSSL_THREADS -DDSO_WIN32 -mno-cygwin -DL_ENDIAN > -DOPENS > SL_NO_CAPIENG -fomit-frame-pointer -O3 -march=i486 -Wall > -DOPENSSL_BN_ASM_PART_W > ORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM > -DSHA512_ > ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -DWHIRLPOOL_ASM -c -o err_all.o > err_all.c > > In file included from err_all.c:96: > ../../include/openssl/ocsp.h:206: error: expected specifier-qualifier-list > befor > e '(' token > ../../include/openssl/ocsp.h:350: error: expected specifier-qualifier-list > befor > e '(' token > ../../include/openssl/ocsp.h:416: error: expected declaration specifiers or > '... > ' before '(' token > ../../include/openssl/ocsp.h:427: error: expected declaration specifiers or > '... > ' before '(' token > ../../include/openssl/ocsp.h:487: error: expected declaration specifiers or > '... > ' before '(' token > make[2]: *** [err_all.o] Error 1 > make[2]: Leaving directory `/z/_tmp/openssl-1.0.0-beta4/crypto/err' > make[1]: *** [subdirs] Error 1 > make[1]: Leaving directory `/z/_tmp/openssl-1.0.0-beta4/crypto' > make: *** [build_crypto] Error 1 > #####
Define NOCRYPT or try to define WIN32_LEAN_AND_MEAN for mingw-w64.sf.net project 32 bit version. I think that is good WIN32_LEAN_AND_MEAN to be defined for mingw. I confirm that openssl cross-compiles well with headers from mingw.org project . Reference : http://msdn.microsoft.com/ en-us/library/aa383745(VS.85).aspx : "Define WIN32_LEAN_AND_MEAN to exclude APIs such as Cryptography, DDE, RPC, Shell, and Windows Sockets." Notes: - header file from windows.h mingw.org project don't include wincrypt.h, so this header file is not compatible with other. - define of WIN32_LEAN_AND_MEAN is not applicable to openssl 0.9.8 branch. Roumen ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [email protected] Automated List Manager [email protected]
