package/nginx: fix static build error
PATCH 1/1 package/nginx: fix static build error
In commit 761259c93400bc806611a242c7dc3df7ff67c231 the SSL patch was removed, without testing any static compilation. Reintroduce a small version of the original patch.
Upstream does not use pkg-config, so the patch is Buildroot specific and not suitable for upstreaming.
Fixes:
- http://autobuild.buildroot.net/results/a85/a85b00dfe9b55607390ebacc0e4e55c7cfbace3a
--- ...auto-lib-openssl-conf-use-pkg-config.patch | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 package/nginx/0009-auto-lib-openssl-conf-use-pkg-config.patch
package/nginx/0009-auto-lib-openssl-conf-use-pkg-config.patch new file +34 -0
@@ -0,0 +1,34 @@ +From 232ac61984720401b0c3854da1644ec20ed218e0 Mon Sep 17 00:00:00 2001 +From: Martin Bark <[email protected]> +Date: Thu, 15 Aug 2024 19:47:23 +0200 +Subject: [PATCH] auto/lib/openssl/conf: use pkg-config + +Change to using pkg-config to find the path to openssl and its +dependencies. + +Signed-off-by: Martin Bark <[email protected]> +Signed-off-by: Waldemar Brodkorb <[email protected]> +Upstream: not suitable +--- + auto/lib/openssl/conf | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/auto/lib/openssl/conf b/auto/lib/openssl/conf +index fdf430dff..c9fe4c8bf 100644 +--- a/auto/lib/openssl/conf ++++ b/auto/lib/openssl/conf +@@ -63,8 +63,9 @@ else + ngx_feature_name="NGX_OPENSSL" + ngx_feature_run=no + ngx_feature_incs="#include <openssl/ssl.h>" +- ngx_feature_path= +- ngx_feature_libs="-lssl -lcrypto $NGX_LIBDL $NGX_LIBPTHREAD" ++ ngx_feature_path="$(${PKG_CONFIG:=pkg-config} --cflags-only-I openssl| ++ sed -re 's/(^|\s)-I\s*(\S+)/\1\2/g')" ++ ngx_feature_libs="$(${PKG_CONFIG:=pkg-config} --libs openssl)" + ngx_feature_test="SSL_CTX_set_options(NULL, 0)" + . auto/feature + +-- +2.39.2 +
Signature · 6 lines
2.39.2 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 11 lines · Waldemar Brodkorb
In commit
761259c93400bc806611a242c7dc3df7ff67c231the SSL patch was removed, without testing any static compilation. Reintroduce a small version of the original patch.Upstream does not use pkg-config, so the patch is Buildroot specific and not suitable for upstreaming.
Fixes:
- http://autobuild.buildroot.net/results/a85/a85b00dfe9b55607390ebacc0e4e55c7cfbace3aSigned-off-by Waldemar Brodkorb <[email protected]>
Applied to master, thanks.
Regards,
Arnout
Quoted 35 lines
--- ...auto-lib-openssl-conf-use-pkg-config.patch | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+)create mode 100644
package/nginx/0009-auto-lib-openssl-conf-use-pkg-config.patchpackage/nginx/0009-auto-lib-openssl-conf-use-pkg-config.patch new file +24
-0@@ -0,0 +1,34 @@ +From 232ac61984720401b0c3854da1644ec20ed218e0 Mon Sep 17 00:00:00 2001 +From: Martin Bark <[email protected]> +Date: Thu, 15 Aug 2024 19:47:23 +0200 +Subject: [PATCH] auto/lib/openssl/conf: use pkg-config + +Change to using pkg-config to find the path to openssl and its +dependencies. + +Signed-off-by: Martin Bark <[email protected]> +Signed-off-by: Waldemar Brodkorb <[email protected]> +Upstream: not suitable +--- + auto/lib/openssl/conf | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/auto/lib/openssl/conf b/auto/lib/openssl/conf +index fdf430dff..c9fe4c8bf 100644 +--- a/auto/lib/openssl/conf ++++ b/auto/lib/openssl/conf +@@ -63,8 +63,9 @@ else + ngx_feature_name="NGX_OPENSSL" + ngx_feature_run=no + ngx_feature_incs="#include <openssl/ssl.h>" +- ngx_feature_path=
package/nginx/0009-auto-lib-openssl-conf-use-pkg-config.patch line 34
Quoted 10 lines
package/nginx/0009-auto-lib-openssl-conf-use-pkg-config.patch new file +10
-0+- ngx_feature_libs="-lssl -lcrypto $NGX_LIBDL $NGX_LIBPTHREAD" ++ ngx_feature_path="$(${PKG_CONFIG:=pkg-config} --cflags-only-I openssl| ++ sed -re 's/(^|\s)-I\s*(\S+)/\1\2/g')" ++ ngx_feature_libs="$(${PKG_CONFIG:=pkg-config} --libs openssl)" + ngx_feature_test="SSL_CTX_set_options(NULL, 0)" + . auto/feature + +-- +2.39.2 +
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 13 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Arnout" == Arnout Vandecappelle via buildroot <[email protected]> writes:
Quoted 9 lines · Waldemar Brodkorb
In commit
761259c93400bc806611a242c7dc3df7ff67c231the SSL patch was removed, without testing any static compilation.
Reintroduce a small version of the original patch.
Upstream does not use pkg-config, so the patch is Buildroot specific and
not suitable for upstreaming.
Fixes:
- http://autobuild.buildroot.net/results/a85/a85b00dfe9b55607390ebacc0e4e55c7cfbace3aSigned-off-by Waldemar Brodkorb <[email protected]>
Quoted 1 line
Applied to master, thanks.
Committed to 2024.02.x and 2024.08.x, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot