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

cmake build failing with "missing: OPENSSL_CRYPTO_LIBRARY" #57

Closed
blackandwhitebg opened this issue Feb 23, 2023 · 4 comments
Closed

cmake build failing with "missing: OPENSSL_CRYPTO_LIBRARY" #57

blackandwhitebg opened this issue Feb 23, 2023 · 4 comments
Labels
Support The issue is a request for technical support

Comments

@blackandwhitebg
Copy link

On Windows (x64), I tried to build with OpenSSL 3.0.7 - it failed.
I also tried 1.1.1s (exactly the one from the podofo-deps repository)
Still getting the same error:
Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY) (found
version "1.1.1s")

This is what I use for the CMake arguments:
-DOPENSSL_INCLUDE_DIR=C:\PoDoFo\podofo-deps-master\3rdparty\openssl\include
-DOPENSSL_CRYPTO_LIBRARY=C:\PoDoFo\podofo-deps-master\3rdparty\openssl\lib\Win64\crypto.lib

@blackandwhitebg
Copy link
Author

blackandwhitebg commented Feb 23, 2023

I made some progress,

I found that if I use a prebuilt OpenSSL library from a different place, and not from "podofo-deps",
using parameter -DOPENSSL_ROOT_DIR=C:\OpenSSL-Win64 works.

So basically the bug is that the OpenSSL part from podofo-deps is incomplete

@ceztko
Copy link
Contributor

ceztko commented Feb 23, 2023

Please note the disclaimer.

These dependencies are supplied only for development purposes and come with no warranty. They are not frequently updated, may contain security flaws and be unsafe to use.

The openssl builds there are fine but the libs/includes directory layout may be incompatible with your attempt to hint the cmake find module for OpenSSL. I will better specify that the deps there are supposed to be used with the playground only. I will also improve the build/quickstart guide to encourage using package managers, such as vcpkg and Conan.

@blackandwhitebg
Copy link
Author

Ok, this is the workaround I found:
Copy the 4 lib files from
\podofo-deps-master\3rdparty\openssl\lib\Win64
to
\podofo-deps-master\3rdparty\openssl\lib\

And you are OK to use -DOPENSSL_ROOT_DIR=C:\PoDoFo\podofo-deps-master\3rdparty\openssl

Additionally, I found that
-DFREETYPE_INCLUDE_DIRS=C:\PoDoFo\podofo-deps-master\3rdparty\freetype\include
is not creating a working VS solution, it has to be
-DFREETYPE_INCLUDE_DIRS=C:\PoDoFo\podofo-deps-master\3rdparty\freetype\include\freetype2

That way I was able to compile and run the HelloWorld example.

@ceztko ceztko added the Support The issue is a request for technical support label Feb 24, 2023
@ceztko
Copy link
Contributor

ceztko commented Feb 24, 2023

I updated the relevant Readme section read it carefully. I also update the disclaimer about podofo-deps in the playground. I am assuming you'll be able to continue on your own, especially in case of dependencies build from sources, for which I can't really provide support.

@ceztko ceztko closed this as completed Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Support The issue is a request for technical support
Projects
None yet
Development

No branches or pull requests

2 participants