Skip to content
This repository has been archived by the owner on Jan 8, 2025. It is now read-only.

oqs_meth.c build errors. #321

Closed
mrshneaky opened this issue Jul 9, 2021 · 6 comments
Closed

oqs_meth.c build errors. #321

mrshneaky opened this issue Jul 9, 2021 · 6 comments

Comments

@mrshneaky
Copy link

I'm attempting to build an RPM package for oqs-openssl to work with our team's build infrastructure. I have compiled oqs-openssl before however I'm running into some difficulty with the RPM.

The cmake step for liboqs is producing the following error:

meth.o -c -o crypto/ec/oqs_meth.o crypto/ec/oqs_meth.c crypto/ec/oqs_meth.c: In function 'get_oqs_alg_name': crypto/ec/oqs_meth.c:198:14: error: 'OQS_SIG_alg_default' undeclared (first use in this function); did you mean 'OQS_SIG_alg_count'? return OQS_SIG_alg_default; ^~~~~~~~~~~~~~~~~~~ OQS_SIG_alg_count

Has anyone else tried building an RPM for this package?

@baentsch
Copy link
Member

baentsch commented Jul 9, 2021

Could you please clone oqs-openssl again: We yesterday merged #313 that removed any reference to 'OQS_SIG_alg_default'.

@mrshneaky
Copy link
Author

That worked, thank you. However when running oqs-openssl and attempting tog enerate a new dilithium2 key I get an illegal instruction error.

If possible could you advise on the files I'll need to deliver as part of my RPM package?

At present I'm including the following:

%defattr(-,root,root)
%{_sysconfdir}/oqs-openssl/certs
%{_sysconfdir}/oqs-openssl/ct_log_list.cnf
%{_sysconfdir}/oqs-openssl/ct_log_list.cnf.dist
%{_sysconfdir}/oqs-openssl/openssl.cnf.dist
%{_sysconfdir}/oqs-openssl/openssl.cnf
%{_sysconfdir}/oqs-openssl/private
%{_bindir}/oqs-openssl
%{_libdir}/libssl.so.*
%{_libdir}/libcrypto.so.*
%{_libdir}/engines*/*
%exclude %{_mandir}/man1/*
%exclude %{_mandir}/man5/*
%exclude %{_mandir}/man7/*
%exclude %{_docdir}/*```

@baentsch
Copy link
Member

I get an illegal instruction error.

This sounds like a build problem: Are you building and executing on different machines? Quite possibly for an RPM package I guess... The same problem appears when doing docker images on an x86_64 machine with some CPU extensions that not all x86_64 machines provide (say AVX512): For this purpose we provided the build option OQS_DIST_BUILD: Be sure to build the RPM for the liboqs.a (and/or liboqs.so -- depending on what you want to ship) with this option set. For an idea what to include in a binary distribution (and how to use the build option above), you may want to check our oqs-demos Dockerfiles, e.g., the one for curl also containing oqs-openssl

@mrshneaky
Copy link
Author

Thanks for the handy tips, I've got it working

@baentsch
Copy link
Member

Thanks for the handy tips, I've got it working

Great to hear and Thanks for letting us know. Would this be anything you feel might be worth-while for others to use, too? Maybe a contribution to oqs-demos?

@mrshneaky
Copy link
Author

Yeah, I'd love to add it to oqs-demos. It's for a niche operating system however it can probably be abstracted to other OS's quite easily. I'll clear it with my Open Source team first.

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

No branches or pull requests

2 participants