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

[question] Consuming opanssl pkg #17485

Open
1 task done
Nyanowsky opened this issue Dec 17, 2024 · 2 comments
Open
1 task done

[question] Consuming opanssl pkg #17485

Nyanowsky opened this issue Dec 17, 2024 · 2 comments
Assignees
Labels
responded Responded by Conan team type: question

Comments

@Nyanowsky
Copy link

Nyanowsky commented Dec 17, 2024

Hi,
I want to use a custom OpenSSL package in my app, which I uploaded to my Artifactory.
In "CMakeLists.txt" file I'm using conan_cmake_install with conanfile.py which contains:
` def generate(self):
tc = CMakeToolchain(self)
tc.generate()
deps = CMakeDeps(self)
deps.generate()

    ms = VirtualBuildEnv(self)
    ms.generate()

    tc2 = XcodeToolchain(self)
    tc2.generate()`

After conan_cmake_install, I see that the package has indeed been installed:

======== Installing packages ======== drng/0.0.0: Already installed! (1 of 2) openssl/0.0.0: Already installed! (2 of 2)

and then I call tofind_package(openssl REQUIRED) but I am getting the following error:
CMake Warning (dev) at /opt/homebrew/Cellar/cmake/3.30.3/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:441 (message): The package name passed to find_package_handle_standard_args(OpenSSL) does not match the name of the calling package (openssl). This can lead to problems in calling code that expectsfind_packageresult variables (e.g.,_FOUND) to follow a certain pattern. Call Stack (most recent call first): /opt/homebrew/Cellar/cmake/3.30.3/share/cmake/Modules/Findopenssl.cmake:689 (find_package_handle_standard_args) CMakeLists.txt:99 (find_package) This warning is for project developers. Use -Wno-dev to suppress it.

Do you know why it find homebrew openssl but not the openssl which I installed? Also, it generates openssl-config.cmake file so I am guessing that this is the correct name of my pkg

Thanks!

Have you read the CONTRIBUTING guide?

  • I've read the CONTRIBUTING guide
@memsharded memsharded self-assigned this Dec 17, 2024
@memsharded
Copy link
Member

Hi @Nyanowsky

Thanks for your question.

I think this might be missing some information. You say you are using conan_cmake_install. This seems the old legacy cmake-conan integration for Conan 1, but now we are talking about Conan 2, so this wouldn't be possible. The new cmake-conan for Conan 2 uses a new strategy, the recommended CMake dependency providers.

Then, the most important part is how cmake is called. We would need a bit more data to reproduce:

  • Please provide a full minimal conanfile.py (a conanfile.txt might be valid for this case)
  • Then, provide a full minimal CMakeLists.txt, without using any cmake-conan stuff at the moment, lets rule that out initially, until things starts to work the standard way
  • Then provide the exact conan install and cmake ... commands. With Conan 2, the cmake --preset integration works greatly, very recommended. In my opinion even better than the cmake-conan integration.
  • Please also provide the full output of those commands, to see what is happening and check the errors.

Thanks very much for your feedback.

@memsharded
Copy link
Member

Hi @Nyanowsky

Any further detail or feedback here? Thanks!

@memsharded memsharded added type: question responded Responded by Conan team labels Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
responded Responded by Conan team type: question
Projects
None yet
Development

No branches or pull requests

2 participants