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

CMakeLists.txt: use pkgconfig to find openssl #319

Closed
wants to merge 1 commit into from
Closed

CMakeLists.txt: use pkgconfig to find openssl #319

wants to merge 1 commit into from

Conversation

ffontaine
Copy link
Contributor

find_package(openssl) fails to find openssl dependencies such as -lz so
use pkgconfig to fix static build if pkg-config is found, otherwise
fallback to existing mechanism

Fixes:

Signed-off-by: Fabrice Fontaine fontaine.fabrice@gmail.com

find_package(openssl) fails to find openssl dependencies such as -lz so
use pkgconfig to fix static build if pkg-config is found, otherwise
fallback to existing mechanism

Fixes:
 - http://autobuild.buildroot.org/results/c3f75480cb4b8b042cdf6a34cc5568ea13e51342

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
@bk138
Copy link
Member

bk138 commented Jul 2, 2019

Mh shouldn't this be a pull request to CMake? This one is a mere mitigation...

@bk138
Copy link
Member

bk138 commented Jul 11, 2019

This should be fixed in CMake. If you have convincing arguments why we should mitigate a CMake bug in our build system, please re-open :-)

@bk138 bk138 closed this Jul 11, 2019
@ffontaine
Copy link
Contributor Author

My main argument is that static building of libvncserver was working on previous versions because the build system was autotools. IMHO, cmake is just bad at static building because it doesn't use pkgconfig file to retrieve library dependencies. But even if this bug was fixed into a newer cmake's version, it will be broken on all previous versions. But that's your right to refuse to mitigate a cmake bug. On my side, I will just disable libvncserver package for all buildroot static builds.

buildroot-auto-update pushed a commit to buildroot/buildroot that referenced this pull request Jul 14, 2019
Disable libvncserver for static builds and drop second patch following
upstream feedback on patch fixing openssl issue:
LibVNC/libvncserver#319

This will also fix build failure when building statically with libgcrypt

Don't update x11vnc, the reverse dependency of libvncserver, because
BR2_PACKAGE_XORG7 already depends on !BR2_STATIC_LIBS

Fixes:
 - http://autobuild.buildroot.org/results/8d7b109d085e3931a874c4fb99f465789485565a

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
@ffontaine
Copy link
Contributor Author

For the record, this issue was already reported to cmake two years ago: https://gitlab.kitware.com/cmake/cmake/issues/16885.

@bk138
Copy link
Member

bk138 commented Jul 15, 2019

Thanks for pointing this out, I was about to report an upstream bug with them

woodsts pushed a commit to woodsts/buildroot that referenced this pull request Mar 15, 2020
Disable libvncserver for static builds and drop second patch following
upstream feedback on patch fixing openssl issue:
LibVNC/libvncserver#319

This will also fix build failure when building statically with libgcrypt

Don't update x11vnc, the reverse dependency of libvncserver, because
BR2_PACKAGE_XORG7 already depends on !BR2_STATIC_LIBS

Fixes:
 - http://autobuild.buildroot.org/results/8d7b109d085e3931a874c4fb99f465789485565a

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 726dcc6)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants