-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CI: Build on Windows #374
CI: Build on Windows #374
Conversation
Да, надо, как минимум, |
Ну идея собирать ENGINE с no-deprecated - это оксюморон. |
Теперь стали более релевантные ошибки. Но, осталось слишком много варнингов [deprecated] Since OpenSSL 3.0. |
Наверное, |
35161d6
to
231f659
Compare
С фиксами для MSVC? Я надеюсь, что смогу это пофиксить. Тогда будет логично принять сразу оба коммита. |
c507043
to
39c6ac8
Compare
Чем больше фикшу — тем больше новых ошибок вылезает. Пока дособиралось до |
Поправил сколько смог.
Теперь хотя бы можно тестировать корректность кода engine. |
Автотесты ругаются по делу |
Не осиливаю как сделать запуск тестов. Установил правильно
ps. Если что - |
А функция объявлена как __dllexport? Я сто лет как под винду не пытался собирать DLL-ки. |
Вроде я начал понимать. На виндах cmake не информативно пишет при сборке чего угодно
а потом
Думаю, новая сборка engine в виде библиотеки (из коммита d9a2b29) перезаписывает поверх старую сборку ps. Не собирать "библиотеку", например. Наверное так и делаю, так как на виндах это не актуально. |
Пока итог такой - > $env:PATH = "$env:PATH;$pwd\_dest\Program Files\OpenSSL\bin"
> $env:OPENSSL_MODULES = "$pwd\bin\Debug"
> $env:OPENSSL_CONF = "$pwd\test\provider.cnf"
> & '.\_dest\Program Files\OpenSSL\bin\openssl.exe' list -providers -verbose
Providers:
default
name: OpenSSL Default Provider
version: 3.1.0
status: active
build info: 3.1.0-dev
gettable provider parameters:
name: pointer to a UTF8 encoded string (arbitrary size)
version: pointer to a UTF8 encoded string (arbitrary size)
buildinfo: pointer to a UTF8 encoded string (arbitrary size)
status: integer (arbitrary size) Наверное, я отключу сборку ps. > & '.\_dest\Program Files\OpenSSL\bin\openssl.exe' list -provider gostprov
list: unable to load provider gostprov
Hint: use -provider-path option or OPENSSL_MODULES environment variable.
E0150000:error:1280006A:DSO support routines:win32_bind_func:could not bind to the requested symbol name:crypto\dso\dso_win32.c:184:symname(OSSL_provider_init)
E0150000:error:1280006A:DSO support routines:DSO_bind_func:could not bind to the requested symbol name:crypto\dso\dso_lib.c:176:
E0150000:error:078C0105:common libcrypto routines:provider_init:init fail:crypto\provider_core.c:906:name=gostprov Может тоже не хватило |
Видимо да.
Не понимаю как тогда у них прошли тесты на providers на виндах. Это не должно работать. |
I understood from openssl/openssl#17203 what's going on, or at least that part. I wonder if Cmake has some sort of mechanism for doing symbol exports in a platform agnostic way |
@levitte, yes. We consider the problem is lack of __dllexport OSSL_provider_init. Can it be so? |
Btw, When I added |
It is dllexport related indeed. |
I'm giving that Cmake mechanism a go |
GA cache issues are badly debuggable (for example it does not show from which cache restore is performed when prefixed keys are used). I think I will change cache logic a bit so such issues are more understandable (without use of prefixed restore keys). |
Uses actions/cache to speed up engine rebuilds. Signed-off-by: Vitaly Chikunov <[email protected]>
`/wd4996' disables deprecated declarations warning, this is analogous to `-Wno-error=deprecated-declarations'. Error example: gost_pmeth.c(39,17): warning C4996: 'EVP_PKEY_get0': Since OpenSSL 3.0 Signed-off-by: Vitaly Chikunov <[email protected]>
Since they are now global. Error message: cl : command line error D8021: invalid numeric argument '/Wno-error=deprecated-declarations' Fixes: 5dfb598 ("CMakeLists.txt: Workaround openssl deprecation of HMAC and CMAC primitives") Signed-off-by: Vitaly Chikunov <[email protected]>
Error message: gost_crypt.c(652,36): warning C4018: '<': signed/unsigned mismatch Signed-off-by: Vitaly Chikunov <[email protected]>
Errors are like this: gost_pmeth.c(188): warning C4702: unreachable code gost_grasshopper_cipher.c(909): warning C4702: unreachable code Signed-off-by: Vitaly Chikunov <[email protected]>
Error example: gost_md.c(54,45): error C2059: syntax error: ':' gost_md.c(67,5): error C2059: syntax error: 'if' gost_md.c(69,6): error C2143: syntax error: missing '{' before '->' gost_md.c(69,6): error C2059: syntax error: '->' gost_md.c(70,5): error C2059: syntax error: 'return' gost_md.c(71,1): error C2059: syntax error: '}' Signed-off-by: Vitaly Chikunov <[email protected]>
Un-inline `cipher_gost_grasshopper_ctracpkm'. Error message: gost_core.lib(gost_omac_acpkm.obj) : error LNK2019: unresolved external symbol cipher_gost_grasshopper_ctracpkm referenced in function CMAC_ACPKM_Init gost.dll : fatal error LNK1120: 1 unresolved externals Signed-off-by: Vitaly Chikunov <[email protected]>
Error message example: gost_prov_cipher.c(237,63): error C2059: syntax error: '}' Signed-off-by: Vitaly Chikunov <[email protected]>
These planned to be removed later anyway. Error message: gosthash2012_ref.h(15,18): warning C4081: expected '('; found 'string' Signed-off-by: Vitaly Chikunov <[email protected]>
Now that GA cache issue is (hopefully) solved it should build correctly (without workarounds). At least it does on my branch. Extra thanks to @levitte for OpenSSL fixes! 🙏 |
@vt-alt Do you currently consider it mergeable? |
No need external library (Ws2_32.lib) if we can easily implement it. Error messages: gost_core.lib(gost_keyexpimp.obj) : error LNK2019: unresolved external symbol htonl referenced in function gost_kdftree2012_256 gost.dll : fatal error LNK1120: 1 unresolved externals Signed-off-by: Vitaly Chikunov <[email protected]>
Error message: test_ciphers.c(37,9): warning C4068: unknown pragma 'GCC' Signed-off-by: Vitaly Chikunov <[email protected]>
MSVC is not C99 compatible[1]. Errors: test_ciphers.c(312,25): error C2057: expected constant expression test_ciphers.c(312,25): error C2466: cannot allocate an array of constant size 0 test_ciphers.c(312,26): error C2133: 'c': unknown size Link: https://docs.microsoft.com/en-us/cpp/c-language/ansi-conformance Signed-off-by: Vitaly Chikunov <[email protected]>
Error messages: test_ciphers.c(329,5): error C2059: syntax error: '{' test_ciphers.c(329,5): error C2059: syntax error: '}' test_ciphers.c(329,5): error C2059: syntax error: ')' Signed-off-by: Vitaly Chikunov <[email protected]>
test_digest.c(513,2): warning C4389: '==': signed/unsigned mismatch test_digest.c(820,5): warning C4389: '==': signed/unsigned mismatch test_sign.c(241,22): warning C4389: '==': signed/unsigned mismatch test_params.c(1131,16): warning C4018: '<': signed/unsigned mismatch test_sign.c(241,22): warning C4389: '==': signed/unsigned mismatch Signed-off-by: Vitaly Chikunov <[email protected]>
Error message: gost12sum.c(13,10): fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory gost12sum.c(80,23): warning C4013: 'getopt' undefined; assuming extern returning int test_keyexpimp.c(7,10): fatal error C1083: Cannot open include file: 'arpa/inet.h': No such file or directory Signed-off-by: Vitaly Chikunov <[email protected]>
Error message: test_keyexpimp.c(111,11): warning C4013: 'setenv' undefined; assuming extern returning int Signed-off-by: Vitaly Chikunov <[email protected]>
Signed-off-by: Vitaly Chikunov <[email protected]>
Error message: OPENSSL_Uplink(00007FF9FB00F600,08): no OPENSSL_Applink Link: https://www.openssl.org/docs/faq.html#PROG3 Signed-off-by: Vitaly Chikunov <[email protected]>
Library form overwrites module form due to both having the same name `gost.dll'. As temporary workaround do not build library form on Windows, until we invent how to solve it properly. Currently, there is no known need of engine in the library form on Windows. Signed-off-by: Vitaly Chikunov <[email protected]>
This will skip tests on Windows, due to prove being `.bat' file and cmake will be unable to run it. Also, `HAVE_TEST2_V0' is renamed to be more meaningful. Signed-off-by: Vitaly Chikunov <[email protected]>
This will fix setting of OPENSSL_ENGINES in ctest on Windows. Signed-off-by: Vitaly Chikunov <[email protected]>
`OSSL_provider_init' requires dllexport attribute to be visible (and thus loadable) in DLL. Link: openssl/openssl#17203 Signed-off-by: Vitaly Chikunov <[email protected]>
I did small last minute change (added |
Merged. Many thanks! |
Правда куча ошибок при сборке. Гораздо больше чем тут #370
Может я как-то не так собрал openssl.