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

failed to build nginx #281

Closed
mktelos opened this issue Jun 8, 2024 · 2 comments
Closed

failed to build nginx #281

mktelos opened this issue Jun 8, 2024 · 2 comments

Comments

@mktelos
Copy link

mktelos commented Jun 8, 2024

running into the following issue when trying to build the nginx image

0.916 Scanning dependencies of target oqsprovider
0.984 [  3%] Building C object oqsprov/CMakeFiles/oqsprovider.dir/oqsprov.c.o
1.224 [  6%] Building C object oqsprov/CMakeFiles/oqsprovider.dir/oqsprov_capabilities.c.o
1.649 [  9%] Building C object oqsprov/CMakeFiles/oqsprovider.dir/oqsprov_keys.c.o
2.061 [ 12%] Building C object oqsprov/CMakeFiles/oqsprovider.dir/oqs_kmgmt.c.o
2.585 [ 16%] Building C object oqsprov/CMakeFiles/oqsprovider.dir/oqs_sig.c.o
2.612 In file included from /opt/openssl/.openssl/include/oqs/oqs.h:20,
2.612                  from /opt/openssl/.openssl/include/oqs/sig.h:28,
2.612                  from /opt/oqs-provider/oqsprov/oqs_sig.c:10:
2.612 /opt/openssl/.openssl/include/oqs/sig_stfl.h:182:22: error: unknown type name 'OQS_SIG'
2.612   182 | #define OQS_SIG_STFL OQS_SIG
2.612       |                      ^~~~~~~
2.612 /opt/openssl/.openssl/include/oqs/sig_stfl.h:414:9: note: in expansion of macro 'OQS_SIG_STFL'
2.612   414 | OQS_API OQS_SIG_STFL *OQS_SIG_STFL_new(const char *method_name);
2.612       |         ^~~~~~~~~~~~
2.612 /opt/openssl/.openssl/include/oqs/sig_stfl.h:182:22: error: unknown type name 'OQS_SIG'
2.612   182 | #define OQS_SIG_STFL OQS_SIG
2.612       |                      ^~~~~~~
2.612 /opt/openssl/.openssl/include/oqs/sig_stfl.h:429:47: note: in expansion of macro 'OQS_SIG_STFL'
2.612   429 | OQS_API OQS_STATUS OQS_SIG_STFL_keypair(const OQS_SIG_STFL *sig, uint8_t *public_key, OQS_SIG_STFL_SECRET_KEY *secret_key);
2.612       |                                               ^~~~~~~~~~~~
2.612 /opt/openssl/.openssl/include/oqs/sig_stfl.h:182:22: error: unknown type name 'OQS_SIG'
2.612   182 | #define OQS_SIG_STFL OQS_SIG
2.612       |                      ^~~~~~~
2.612 /opt/openssl/.openssl/include/oqs/sig_stfl.h:453:44: note: in expansion of macro 'OQS_SIG_STFL'
2.612   453 | OQS_API OQS_STATUS OQS_SIG_STFL_sign(const OQS_SIG_STFL *sig, uint8_t *signature, size_t *signature_len, const uint8_t *message, size_t message_len, OQS_SIG_STFL_SECRET_KEY *secret_key);
2.612       |                                            ^~~~~~~~~~~~
2.612 /opt/openssl/.openssl/include/oqs/sig_stfl.h:182:22: error: unknown type name 'OQS_SIG'
2.612   182 | #define OQS_SIG_STFL OQS_SIG
2.612       |                      ^~~~~~~
2.612 /opt/openssl/.openssl/include/oqs/sig_stfl.h:466:46: note: in expansion of macro 'OQS_SIG_STFL'
2.612   466 | OQS_API OQS_STATUS OQS_SIG_STFL_verify(const OQS_SIG_STFL *sig, const uint8_t *message, size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *public_key);
2.612       |                                              ^~~~~~~~~~~~
2.613 /opt/openssl/.openssl/include/oqs/sig_stfl.h:182:22: error: unknown type name 'OQS_SIG'
2.613   182 | #define OQS_SIG_STFL OQS_SIG
2.613       |                      ^~~~~~~
2.613 /opt/openssl/.openssl/include/oqs/sig_stfl.h:477:54: note: in expansion of macro 'OQS_SIG_STFL'
2.613   477 | OQS_API OQS_STATUS OQS_SIG_STFL_sigs_remaining(const OQS_SIG_STFL *sig, unsigned long long *remain, const OQS_SIG_STFL_SECRET_KEY *secret_key);
2.613       |                                                      ^~~~~~~~~~~~
2.613 /opt/openssl/.openssl/include/oqs/sig_stfl.h:182:22: error: unknown type name 'OQS_SIG'
2.613   182 | #define OQS_SIG_STFL OQS_SIG
2.613       |                      ^~~~~~~
2.613 /opt/openssl/.openssl/include/oqs/sig_stfl.h:489:50: note: in expansion of macro 'OQS_SIG_STFL'
2.613   489 | OQS_API OQS_STATUS OQS_SIG_STFL_sigs_total(const OQS_SIG_STFL *sig, unsigned long long *max, const OQS_SIG_STFL_SECRET_KEY *secret_key);
2.613       |                                                  ^~~~~~~~~~~~
2.613 /opt/openssl/.openssl/include/oqs/sig_stfl.h:182:22: error: unknown type name 'OQS_SIG'; did you mean 'OQS_SIG_H'?
2.613   182 | #define OQS_SIG_STFL OQS_SIG
2.613       |                      ^~~~~~~
2.613 /opt/openssl/.openssl/include/oqs/sig_stfl.h:495:32: note: in expansion of macro 'OQS_SIG_STFL'
2.613   495 | OQS_API void OQS_SIG_STFL_free(OQS_SIG_STFL *sig);
2.613       |                                ^~~~~~~~~~~~
2.796 make[2]: *** [oqsprov/CMakeFiles/oqsprovider.dir/build.make:134: oqsprov/CMakeFiles/oqsprovider.dir/oqs_sig.c.o] Error 1
2.797 make[1]: *** [CMakeFiles/Makefile2:165: oqsprov/CMakeFiles/oqsprovider.dir/all] Error 2
2.797 make: *** [Makefile:182: all] Error 2
------
Dockerfile:80
--------------------
  78 |     WORKDIR /opt/oqs-provider
  79 |     
  80 | >>> RUN ln -s /opt/nginx/include/oqs ${OSSLDIR}/include && rm -rf build && cmake -DCMAKE_BUILD_TYPE=Debug -DOPENSSL_ROOT_DIR=${OSSLDIR} -DCMAKE_PREFIX_PATH=$INSTALLDIR -S . -B build && cmake --build build && export MODULESDIR=$(find ${OSSLDIR} -name ossl-modules) && cp build/lib/oqsprovider.so $MODULESDIR && mkdir -p ${OSSLDIR}/lib64 && ln -s ${OSSLDIR}/lib/ossl-modules ${OSSLDIR}/lib64 && rm -rf ${INSTALLDIR}/lib64
  81 |     
  82 |     WORKDIR ${INSTALLDIR}
--------------------
ERROR: failed to solve: process "/bin/sh -c ln -s /opt/nginx/include/oqs ${OSSLDIR}/include && rm -rf build && cmake -DCMAKE_BUILD_TYPE=Debug -DOPENSSL_ROOT_DIR=${OSSLDIR} -DCMAKE_PREFIX_PATH=$INSTALLDIR -S . -B build && cmake --build build && export MODULESDIR=$(find ${OSSLDIR} -name ossl-modules) && cp build/lib/oqsprovider.so $MODULESDIR && mkdir -p ${OSSLDIR}/lib64 && ln -s ${OSSLDIR}/lib/ossl-modules ${OSSLDIR}/lib64 && rm -rf ${INSTALLDIR}/lib64" did not complete successfully: exit code: 2```
@baentsch
Copy link
Member

Thanks for the bug report @mktelos . As you can see from the activities above, this is triggered by an inconsistency in liboqs that needs to be resolved upstream. Once done, this problem will go away. As a workaround for now you could do as proposed in open-quantum-safe/oqs-provider#429: Fix the reference to liboqs to a known-good release (0.10.1).

@SWilson4
Copy link
Member

After the merge of open-quantum-safe/liboqs#1820, the nginx image is once again building successfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants