Hello, I´m trying to compile openssl-snap-20080729 under MinGW/MSYS environment but I have problems with some defines from wincrypt.h. I saw that in past [1] you get similar problems but for now the ¨undef¨ fix seems no sense to me.
OBS: I´m using ActivePerl for symlink compatibility, when using perl from mingw.org is needed a simple (and ugly) hack: --- mklink.pl Thu Feb 9 11:00:35 2006 +++ mklink-fix.pl Tue Jul 29 16:32:51 2008 @@ -50,7 +50,7 @@ foreach $dirname (@from_path) { my $to = join('/', @to_path); my $file; -$symlink_exists=eval {symlink("",""); 1}; +$symlink_exists=0; foreach $file (@files) { my $err = ""; if ($symlink_exists) { My step-by-step: $ ./config --prefix=/mingw --openssldir=/mingw/openssl Operating system: i686-whatever-mingw Configuring for mingw Configuring for mingw no-gmp [default] OPENSSL_NO_GMP (skip dir) no-krb5 [krb5-flavor not specified] OPENSSL_NO_KRB5 no-mdc2 [default] OPENSSL_NO_MDC2 (skip dir) no-rc5 [default] OPENSSL_NO_RC5 (skip dir) no-rfc3779 [default] OPENSSL_NO_RFC3779 (skip dir) no-shared [default] no-zlib [default] no-zlib-dynamic [default] IsMK1MF=0 CC =gcc CFLAG =-DOPENSSL_THREADS -DDSO_WIN32 -mno-cygwin -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -DWHIRLPOOL_ASM EX_LIBS =-lws2_32 -lgdi32 CPUID_OBJ =x86cpuid.o BN_ASM =bn-586.o co-586.o x86-mont.o DES_ENC =des-586.o crypt586.o AES_ENC =aes-586.o BF_ENC =bf-586.o CAST_ENC =cast-586.o RC4_ENC =rc4-586.o RC5_ENC =rc5-586.o MD5_OBJ_ASM =md5-586.o SHA1_OBJ_ASM =sha1-586.o sha256-586.o sha512-586.o RMD160_OBJ_ASM=rmd-586.o CMLL_ENC= =camellia.o cmll_misc.o cmll_cbc.o PROCESSOR = RANLIB =true ARFLAGS = PERL =perl THIRTY_TWO_BIT mode DES_PTR used DES_RISC1 used DES_UNROLL used BN_LLONG mode RC4_INDEX mode RC4_CHUNK is undefined e_os2.h => include/openssl/e_os2.h making links in crypto... make[1]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto' crypto.h => ../include/openssl/crypto.h opensslv.h => ../include/openssl/opensslv.h opensslconf.h => ../include/openssl/opensslconf.h ebcdic.h => ../include/openssl/ebcdic.h symhacks.h => ../include/openssl/symhacks.h ossl_typ.h => ../include/openssl/ossl_typ.h making links in crypto/objects... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/objects' objects.h => ../../include/openssl/objects.h obj_mac.h => ../../include/openssl/obj_mac.h make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/objects' making links in crypto/md2... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/md2' md2.h => ../../include/openssl/md2.h md2test.c => ../../test/md2test.c make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/md2' making links in crypto/md4... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/md4' md4.h => ../../include/openssl/md4.h md4test.c => ../../test/md4test.c md4.c => ../../apps/md4.c make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/md4' making links in crypto/md5... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/md5' md5.h => ../../include/openssl/md5.h md5test.c => ../../test/md5test.c make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/md5' making links in crypto/sha... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/sha' sha.h => ../../include/openssl/sha.h shatest.c => ../../test/shatest.c sha1test.c => ../../test/sha1test.c sha256t.c => ../../test/sha256t.c sha512t.c => ../../test/sha512t.c make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/sha' making links in crypto/hmac... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/hmac' hmac.h => ../../include/openssl/hmac.h hmactest.c => ../../test/hmactest.c make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/hmac' making links in crypto/ripemd... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/ripemd' ripemd.h => ../../include/openssl/ripemd.h rmdtest.c => ../../test/rmdtest.c make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/ripemd' making links in crypto/whrlpool... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/whrlpool' whrlpool.h => ../../include/openssl/whrlpool.h wp_test.c => ../../test/wp_test.c make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/whrlpool' making links in crypto/des... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/des' des.h => ../../include/openssl/des.h des_old.h => ../../include/openssl/des_old.h destest.c => ../../test/destest.c make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/des' making links in crypto/aes... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/aes' aes.h => ../../include/openssl/aes.h make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/aes' making links in crypto/rc2... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/rc2' rc2.h => ../../include/openssl/rc2.h rc2test.c => ../../test/rc2test.c make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/rc2' making links in crypto/rc4... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/rc4' rc4.h => ../../include/openssl/rc4.h rc4test.c => ../../test/rc4test.c make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/rc4' making links in crypto/idea... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/idea' idea.h => ../../include/openssl/idea.h ideatest.c => ../../test/ideatest.c make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/idea' making links in crypto/bf... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/bf' blowfish.h => ../../include/openssl/blowfish.h bftest.c => ../../test/bftest.c make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/bf' making links in crypto/cast... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/cast' cast.h => ../../include/openssl/cast.h casttest.c => ../../test/casttest.c make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/cast' making links in crypto/camellia... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/camellia' camellia.h => ../../include/openssl/camellia.h make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/camellia' making links in crypto/seed... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/seed' seed.h => ../../include/openssl/seed.h make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/seed' making links in crypto/bn... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/bn' bn.h => ../../include/openssl/bn.h bntest.c => ../../test/bntest.c exptest.c => ../../test/exptest.c make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/bn' making links in crypto/ec... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/ec' ec.h => ../../include/openssl/ec.h ectest.c => ../../test/ectest.c make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/ec' making links in crypto/rsa... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/rsa' rsa.h => ../../include/openssl/rsa.h rsa_test.c => ../../test/rsa_test.c make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/rsa' making links in crypto/dsa... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/dsa' dsa.h => ../../include/openssl/dsa.h dsatest.c => ../../test/dsatest.c make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/dsa' making links in crypto/ecdsa... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/ecdsa' ecdsa.h => ../../include/openssl/ecdsa.h ecdsatest.c => ../../test/ecdsatest.c make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/ecdsa' making links in crypto/dh... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/dh' dh.h => ../../include/openssl/dh.h dhtest.c => ../../test/dhtest.c make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/dh' making links in crypto/ecdh... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/ecdh' ecdh.h => ../../include/openssl/ecdh.h ecdhtest.c => ../../test/ecdhtest.c make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/ecdh' making links in crypto/dso... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/dso' dso.h => ../../include/openssl/dso.h make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/dso' making links in crypto/engine... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/engine' engine.h => ../../include/openssl/engine.h enginetest.c => ../../test/enginetest.c make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/engine' making links in crypto/buffer... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/buffer' buffer.h => ../../include/openssl/buffer.h make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/buffer' making links in crypto/bio... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/bio' bio.h => ../../include/openssl/bio.h make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/bio' making links in crypto/stack... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/stack' stack.h => ../../include/openssl/stack.h safestack.h => ../../include/openssl/safestack.h make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/stack' making links in crypto/lhash... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/lhash' lhash.h => ../../include/openssl/lhash.h make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/lhash' making links in crypto/rand... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/rand' rand.h => ../../include/openssl/rand.h randtest.c => ../../test/randtest.c make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/rand' making links in crypto/err... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/err' err.h => ../../include/openssl/err.h make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/err' making links in crypto/evp... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/evp' evp.h => ../../include/openssl/evp.h evp_test.c => ../../test/evp_test.c cp evptests.txt ../../test make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/evp' making links in crypto/asn1... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/asn1' asn1.h => ../../include/openssl/asn1.h asn1_mac.h => ../../include/openssl/asn1_mac.h asn1t.h => ../../include/openssl/asn1t.h make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/asn1' making links in crypto/pem... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/pem' pem.h => ../../include/openssl/pem.h pem2.h => ../../include/openssl/pem2.h make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/pem' making links in crypto/x509... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/x509' x509.h => ../../include/openssl/x509.h x509_vfy.h => ../../include/openssl/x509_vfy.h make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/x509' making links in crypto/x509v3... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/x509v3' x509v3.h => ../../include/openssl/x509v3.h make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/x509v3' making links in crypto/conf... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/conf' conf.h => ../../include/openssl/conf.h conf_api.h => ../../include/openssl/conf_api.h make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/conf' making links in crypto/txt_db... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/txt_db' txt_db.h => ../../include/openssl/txt_db.h make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/txt_db' making links in crypto/pkcs7... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/pkcs7' pkcs7.h => ../../include/openssl/pkcs7.h make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/pkcs7' making links in crypto/pkcs12... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/pkcs12' pkcs12.h => ../../include/openssl/pkcs12.h make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/pkcs12' making links in crypto/comp... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/comp' comp.h => ../../include/openssl/comp.h make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/comp' making links in crypto/ocsp... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/ocsp' ocsp.h => ../../include/openssl/ocsp.h make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/ocsp' making links in crypto/ui... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/ui' ui.h => ../../include/openssl/ui.h ui_compat.h => ../../include/openssl/ui_compat.h make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/ui' making links in crypto/krb5... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/krb5' krb5_asn.h => ../../include/openssl/krb5_asn.h make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/krb5' making links in crypto/cms... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/cms' cms.h => ../../include/openssl/cms.h make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/cms' making links in crypto/pqueue... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/pqueue' pqueue.h => ../../include/openssl/pqueue.h make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/pqueue' making links in crypto/ts... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/crypto/ts' ts.h => ../../include/openssl/ts.h make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto/ts' make[1]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/crypto' making links in ssl... make[1]: Entering directory `/c/Downloads/openssl-SNAP-20080729/ssl' ssl.h => ../include/openssl/ssl.h ssl2.h => ../include/openssl/ssl2.h ssl3.h => ../include/openssl/ssl3.h ssl23.h => ../include/openssl/ssl23.h tls1.h => ../include/openssl/tls1.h dtls1.h => ../include/openssl/dtls1.h kssl.h => ../include/openssl/kssl.h ssltest.c => ../test/ssltest.c make[1]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/ssl' making links in engines... make[1]: Entering directory `/c/Downloads/openssl-SNAP-20080729/engines' making links in engines/ccgost... make[2]: Entering directory `/c/Downloads/openssl-SNAP-20080729/engines/ccgost' make[2]: Nothing to be done for `links'. make[2]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/engines/ccgost' make[1]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/engines' making links in apps... make[1]: Entering directory `/c/Downloads/openssl-SNAP-20080729/apps' make[1]: Nothing to be done for `links'. make[1]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/apps' making links in test... make[1]: Entering directory `/c/Downloads/openssl-SNAP-20080729/test' make[1]: Nothing to be done for `links'. make[1]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/test' making links in tools... make[1]: Entering directory `/c/Downloads/openssl-SNAP-20080729/tools' make[1]: Nothing to be done for `links'. make[1]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/tools' generating dummy tests (if needed)... make[1]: Entering directory `/c/Downloads/openssl-SNAP-20080729/test' make[1]: Nothing to be done for `generate'. make[1]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/test' Configured for mingw. $ make (...) gcc -I../include -DOPENSSL_THREADS -DDSO_WIN32 -mno-cygwin -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -DWHIRLPOOL_ASM -c -o e_capi.o e_capi.c e_capi.c: In function `capi_ctrl': e_capi.c:321: error: `CERT_SYSTEM_STORE_CURRENT_USER' undeclared (first use in this function) e_capi.c:321: error: (Each undeclared identifier is reported only once e_capi.c:321: error: for each function it appears in.) e_capi.c: In function `capi_get_pkey': e_capi.c:651: error: `DSSPUBKEY' undeclared (first use in this function) e_capi.c:651: error: `dp' undeclared (first use in this function) e_capi.c:654: error: syntax error before ')' token e_capi.c:698: warning: long unsigned int format, ALG_ID arg (arg 4) e_capi.c: In function `capi_rsa_sign': e_capi.c:793: error: `CALG_SSL3_SHAMD5' undeclared (first use in this function) e_capi.c:798: warning: long unsigned int format, int arg (arg 4) e_capi.c: In function `capi_rsa_priv_dec': e_capi.c:892: warning: passing arg 6 of `CryptDecrypt' from incompatible pointer type e_capi.c: In function `capi_get_provname': e_capi.c:1056: warning: implicit declaration of function `CryptEnumProviders' e_capi.c: In function `capi_list_providers': e_capi.c:1095: warning: int format, DWORD arg (arg 3) e_capi.c:1095: warning: int format, DWORD arg (arg 5) e_capi.c: In function `capi_list_containers': e_capi.c:1154: warning: int format, DWORD arg (arg 3) e_capi.c: At top level: e_capi.c:1168: error: syntax error before '*' token e_capi.c:1169: warning: return type defaults to `int' e_capi.c: In function `capi_get_prov_info': e_capi.c:1171: error: `CRYPT_KEY_PROV_INFO' undeclared (first use in this function) e_capi.c:1171: error: `pinfo' undeclared (first use in this function) e_capi.c:1173: warning: implicit declaration of function `CertGetCertificateContextProperty' e_capi.c:1173: error: `CERT_KEY_PROV_INFO_PROP_ID' undeclared (first use in this function) e_capi.c: At top level: e_capi.c:1191: error: syntax error before "CRYPT_KEY_PROV_INFO" e_capi.c: In function `capi_dump_prov_info': e_capi.c:1194: error: `pinfo' undeclared (first use in this function) e_capi.c:1196: error: `out' undeclared (first use in this function) e_capi.c: In function `capi_cert_get_fname': e_capi.c:1220: error: `CERT_FRIENDLY_NAME_PROP_ID' undeclared (first use in this function) e_capi.c: In function `capi_dump_cert': e_capi.c:1256: warning: passing arg 2 of `d2i_X509' from incompatible pointer type e_capi.c:1272: error: `CRYPT_KEY_PROV_INFO' undeclared (first use in this function) e_capi.c:1272: error: `pinfo' undeclared (first use in this function) e_capi.c: In function `capi_open_store': e_capi.c:1294: error: `CERT_STORE_PROV_SYSTEM_A' undeclared (first use in this function) e_capi.c: In function `capi_list_certs': e_capi.c:1335: warning: unused variable `fname' e_capi.c: In function `capi_get_cert_key': e_capi.c:1413: error: `CRYPT_KEY_PROV_INFO' undeclared (first use in this function) e_capi.c:1413: error: `pinfo' undeclared (first use in this function) e_capi.c: In function `capi_ctx_new': e_capi.c:1495: error: `CERT_STORE_READONLY_FLAG' undeclared (first use in this function) e_capi.c:1496: error: `CERT_SYSTEM_STORE_CURRENT_USER' undeclared (first use in this function) e_capi.c: In function `capi_load_ssl_client_cert': e_capi.c:1599: warning: passing arg 2 of `d2i_X509' from incompatible pointer type make[1]: *** [e_capi.o] Error 1 make[1]: Leaving directory `/c/Downloads/openssl-SNAP-20080729/engines' make: *** [build_engines] Error 1 Looking wincrypt.h from wine[3] or msdn[2] there is these defines, and I wouldn´t find newer versions of w32api that it could provides theses defines. I´ll appreciate any help for this question. Thanks for advance! [1] - http://rt.openssl.org/index.html?q=1693 [2] - http://doc.ddart.net/msdn/header/include/wincrypt.h.html [3] - http://source.winehq.org/source/include/wincrypt.h -- Amadeu A. Barbosa Jr :: http://www.inf.puc-rio.br/~ajunior ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]