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

error: ‘OQS_SIG_alg_mayo_1’ undeclared (first use in this function); did you mean ‘OQS_SIG_alg_count #541

Closed
vkosuri opened this issue Oct 13, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@vkosuri
Copy link

vkosuri commented Oct 13, 2024

While build oqsprovider is failing with signature mayo algorithms.

OpenSSL: 3.2
Liboqs: 0.10.0
OQS-Provider: 0.7.0

Liboqs and provider Build Parameters

# liboqs
cmake -S . -B _build -DCMAKE_ASM_FLAGS=-Wa,--noexecstack \
        -DOPENSSL_ROOT_DIR=/opt/openssl \
        -DCMAKE_BUILD_TYPE=Release \
        -DOQS_DIST_BUILD=OFF \
        -DOQS_ALGS_ENABLED=STD \
        -DOQS_OPT_TARGET=generic \
        -DCMAKE_INSTALL_PREFIX=/opt/liboqs

# Provider
cmake -S . -B _build \
    -DCMAKE_ASM_FLAGS='-Wa,--noexecstack' \
    -DOPENSSL_ROOT_DIR="/opt/openssl" \
    -DCMAKE_BUILD_TYPE="Release" \
    -DOQS_DIST_BUILD="OFF" \
    -DOQS_ALGS_ENABLED="STD" \
    -DOQS_OPT_TARGET="generic" \
    -DCMAKE_INSTALL_PREFIX="/opt/"

Error log

+ echo 'Building oqs-provider...'
Building oqs-provider...
+ cd /opt/oqs-provider-0.7.0
+ mkdir -p _build
+ liboqs_DIR=/opt/liboqs
+ OQS_ALGS_ENABLED=STD
+ cmake -S . -B _build -DOPENSSL_ROOT_DIR=/opt/openssl -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF
-- The C compiler identification is GNU 10.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Creating Release build
-- Build will store public keys in PKCS#8 structures
-- Found OpenSSL: /opt/openssl/lib/libcrypto.so (found suitable version "3.2.0", minimum required is "3.0")
-- liboqs found: Include dir at /opt/liboqs/include;/opt/liboqs/include/oqs (STATIC_LIBRARY)
fatal: not a git repository (or any of the parent directories): .git
-- Building commit  in /opt/oqs-provider-0.7.0
-- Configuring done
-- Generating done
-- Build files have been written to: /opt/oqs-provider-0.7.0/_build
+ echo 'Building oqs-provider...'
Building oqs-provider...
++ nproc
+ cmake --build _build --parallel 8

Scanning dependencies of target oqsprovider
gmake[3]: Leaving directory '/opt/oqs-provider-0.7.0/_build'
gmake[3]: Entering directory '/opt/oqs-provider-0.7.0/_build'
[ 18%] Building C object oqsprov/CMakeFiles/oqsprovider.dir/oqsprov.c.o
[ 18%] Building C object oqsprov/CMakeFiles/oqsprovider.dir/oqsprov_capabilities.c.o
[ 27%] Building C object oqsprov/CMakeFiles/oqsprovider.dir/oqsprov_keys.c.o
[ 36%] Building C object oqsprov/CMakeFiles/oqsprovider.dir/oqs_encode_key2any.c.o
[ 45%] Building C object oqsprov/CMakeFiles/oqsprovider.dir/oqs_kmgmt.c.o
[ 54%] Building C object oqsprov/CMakeFiles/oqsprovider.dir/oqs_kem.c.o
[ 63%] Building C object oqsprov/CMakeFiles/oqsprovider.dir/oqs_sig.c.o
[ 72%] Building C object oqsprov/CMakeFiles/oqsprovider.dir/oqs_endecoder_common.c.o
/opt/oqs-provider-0.7.0/oqsprov/oqsprov_keys.c:196:18: error: ‘OQS_SIG_alg_mayo_1’ undeclared here (not in a function); did you mean ‘OQS_SIG_alg_count’?
  196 |     {0, "mayo1", OQS_SIG_alg_mayo_1, KEY_TYPE_SIG, 128},
      |                  ^~~~~~~~~~~~~~~~~~
      |                  OQS_SIG_alg_count
/opt/oqs-provider-0.7.0/oqsprov/oqsprov_keys.c:198:18: error: ‘OQS_SIG_alg_mayo_2’ undeclared here (not in a function); did you mean ‘OQS_SIG_alg_count’?
  198 |     {0, "mayo2", OQS_SIG_alg_mayo_2, KEY_TYPE_SIG, 128},
      |                  ^~~~~~~~~~~~~~~~~~
      |                  OQS_SIG_alg_count
/opt/oqs-provider-0.7.0/oqsprov/oqs_kmgmt.c: In function ‘mayo1_new_key’:
/opt/oqs-provider-0.7.0/oqsprov/oqs_kmgmt.c:1170:54: error: ‘OQS_SIG_alg_mayo_1’ undeclared (first use in this function); did you mean ‘OQS_SIG_alg_count’?
 1170 |     return oqsx_key_new(PROV_OQS_LIBCTX_OF(provctx), OQS_SIG_alg_mayo_1,
      |                                                      ^~~~~~~~~~~~~~~~~~
      |                                                      OQS_SIG_alg_count

OS Release

root@832081ca4b07:/oqsbuild# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
@vkosuri vkosuri added the bug Something isn't working label Oct 13, 2024
@baentsch
Copy link
Member

Mayo is only present fromliboqs 0.11.0: Please upgrade that lib.

@vkosuri
Copy link
Author

vkosuri commented Oct 13, 2024 via email

@baentsch
Copy link
Member

Thanks is there way to skip mao algo from configure options?

On Sun, 13 Oct 2024 at 10:24, Michael Baentsch @.> wrote: Mayo is only present fromliboqs 0.11.0: Please upgrade that lib. — Reply to this email directly, view it on GitHub <#541 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADIIAAIMAHUCTPTBFULBHIDZ3H4HRAVCNFSM6AAAAABP2577J2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBYHAZDGNBRGI . You are receiving this because you authored the thread.Message ID: @.>

Yes see documentation of config options

@vkosuri
Copy link
Author

vkosuri commented Oct 13, 2024

I am passing the OQS_ALGS_ENABLED="STD" https://github.com/open-quantum-safe/liboqs/blob/9aa2e1481cd0c242658ec8e92776741feabec163/.CMake/alg_support.cmake#L213, where mayo wasn't enabled. Still, I see failures while building. Do I need to disable it explicitly?

# Provider
cmake -S . -B _build \
    -DCMAKE_ASM_FLAGS='-Wa,--noexecstack' \
    -DOPENSSL_ROOT_DIR="/opt/openssl" \
    -DCMAKE_BUILD_TYPE="Release" \
    -DOQS_DIST_BUILD="OFF" \
    -DOQS_ALGS_ENABLED="STD" \
    -DOQS_OPT_TARGET="generic" \
    -DCMAKE_INSTALL_PREFIX="/opt/"

@baentsch
Copy link
Member

Do I need to disable it explicitly?

You need to completely remove code catering for Mayo using "generate.py" (see pre-build config). You can use the file https://github.com/open-quantum-safe/oqs-provider/blob/main/oqs-template/generate.yml-0.10.0 for this purpose.

@praveksharma : This now unearths another shortcoming in the latest release: It did not create a suitable generate.yml-0.11.0 to allow people to build oqsprovider against a (future) downlevel liboqs (just as in the case discussed here where oqsprovider is built against an outdated liboqs version).

@vkosuri
Copy link
Author

vkosuri commented Oct 14, 2024

You need to completely remove code catering for Mayo using "generate.py" (see pre-build config). You can use the file https://github.com/open-quantum-safe/oqs-provider/blob/main/oqs-template/generate.yml-0.10.0 for this purpose.

This will additionally change our CI scripts. Can we create a support matrix for each oqs-provider release tag (#543)?

@baentsch
Copy link
Member

This will additionally change our CI scripts

Which CI scripts are you talking about? I'm not aware of an issue asking for an expansion of CI -- to the contrary, we have several long-standing issues to streamline CI runs (#248, #353) -- also with the goal to be(come) more responsible wrt resources this project utilizes.

@baentsch
Copy link
Member

@praveksharma : This now unearths another shortcoming in the latest release: It did not create a suitable generate.yml-0.11.0 to allow people to build oqsprovider against a (future) downlevel liboqs (just as in the case discussed here where oqsprovider is built against an outdated liboqs version).

@praveksharma , see (&review/approve) #544 and changes to the release wiki now capturing these items.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants