-
Notifications
You must be signed in to change notification settings - Fork 101
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
Fix a bug in the CMake script. #221
Conversation
Hmm -- CI fails... And the macOS log makes we wonder (again): Why in the world is |
No, the VM has both OpenSSL 1.1.1 and 3.1. Unlike oqs-provider which requires OpenSSL >3, liboqs doesn't provide a minimum required version for OpenSSL, so Do you want me to try to fix that? I guess we could just do
This is precisely the subject of this PR! It shouldn't have built a dylib in the first place, this was a mistake of mine. |
@thb-sb Linux again ... builds a .so so the new test for .a fails... |
Fixed in https://github.com/open-quantum-safe/oqs-provider/compare/8e0c642cdee3351220863a9a179168e1e2ee2968..0a64fdb4fcda5bfc7ce5e7a05a602d58858aa54e (another block I forgot…) |
PR [#207] introduced a check for setting the right suffix to the library, depending on the target OS: https://github.com/open-quantum-safe/oqs-provider/blob/823f3178dd50eeb5febf29eb82680400c4d9e887/oqsprov/CMakeLists.txt#L61-L7://github.com/open-quantum-safe/oqs-provider/blob/823f3178dd50eeb5febf29eb82680400c4d9e887/oqsprov/CMakeLists.txt#L61-L79 However, mixed with PR [#201] and the `OQS_PROVIDER_BUILD_STATIC` option, the library may be suffixed with the wrong extension: we may end up with a static library named `oqsprovider.dylib`, even if it's an archive: ```shell $ cmake -GNinja \ -DOQS_PROVIDER_BUILD_STATIC=ON \ -B build $ cmake --build build $ file build/lib/oqsprovider.dylib build/lib/oqsprovider.dylib: current ar archive random library $ # ^ should be named `oqsprovider.a`! ``` The check mentioned above is only relevant when oqsprovider is built as a module. This commit fixes this bug and introduces a check in the CircleCI jobs to verify that `oqsprovider.a` is actually produced. [#201](#201) [#207](#207)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix!
PR [open-quantum-safe#207] introduced a check for setting the right suffix to the library, depending on the target OS: https://github.com/open-quantum-safe/oqs-provider/blob/823f3178dd50eeb5febf29eb82680400c4d9e887/oqsprov/CMakeLists.txt#L61-L7://github.com/open-quantum-safe/oqs-provider/blob/823f3178dd50eeb5febf29eb82680400c4d9e887/oqsprov/CMakeLists.txt#L61-L79 However, mixed with PR [open-quantum-safe#201] and the `OQS_PROVIDER_BUILD_STATIC` option, the library may be suffixed with the wrong extension: we may end up with a static library named `oqsprovider.dylib`, even if it's an archive: ```shell $ cmake -GNinja \ -DOQS_PROVIDER_BUILD_STATIC=ON \ -B build $ cmake --build build $ file build/lib/oqsprovider.dylib build/lib/oqsprovider.dylib: current ar archive random library $ # ^ should be named `oqsprovider.a`! ``` The check mentioned above is only relevant when oqsprovider is built as a module. This commit fixes this bug and introduces a check in the CircleCI jobs to verify that `oqsprovider.a` is actually produced. [open-quantum-safe#201](open-quantum-safe#201) [open-quantum-safe#207](open-quantum-safe#207) Signed-off-by: Felipe Ventura <[email protected]>
PR [#207] introduced a check for setting the right suffix to the library, depending on the target OS:
https://github.com/open-quantum-safe/oqs-provider/blob/823f3178dd50eeb5febf29eb82680400c4d9e887/oqsprov/CMakeLists.txt#L61-L7://github.com/open-quantum-safe/oqs-provider/blob/823f3178dd50eeb5febf29eb82680400c4d9e887/oqsprov/CMakeLists.txt#L61-L79
However, mixed with PR [#201] and the
OQS_PROVIDER_BUILD_STATIC
option, the library may be suffixed with the wrong extension: we may end up with a static library namedoqsprovider.dylib
, even if it's an archive:$ cmake -GNinja \ -DOQS_PROVIDER_BUILD_STATIC=ON \ -B build $ cmake --build build $ file build/lib/oqsprovider.dylib build/lib/oqsprovider.dylib: current ar archive random library $ # ^ should be named `oqsprovider.a`!
The check mentioned above is only relevant when oqsprovider is built as a module.
This commit fixes this bug and introduces a check in the CircleCI jobs to verify that
oqsprovider.a
is actually produced.#201
#207