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

OpenSSL-Static not linking all libs on Windows #588

Open
hyperxpro opened this issue Nov 12, 2020 · 3 comments
Open

OpenSSL-Static not linking all libs on Windows #588

hyperxpro opened this issue Nov 12, 2020 · 3 comments

Comments

@hyperxpro
Copy link
Contributor

I tried building OpenSSL-Static with Visual Studio 2019 but I end up 213KB netty_tcnative.dll file and when I load it using System.load(String), I get:
Exception in thread "main" java.lang.UnsatisfiedLinkError: ... : Can't find dependent libraries.

Also to build OpenSSL-Static on Windows, I have to add <arg line="Configure VC-WIN64A --prefix=${sslHome} --openssldir=${opensslHome}" /> where opensslHome points to a directory inside target. So this also needs to be fixed in separate PR.

@normanmaurer
Copy link
Member

Sorry but we don't currently support these on windows... If you can make it work I am happy to merge a PR tho. For windows we support the openssl-dynamic and boringssl-static libs.

@hyperxpro
Copy link
Contributor Author

        System.load("D:\\netty-tcnative\\openssl-static\\target\\apr\\bin\\libapr-1.dll");
        System.load("D:\\netty-tcnative\\openssl-static\\target\\ssl\\bin\\libcrypto-1_1-x64.dll");
        System.load("D:\\netty-tcnative\\openssl-static\\target\\ssl\\bin\\libssl-1_1-x64.dll");
        System.load("D:\\netty-tcnative\\openssl-static\\target\\native-build\\target\\x64-release\\lib\\netty_tcnative.dll");

        System.out.println(OpenSsl.isAvailable());
        System.out.println(OpenSsl.versionString());
true
OpenSSL 1.1.1h  22 Sep 2020

It's working but gotta load libraries manually. VS is not linking them together.

@normanmaurer
Copy link
Member

Like I said if you get it work I am happy to pull it in but otherwise I can't spent any time on it.

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