Skip to content
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

Windows: Build fails when using OQS_MINIMAL_BUILD #482

Open
fwh-dc opened this issue Aug 15, 2024 · 2 comments
Open

Windows: Build fails when using OQS_MINIMAL_BUILD #482

fwh-dc opened this issue Aug 15, 2024 · 2 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@fwh-dc
Copy link
Contributor

fwh-dc commented Aug 15, 2024

Describe the bug
I've built a liboqs with cmake arg -DOQS_MINIMAL_BUILD="KEM_kyber;OQS_ENABLE_KEM_kyber_512;OQS_ENABLE_KEM_kyber_768;OQS_ENABLE_KEM_kyber_1024;"

When building oqs-provider on windows I get

C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\cl.exe  /nologo -DOQSPROVIDER_VERSION_TEXT=\"0.5.3\" -DOQS_PROVIDER_COMMIT="\" (42ff366)\"" -DOQS_PROVIDER_NOATOMIC -DOQS_PROVIDER_STATIC -D_CRT_SECURE_NO_WARNINGS -external:IC:\Users\****\build\debug\windows\x86_64\install\include -external:IC:\Users\****\build\debug\windows\x86_64\install\include\oqs -external:W0 /DWIN32 /D_WINDOWS /Zi /Ob0 /Od /RTC1 -std:c11 -MDd /showIncludes /Fooqsprov\CMakeFiles\oqsprovider.dir\oqsprov_capabilities.c.obj /Fdoqsprov\CMakeFiles\oqsprovider.dir\oqsprovider.pdb /FS -c C:\Users\****\oqs-provider\oqsprov\oqsprov_capabilities.c
14:47:40  C:\Users\****\oqs-provider\oqsprov\oqsprov_capabilities.c(222): error C2059: syntax error: '}'
14:47:40  C:\Users\****\oqs-provider\oqsprov\oqsprov_capabilities.c(437): warning C4034: sizeof returns 0
14:47:40  C:\Users\****\oqs-provider\oqsprov\oqsprov_capabilities.c(535): error C2059: syntax error: '}'
14:47:40  C:\Users\****\oqs-provider\oqsprov\oqsprov_capabilities.c(543): warning C4034: sizeof returns 0
14:47:40  C:\Users\****\oqs-provider\oqsprov\oqsprov_capabilities.c(544): warning C4034: sizeof returns 0

Expected behavior
I'm not sure what the actual fix should be but I would expect compilation to succeed.

Environment (please complete the following information):

  • OS: windows
  • liboqs (0.9.2).
  • oqsprovider version 0.5.3
@fwh-dc fwh-dc added the bug Something isn't working label Aug 15, 2024
@baentsch
Copy link
Member

Correct expectation. But there's not too many people on the team that use or have experience with Windows. I used to spend many hours trying to understand / get stuff tested on that platform, but those hours are now taken away by discussions about process and procedure with LinuxFoundation, Sorry.

Anyone else reading, by all means please chip in your Windows experience!

@fwh-dc if this is related to your work on DTLS13, any chance this could be done on a Unixish platform?

@fwh-dc
Copy link
Contributor Author

fwh-dc commented Aug 16, 2024

@fwh-dc if this is related to your work on DTLS13, any chance this could be done on a Unixish platform?

No it's unrelated. We are building apps for all major platforms that should be upgraded with pqc TLS for a start (DTLS will come later). And I am more mac/unix oriented too.

I did a little digging. Turns out that no algorithms were enabled at all (somehow an issue with cmake externalproject and argument parsing). So I've fixed that part to correctly allow only Kyber.

I think I've found a workaround which is to enable at least one KEM and one signature algorithm. If there are no signature algorithms or KEMs enabled then oqs_param_sigalg_list and/or oqs_param_group_list are empty which causes windows to fail compilation.

@baentsch baentsch added the help wanted Extra attention is needed label Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants