Es war ein steiniger Weg mit der Kompilierung von openssl-1.1.0e auf meinem Windows 7 VM.Kompilieren von openssl-1.1.0e unter Windows mit msys2
Zuerst einige msys2-Pakete mit dem folgenden Befehl aus der msys2-Shell;
pacman -S make gcc perl
Die Quelle wurde mit konfiguriert;
./Configure mingw
Dann;
make depend && make
Es gab ein Problem mit den Dateien;
crypto/init.c
crypto/dso/dso_win32.c
Beide beschwerten sich über Windows-Funktionen. Hinzufügen;
#include <windows.h>
zu beiden an der Spitze mit den anderen umfasst, dass das Problem gelöst.
Leider klagt es jetzt ein bisschen mehr, und es gibt nichts im Internet, das derzeit helfen kann. Hier ist das Wichtige;
make[2]: Entering directory '/builds/openssl-1.1.0e'
perl ./util/mkrc.pl libcrypto-1_1.dll | windres --target=pe-i386 -o rc.o
LD_LIBRARY_PATH=: gcc -DOPENSSL_USE_APPLINK -DDSO_WIN32 -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_STATIC_ENGINE -DOPENSSL_PIC -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DRC4_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPADLOCK_ASM -DPOLY1305_ASM -DOPENSSLDIR="/usr/local/ssl" -DENGINESDIR="/usr/local/lib/engines-1_1" -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -m32 -Wall -O3 -fomit-frame-pointer -D_MT -D_WINDLL -static-libgcc -shared -Wl,-Bsymbolic -Wl,--out-implib,libcrypto.dll.a crypto.def rc.o -o ./libcrypto-1_1.dll -Wl,--whole-archive ./libcrypto.a -Wl,--no-whole-archive -lws2_32 -lgdi32 -lcrypt32
Cannot export RAND_event: symbol not defined
Cannot export RAND_screen: symbol not defined
./libcrypto.a(uplink.o):uplink.c:(.text+0x5e): undefined reference to `_sntprintf'
./libcrypto.a(uplink.o):uplink.c:(.text+0x75): undefined reference to `_tcscpy'
./libcrypto.a(uplink.o):uplink.c:(.text+0xcd): undefined reference to `_tcscpy'
./libcrypto.a(uplink.o):uplink.c:(.text+0x14e): undefined reference to `_tcscpy'
./libcrypto.a(uplink.o):uplink.c:(.text+0x179): undefined reference to `_tcscpy'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile.shared:296: link_shlib.mingw] Error 1
make[2]: Leaving directory '/builds/openssl-1.1.0e'
make[1]: *** [Makefile:725: libcrypto.dll.a] Error 2
make[1]: Leaving directory '/builds/openssl-1.1.0e'
make: *** [Makefile:128: all] Error 2
Ehrlich gesagt bin ich ratlos. Irgendwelche Gedanken?
Warum nicht einfach installieren openssl Pacman mit? Wenn Sie es wirklich selbst bauen wollen, sollten Sie das [offizielle MSYS2 openssl PKGBUILD Skript] (https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-openssl) als Ausgangspunkt verwenden. –