liboqs-java icon indicating copy to clipboard operation
liboqs-java copied to clipboard

Enable Build On Windows

Open AdijeShen opened this issue 1 year ago • 8 comments

Solve Issue #1

Changes Made

  • Changed from dynamic linking (liboqs.so/liboqs.dll) to static linking (liboqs.a)
  • Added liboqs as a git submodule in ./liboqs/
  • Updated build instructions for all platforms

Key Benefits

  1. Simplified installation - no need to install liboqs in system directory
  2. More portable - all dependencies contained within project
  3. Consistent builds across platforms

Documentation Updates

  • Preserved all existing API documentation
  • Maintained all examples and usage instructions
  • Kept original diagrams and status badges
  • Updated only the build/installation sections

AdijeShen avatar Nov 01 '24 09:11 AdijeShen

Sorry, just delete it accidentally, I would add it back

---Original--- From: "Michael @.> Date: Fri, Nov 1, 2024 18:29 PM To: @.>; Cc: "Huajie @.@.>; Subject: Re: [open-quantum-safe/liboqs-java] Enable Build On Windows (PR #28)

@baentsch requested changes on this pull request.

Thanks for this PR, @AdijeShen -- before going into review detail, I've asked the rest of the team as to whether they're OK with the submodule approach. The change I'd immediate question is the removal of RELEASE.md: If there's no good reason for this (?) please bring it back: As and if someone else starts to maintain this sub project again, there may be an interest to do new releases again...

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

AdijeShen avatar Nov 01 '24 10:11 AdijeShen

Hi @AdijeShen, do you plan to continue with this PR?

SWilson4 avatar Mar 19 '25 19:03 SWilson4

Hi @AdijeShen, do you plan to continue with this PR?

Hi @SWilson4 , I will turn back to working on this PR and plan to finish it within one week.

AdijeShen avatar Mar 20 '25 00:03 AdijeShen

I've completed my revisions by removing the git submodule approach as requested. The current implementation uses static linking with liboqs.a instead of dynamic linking, which might require adjustments to the GitHub CI workflow.

Please let me know if any further changes are needed. I'm available to address additional feedback to get this PR ready for merging.

AdijeShen avatar Mar 20 '25 11:03 AdijeShen

I've completed my revisions by removing the git submodule approach as requested. The current implementation uses static linking with liboqs.a instead of dynamic linking, which might require adjustments to the GitHub CI workflow.

Please let me know if any further changes are needed. I'm available to address additional feedback to get this PR ready for merging.

Thanks for the updates! I am not at all knowledgeable about Windows development and build processes (especially in Java), so please bear with me. Could you elaborate on why it's necessary to change from dynamic to static linking? It would also be great if you could add a CI workflow for Windows.

You will also need to add DCO signoff to your commits. Instructions for that are here: https://github.com/open-quantum-safe/liboqs-java/pull/28/checks?check_run_id=39103331593.

SWilson4 avatar Mar 21 '25 14:03 SWilson4

Hi @SWilson4, Thank you for the feedback!

Regarding the change from dynamic to static linking:

  1. Static linking resolves Windows-specific issues where loading dynamic libraries requires specific path configurations
  2. It simplifies cross-platform deployment since users don't need to manage separate .dll/.so files
  3. It improves portability by bundling all dependencies within the project

I've added a Windows CI workflow in my latest commits (42f62eb) to validate the build process on Windows environments. The workflow tests the compilation and basic functionality to ensure compatibility. All actions passed in my forked repo

Let me know if you'd like me to make any additional changes or provide more details about the implementation.

AdijeShen avatar Mar 25 '25 10:03 AdijeShen

Hi @AdijeShen, it looks like the whole repo has been reformatted to use CRLF line endings (\r\n). Could you please reformat to use only LF (\n)?

SWilson4 avatar Apr 01 '25 19:04 SWilson4

@SWilson4 Thank you for pointing that out. I've fixed the line ending issue by converting all files back to LF format. The changes have been pushed in the latest commit.

AdijeShen avatar Apr 02 '25 01:04 AdijeShen

Thanks very much. Can you add the DCO sign-off? See instructions at https://github.com/open-quantum-safe/liboqs-java/pull/28/checks?check_run_id=39813683997

dstebila avatar May 20 '25 18:05 dstebila

@SWilson4 any further thoughts? Otherwise I think we can merge.

dstebila avatar May 21 '25 14:05 dstebila

@johngray-dev As one of the primary users of the Java wrapper, could you please take a look at this PR? I'd like to understand the implications of moving from dynamic to static linking before we proceed.

SWilson4 avatar May 21 '25 14:05 SWilson4

In the absence of any objections, merging once re-triggered CI passes. Thanks for the contribution @AdijeShen!

SWilson4 avatar Jun 13 '25 15:06 SWilson4

Should we close https://github.com/open-quantum-safe/liboqs-java/issues/1?

jimouris avatar Jun 13 '25 16:06 jimouris