jedisct1 / libsodium

A modern, portable, easy to use crypto library.
https://libsodium.org
Other
12.18k stars 1.73k forks source link

failed build on Windows #962

Closed caobug closed 4 years ago

caobug commented 4 years ago
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: crypto_generichash/blake2b/ref/.libs/libsodium_la-blake2b-ref.o:blake2b-ref.c:(.text+0x4f8): undefined reference to `__memcpy_chk'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: crypto_generichash/blake2b/ref/.libs/libsodium_la-blake2b-ref.o:blake2b-ref.c:(.text+0x652): undefined reference to `__memcpy_chk'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: crypto_generichash/blake2b/ref/.libs/libsodium_la-blake2b-ref.o:blake2b-ref.c:(.text+0xa3e): undefined reference to `__memcpy_chk'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: crypto_generichash/blake2b/ref/.libs/libsodium_la-blake2b-ref.o:blake2b-ref.c:(.text+0xd36): undefined reference to `__memcpy_chk'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: crypto_pwhash/argon2/.libs/libsodium_la-argon2-encoding.o:argon2-encoding.c:(.text+0x6b0): undefined reference to `__memcpy_chk'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: crypto_pwhash/argon2/.libs/libsodium_la-argon2-encoding.o:argon2-encoding.c:(.text+0x8a8): more undefined references to `__memcpy_chk' follow
collect2.exe: error: ld returned 1 exit status
jedisct1 commented 4 years ago

A workaround for that issue was added 6 months ago :)

Use libsodium-1.0.18-stable. Precompiled binaries for mingw are also available https://download.libsodium.org/libsodium/releases/