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

Static library support #82

Closed
mingw-io opened this issue Oct 26, 2022 · 11 comments
Closed

Static library support #82

mingw-io opened this issue Oct 26, 2022 · 11 comments

Comments

@mingw-io
Copy link

Hi.

Many people build OpenSSL as a static library.
It appears that OQS provider does NOT work properly with a static OpenSSL as some failing tests demonstrate (e.g. oqs_endecode).
We have been experimenting/trying to build OpenSSL statically with OQS provider 'embedded' the same way as the legacy provider is built.
This is our first attempt and it seems to be working.
Obviously there are advantages and disadvantages here.
The main advantage is that we end up with only one file.

We have run all OQS tests (oqs_signatures, oqs_kems, oqs_groups & oqs_endecode) and they have all passed.

Do we need to run/do more testing here? We can make the binary available (if that helps!).

Cheers and thanks for this project.

image

@baentsch
Copy link
Member

We can make the binary available (if that helps!).

The approach to "build static" sounds good -- what would help me is a (windows?) script building everything as you recommend, triggering testing (both good and failing), ideally using gnu-type tooling. A pure binary is something I wouldn't know how to debug into (which tools to use as I assume they depend on your build environment, right?).

@mingw-io
Copy link
Author

Some (extra) testing: client/server

image

image

@mingw-io
Copy link
Author

It is evident that we lack some experience on Windows, which is perfectly fine!
On Windows, we can use the same toolchain we use on Mac & Linux (a.k.a. GNU GCC & cmake).
On the command line (e.g. cmd) I type in:

  • cmake -DCMAKE_INSTALL_PREFIX=<some folder here> ..
  • cmake --build

That's it!

To simplify your life as well as end users' life, I will be attaching a simple installer for you to try.

@baentsch
Copy link
Member

On Windows, we can use the same toolchain we use on Mac & Linux (a.k.a. GNU GCC & cmake).

Just to make it clear for a simple mind like me: I need to download and install all software from https://sourceforge.net/projects/mingw/, then run cmake -DCMAKE_INSTALL_PREFIX=<some folder here> .. && cmake --build? No need to add anything along the lines of

set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
set(BUILD_SHARED_LIBS OFF)
set(CMAKE_EXE_LINKER_FLAGS "-static")

?

@mingw-io
Copy link
Author

Hi.
Find attached a OneClick installer for testing/verification purposes. We hope you find it useful.

image

oqs-provider-0.4.0-x64.zip

@baentsch
Copy link
Member

Thanks very much for this installer. I am now confused by the introductory statement, though:

as some failing tests demonstrate (e.g. oqs_endecode

When trying out the installer and the test programs contained, no test fails (?). So did you manage to resolve all problems? If so, would you consider contributing your work e.g., to resolve this issue, #80 and #47 ?

@baentsch
Copy link
Member

baentsch commented Feb 4, 2023

@mingw-io ping/Did you see the questions above?

@mingw-io
Copy link
Author

mingw-io commented Feb 5, 2023

Ciao there.
It is up to this project maintainer(s) to make up their minds about how to proceed/move forward!

Regarding issue #80 my tests have demonstrated the oqs-provider does NOT support OpenSSL statically linked.
This issue (#82) is related to #80.
All issues (#47, #80 & this one) are resolved on my end.

Now we need to ask ourselves how to proceed here.
I have noticed that some/many (end) users have difficulties in either building OQS from source and/or setting it up and/or using it.

I could contribute some binaries/installer with no dependencies at all (e.g. Visual Studio, etc).
The installer provided above contains three oqs official tests. When you run them, all should pass. If not, please let me know.

@baentsch
Copy link
Member

baentsch commented Feb 8, 2023

I could contribute some binaries/installer with no dependencies at all (e.g. Visual Studio, etc).

PR would be welcome.

The installer provided above contains three oqs official tests. When you run them, all should pass. If not, please let me know.

I do not have a Windows installation to test. We'd expect any contribution to contain CI features (for the specific platform, i.e., Windows in this case) such as to not depend on manual testing.

@baentsch
Copy link
Member

baentsch commented Jul 2, 2023

#201 seems to resolve this issue.

@baentsch
Copy link
Member

Resolved by #201

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

2 participants