<html><head></head><body><div style="color:#000; background-color:#fff; font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px"><div id="yui_3_16_0_ym19_1_1482458793586_134050">I am using a MinGW64 / MSYS2 environment to compile OpenSSL1.1.0c, but failing consistently after multiple attempts with a few variations each attempt (including deleting entire source directory and re-untar/ungzipping).   I believe there's something wrong either with my environment settings or ./Configure options.  This is the output of ./Configure after setting only the CFLAGS env var:</div><div id="yui_3_16_0_ym19_1_1482458793586_133526"><br></div><div id="yui_3_16_0_ym19_1_1482458793586_133516" dir="ltr">$ export "CFLAGS=-03"</div><div dir="ltr" id="yui_3_16_0_ym19_1_1482458793586_133525">$ ./Configure mingw64 --prefix=/usr/local zlib shared<br id="yui_3_16_0_ym19_1_1482458793586_133668">Configuring OpenSSL version 1.1.0c (0x1010003fL)<br id="yui_3_16_0_ym19_1_1482458793586_133669">    no-asan         [default]  OPENSSL_NO_ASAN<br id="yui_3_16_0_ym19_1_1482458793586_133670">    no-crypto-mdebug [default]  OPENSSL_NO_CRYPTO_MDEBUG<br id="yui_3_16_0_ym19_1_1482458793586_133671">    no-crypto-mdebug-backtrace [default]  OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE<br id="yui_3_16_0_ym19_1_1482458793586_133672">    no-ec_nistp_64_gcc_128 [default]  OPENSSL_NO_EC_NISTP_64_GCC_128<br id="yui_3_16_0_ym19_1_1482458793586_133673">    no-egd          [default]  OPENSSL_NO_EGD<br id="yui_3_16_0_ym19_1_1482458793586_133674">    no-fuzz-afl     [default]  OPENSSL_NO_FUZZ_AFL<br id="yui_3_16_0_ym19_1_1482458793586_133675">    no-fuzz-libfuzzer [default]  OPENSSL_NO_FUZZ_LIBFUZZER<br id="yui_3_16_0_ym19_1_1482458793586_133676">    no-heartbeats   [default]  OPENSSL_NO_HEARTBEATS<br id="yui_3_16_0_ym19_1_1482458793586_133677">    no-md2          [default]  OPENSSL_NO_MD2 (skip dir)<br id="yui_3_16_0_ym19_1_1482458793586_133678">    no-msan         [default]  OPENSSL_NO_MSAN<br id="yui_3_16_0_ym19_1_1482458793586_133679">    no-rc5          [default]  OPENSSL_NO_RC5 (skip dir)<br id="yui_3_16_0_ym19_1_1482458793586_133680">    no-sctp         [default]  OPENSSL_NO_SCTP<br id="yui_3_16_0_ym19_1_1482458793586_133681">    no-ssl-trace    [default]  OPENSSL_NO_SSL_TRACE<br id="yui_3_16_0_ym19_1_1482458793586_133682">    no-ssl3         [default]  OPENSSL_NO_SSL3<br id="yui_3_16_0_ym19_1_1482458793586_133683">    no-ssl3-method  [default]  OPENSSL_NO_SSL3_METHOD<br id="yui_3_16_0_ym19_1_1482458793586_133684">    no-ubsan        [default]  OPENSSL_NO_UBSAN<br id="yui_3_16_0_ym19_1_1482458793586_133685">    no-unit-test    [default]  OPENSSL_NO_UNIT_TEST<br id="yui_3_16_0_ym19_1_1482458793586_133686">    no-weak-ssl-ciphers [default]  OPENSSL_NO_WEAK_SSL_CIPHERS<br id="yui_3_16_0_ym19_1_1482458793586_133687">    no-zlib-dynamic [default]<br id="yui_3_16_0_ym19_1_1482458793586_133688">Configuring for mingw64<br id="yui_3_16_0_ym19_1_1482458793586_133689">CC            =gcc<br id="yui_3_16_0_ym19_1_1482458793586_133690">CFLAG         =-DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -m64 -Wall -O3 -D_MT<br id="yui_3_16_0_ym19_1_1482458793586_133691">SHARED_CFLAG  =-D_WINDLL<br id="yui_3_16_0_ym19_1_1482458793586_133692">DEFINES       =ZLIB DSO_WIN32 NDEBUG OPENSSL_THREADS OPENSSL_NO_STATIC_ENGINE OPENSSL_PIC OPENSSL_IA32_SSE2 OPENSSL_BN_ASM_MONT OPENSSL_BN_ASM_MONT5 OPENSSL_BN_ASM_GF2m SHA1_ASM SHA256_ASM SHA512_ASM RC4_ASM MD5_ASM AES_ASM VPAES_ASM BSAES_ASM GHASH_ASM ECP_NISTZ256_ASM POLY1305_ASM<br id="yui_3_16_0_ym19_1_1482458793586_133693">LFLAG         =<br id="yui_3_16_0_ym19_1_1482458793586_133694">PLIB_LFLAG    =<br id="yui_3_16_0_ym19_1_1482458793586_133695">EX_LIBS       =-lz -lws2_32 -lgdi32 -lcrypt32<br id="yui_3_16_0_ym19_1_1482458793586_133696">APPS_OBJ      =win32_init.o<br id="yui_3_16_0_ym19_1_1482458793586_133697">CPUID_OBJ     =x86_64cpuid.o<br id="yui_3_16_0_ym19_1_1482458793586_133698">UPLINK_OBJ    =<br id="yui_3_16_0_ym19_1_1482458793586_133699">BN_ASM        =asm/x86_64-gcc.o x86_64-mont.o x86_64-mont5.o x86_64-gf2m.o rsaz_exp.o rsaz-x86_64.o rsaz-avx2.o<br id="yui_3_16_0_ym19_1_1482458793586_133700">EC_ASM        =ecp_nistz256.o ecp_nistz256-x86_64.o<br id="yui_3_16_0_ym19_1_1482458793586_133701">DES_ENC       =des_enc.o fcrypt_b.o<br id="yui_3_16_0_ym19_1_1482458793586_133702">AES_ENC       =aes-x86_64.o vpaes-x86_64.o bsaes-x86_64.o aesni-x86_64.o aesni-sha1-x86_64.o aesni-sha256-x86_64.o aesni-mb-x86_64.o<br id="yui_3_16_0_ym19_1_1482458793586_133703">BF_ENC        =bf_enc.o<br id="yui_3_16_0_ym19_1_1482458793586_133704">CAST_ENC      =c_enc.o<br id="yui_3_16_0_ym19_1_1482458793586_133705">RC4_ENC       =rc4-x86_64.o rc4-md5-x86_64.o<br id="yui_3_16_0_ym19_1_1482458793586_133706">RC5_ENC       =rc5_enc.o<br id="yui_3_16_0_ym19_1_1482458793586_133707">MD5_OBJ_ASM   =md5-x86_64.o<br id="yui_3_16_0_ym19_1_1482458793586_133708">SHA1_OBJ_ASM  =sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o sha1-mb-x86_64.o sha256-mb-x86_64.o<br id="yui_3_16_0_ym19_1_1482458793586_133709">RMD160_OBJ_ASM=<br id="yui_3_16_0_ym19_1_1482458793586_133710">CMLL_ENC      =cmll-x86_64.o cmll_misc.o<br id="yui_3_16_0_ym19_1_1482458793586_133711">MODES_OBJ     =ghash-x86_64.o aesni-gcm-x86_64.o<br id="yui_3_16_0_ym19_1_1482458793586_133712">PADLOCK_OBJ   =e_padlock-x86_64.o<br id="yui_3_16_0_ym19_1_1482458793586_133713">CHACHA_ENC    =chacha-x86_64.o<br id="yui_3_16_0_ym19_1_1482458793586_133714">POLY1305_OBJ  =poly1305-x86_64.o<br id="yui_3_16_0_ym19_1_1482458793586_133715">BLAKE2_OBJ    =<br id="yui_3_16_0_ym19_1_1482458793586_133716">PROCESSOR     =<br id="yui_3_16_0_ym19_1_1482458793586_133717">RANLIB        =ranlib<br id="yui_3_16_0_ym19_1_1482458793586_133718">ARFLAGS       =<br id="yui_3_16_0_ym19_1_1482458793586_133719">PERL          =C:\msys64\mingw64\bin\perl.exe<br id="yui_3_16_0_ym19_1_1482458793586_133720"><br id="yui_3_16_0_ym19_1_1482458793586_133721">SIXTY_FOUR_BIT mode<br id="yui_3_16_0_ym19_1_1482458793586_133722"><br id="yui_3_16_0_ym19_1_1482458793586_133723">Configured for mingw64.<br id="yui_3_16_0_ym19_1_1482458793586_133724"></div><div dir="ltr" id="yui_3_16_0_ym19_1_1482458793586_133761"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1482458793586_133769">$ make<br id="yui_3_16_0_ym19_1_1482458793586_133833">C:\msys64\mingw64\bin\perl.exe "-I." -Mconfigdata "util\dofile.pl" \<br id="yui_3_16_0_ym19_1_1482458793586_133834">    "-oMakefile" crypto\include\internal\bn_conf.h.in > crypto\include\internal\bn_conf.h<br id="yui_3_16_0_ym19_1_1482458793586_133835">/bin/sh: C:msys64mingw64binperl.exe: command not found<br id="yui_3_16_0_ym19_1_1482458793586_133836">make: *** [Makefile:701: crypto\include\internal\bn_conf.h] Error 127<br id="yui_3_16_0_ym19_1_1482458793586_133837"></div><div dir="ltr" id="yui_3_16_0_ym19_1_1482458793586_133937"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1482458793586_133905"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1482458793586_133873">It seems the "\" is the culprit here, since the execution of the make command appears to strip those out and then (as expected) the /bin/sh cannot recognize that large hash of what should have been the path to Perl.  I did edit the first Makefile above to :</div><div dir="ltr" id="yui_3_16_0_ym19_1_1482458793586_134114">    Change the base PERL to "C:/msys64/mingw64/bin/perl.exe", *and*<br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1482458793586_133880">    crypto/include/internal/bin_conf.h.in > crypto/include/internal/bin_conf.h</div><div dir="ltr" id="yui_3_16_0_ym19_1_1482458793586_133888"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1482458793586_133896">The above worked, but *only* for that line of the make file (as I expected).  It then fails at the very next line because I didn't edit every "\" to become "/" instead.  I'm not sure I'm willing to do that much editing... seems there's got to be a better way to make this work.<br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1482458793586_133927"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1482458793586_133926">I realize this has something to do with specifying ./Configure mingw64 .... and how it's populating the Makefiles using Windows-style paths, but I'm not sure it's safe / okay to fake having a Unix build target instead, since this will likely create new / other problems with libraries, etc.</div><div dir="ltr" id="yui_3_16_0_ym19_1_1482458793586_134141"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1482458793586_134180">Am I missing a ./Configure option, an environment variable I should preset, or something else altogether?</div><div dir="ltr" id="yui_3_16_0_ym19_1_1482458793586_134181"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1482458793586_134182"><br></div><div id="yui_3_16_0_ym19_1_1482458793586_133357"><br></div></div></body></html>