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

Build failure on FreeBSD 15 arm64 #622

Closed
Sp1l opened this issue Jan 11, 2025 · 4 comments
Closed

Build failure on FreeBSD 15 arm64 #622

Sp1l opened this issue Jan 11, 2025 · 4 comments
Labels
bug Something isn't working

Comments

@Sp1l
Copy link

Sp1l commented Jan 11, 2025

FreeBSD builds on arm64 fail

fatal error: 'oqs/kem_bike.h' file not found

Steps to reproduce the behavior:

  1. On an arm64 system
  2. With FreeBSD 15 unreleased
  3. Build security/liboqs and security/openssl-oqsprovider ports.
  4. See build failure in logs /usr/local/include/oqs/kem.h:267:10: fatal error: 'oqs/kem_bike.h' file not found on arm64 exclusively.

Expected behavior
Successful build

Screenshots
Build log for oqsprovider here
Build log for liboqs here

Environment (please complete the following information):

  • OS: FreeBSD 15.0-CURRENT 1500030
  • OpenSSL version: 3.0.15 as shipped in FreeBSD 15-CURRENT
  • liboqs version: 0.12.0
  • oqsprovider version: 0.8.0

Additional context

  1. These are logs generated by the FreeBSD build infrastructure.
  2. This failure is only seen on the arm64 builds with FreeBSD 15. All other builds seem fine (amd64, FreeBSD 14).
  3. I'm reporting this as maintainer of the security/openssl-oqsprovider port in FreeBSD.
  4. I also maintain the other OpenSSL ports in FreeBSD, but not the OpenSSL version in the base Operating System which is used for the automated builds.
  5. I do not have access to an arm64 system that I can build OpenSSL, liboqs and oqsprovider on.
  6. The liboqs build logs show that the oqs/kem_bike.h file is installed -- Installing: /wrkdirs/usr/ports/security/liboqs/work/stage/usr/local/include/oqs/kem_bike.h. The package is successfully built, which means that all files in the ports (plist files)[https://cgit.freebsd.org/ports/tree/security/liboqs/pkg-plist] have been packaged.
@Sp1l Sp1l added the bug Something isn't working label Jan 11, 2025
@Sp1l
Copy link
Author

Sp1l commented Jan 11, 2025

Looks like an issue with FreeBSD's liboqs port on non-amd64 architecture.

See liboqs port Makefile.

I'll investigate further. Looks like KEM_BIKE now builds OK on arm64 where in previous versions it did not?

@baentsch
Copy link
Member

Thanks for letting us know @Sp1l . Please note that your config is not exactly very high on our list of "somewhat" supported setups: We do some testing on OpenSSL 3.0 but not consistently (see #488) and certainly not on different architectures.

Depending on your rationale for distributing OQS (just for the standard PQC algs or for experimentation with all?), you may want to tailor the build using oqsprovider config and/or liboqs config to restrict the number of algorithms in your distro. Thus, maybe setting OQS_ENABLE_KEM_BIKE=OFF is advisable if you're seeing too many problems with it and don't really need it.

@Sp1l
Copy link
Author

Sp1l commented Jan 12, 2025

Thanks for letting us know @Sp1l . Please note that your config is not exactly very high on our list of "somewhat" supported setups: We do some testing on OpenSSL 3.0 but not consistently (see #488) and certainly not on different architectures.

Depending on your rationale for distributing OQS (just for the standard PQC algs or for experimentation with all?), you may want to tailor the build using oqsprovider config and/or liboqs config to restrict the number of algorithms in your distro. Thus, maybe setting OQS_ENABLE_KEM_BIKE=OFF is advisable if you're seeing too many problems with it and don't really need it.

Yep, well aware that 3.0 isn't the recommended configuration. The port displays a warning about that on install. 3.0 is what's in OpenSSL base, a user may build their own ports using an /etc/make.conf knob DEFAULT_VERSIONS+= security/openssl34 (for 3.4). The FreeBSD project is likely waiting for a new OpenSSL LTS before switching to a newer version in base.

Looking at the build log of liboqs, it builds and installs the kem_bike.h file. The port sets that file as @comment in the pkg-plist. I will create a PR for the FreeBSD security/liboqs port to change that.

.CMake/alg_support.cmake

# BIKE is not supported on Windows, 32-bit ARM, X86, S390X (big endian) and PPC64 (big endian)

Closing this issue, it's not oqsproviders nor liboqs, but the FreeBSD port.

Thanks!

@Sp1l Sp1l closed this as completed Jan 12, 2025
@Sp1l
Copy link
Author

Sp1l commented Jan 19, 2025

For reference: https://bugs.freebsd.org/284153

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