package/nginx: add libxcrypt optional dependency
PATCH 1/1 package/nginx: add libxcrypt optional dependency
Fix build failure on uclibc with libxcrypt which has been added in commit 464bbe26ff5fb9e5bfe26a26ea65c700b90598f5
Fixes:
- http://autobuild.buildroot.org/results/79a51b0d348e756517b5c9ce815a67f5c657e7e6
--- ...to-os-linux-fix-build-with-libxcrypt.patch | 38 +++++++++++++++++++ package/nginx/nginx.mk | 4 +- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 package/nginx/0009-auto-os-linux-fix-build-with-libxcrypt.patch
package/nginx/0009-auto-os-linux-fix-build-with-libxcrypt.patch new file +38 -0
@@ -0,0 +1,38 @@ +From 79f1fe5251afc4e22a138b0c8f44fc9c94093b8b Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine <[email protected]> +Date: Fri, 2 Apr 2021 09:18:26 +0200 +Subject: [PATCH] auto/os/linux: fix build with libxcrypt + +If crypt_r is found in libcrypt, add -lcrypt to CORE_LIBS to avoid the +following build failure with libxcrypt: + +objs/ngx_modules.o \ +-lpcre -L/home/giuliobenetti/autobuild/run/instance-3/output-1/host/bin/../xtensa-buildroot-linux-uclibc/sysroot/usr/lib -lssl -lcrypto -L/home/giuliobenetti/autobuild/run/instance-3/output-1/host/bin/../xtensa-buildroot-linux-uclibc/sysroot/usr/lib -lxslt -lxml2 -lGeoIP \ +-Wl,-E +/home/giuliobenetti/autobuild/run/instance-3/output-1/host/lib/gcc/xtensa-buildroot-linux-uclibc/9.3.0/../../../../xtensa-buildroot-linux-uclibc/bin/ld: objs/src/os/unix/ngx_user.o:/home/giuliobenetti/autobuild/run/instance-3/output-1/build/nginx-1.18.0/src/os/unix/ngx_user.c:18: undefined reference to `crypt_r' + +Fixes: + - http://autobuild.buildroot.org/results/79a51b0d348e756517b5c9ce815a67f5c657e7e6 + +Signed-off-by: Fabrice Fontaine <[email protected]> +--- + auto/os/linux | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/auto/os/linux b/auto/os/linux +index 5e280eca..04682812 100644 +--- a/auto/os/linux ++++ b/auto/os/linux +@@ -203,6 +203,9 @@ ngx_feature_test="struct crypt_data cd; + crypt_r(\"key\", \"salt\", &cd);" + . auto/feature + ++if [ $ngx_found = yes ]; then ++ CORE_LIBS="$CORE_LIBS $ngx_feature_libs" ++fi + + ngx_include="sys/vfs.h"; . auto/include + +-- +2.30.2 +
package/nginx/nginx.mk +3 -1
@@ -9,7 +9,9 @@ NGINX_SITE = http://nginx.org/download NGINX_LICENSE = BSD-2-Clause NGINX_LICENSE_FILES = LICENSE NGINX_CPE_ID_VENDOR = nginx -NGINX_DEPENDENCIES = host-pkgconf +NGINX_DEPENDENCIES = \ + host-pkgconf \ + $(if $(BR2_PACKAGE_LIBXCRYPT),libxcrypt) NGINX_CONF_OPTS = \ --crossbuild=Linux::$(BR2_ARCH) \
Signature · 1 line
2.30.2
Arnout Vandecappelle
AppliedPATCH 1/1 package/nginx: add libxcrypt optional dependency
Quoted 7 lines · Fabrice Fontaine
Fix build failure on uclibc with libxcrypt which has been added in commit
464bbe26ff5fb9e5bfe26a26ea65c700b90598f5Fixes:
- http://autobuild.buildroot.org/results/79a51b0d348e756517b5c9ce815a67f5c657e7e6Signed-off-by Fabrice Fontaine <[email protected]>
Applied to master, thanks.
Have you sent this upstream?
Regards,
Arnout
Quoted 66 lines
--- ...to-os-linux-fix-build-with-libxcrypt.patch | 38 +++++++++++++++++++ package/nginx/nginx.mk | 4 +- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 package/nginx/0009-auto-os-linux-fix-build-with-libxcrypt.patchpackage/nginx/0009-auto-os-linux-fix-build-with-libxcrypt.patch new file +38
-0@@ -0,0 +1,38 @@ +From 79f1fe5251afc4e22a138b0c8f44fc9c94093b8b Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine <[email protected]> +Date: Fri, 2 Apr 2021 09:18:26 +0200 +Subject: [PATCH] auto/os/linux: fix build with libxcrypt + +If crypt_r is found in libcrypt, add -lcrypt to CORE_LIBS to avoid the +following build failure with libxcrypt: + +objs/ngx_modules.o \ +-lpcre -L/home/giuliobenetti/autobuild/run/instance-3/output-1/host/bin/../xtensa-buildroot-linux-uclibc/sysroot/usr/lib -lssl -lcrypto -L/home/giuliobenetti/autobuild/run/instance-3/output-1/host/bin/../xtensa-buildroot-linux-uclibc/sysroot/usr/lib -lxslt -lxml2 -lGeoIP \ +-Wl,-E +/home/giuliobenetti/autobuild/run/instance-3/output-1/host/lib/gcc/xtensa-buildroot-linux-uclibc/9.3.0/../../../../xtensa-buildroot-linux-uclibc/bin/ld: objs/src/os/unix/ngx_user.o:/home/giuliobenetti/autobuild/run/instance-3/output-1/build/nginx-1.18.0/src/os/unix/ngx_user.c:18: undefined reference to `crypt_r' + +Fixes: + - http://autobuild.buildroot.org/results/79a51b0d348e756517b5c9ce815a67f5c657e7e6 + +Signed-off-by: Fabrice Fontaine <[email protected]> +--- + auto/os/linux | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/auto/os/linux b/auto/os/linux +index 5e280eca..04682812 100644 +--- a/auto/os/linux ++++ b/auto/os/linux +@@ -203,6 +203,9 @@ ngx_feature_test="struct crypt_data cd; + crypt_r(\"key\", \"salt\", &cd);" + . auto/feature + ++if [ $ngx_found = yes ]; then ++ CORE_LIBS="$CORE_LIBS $ngx_feature_libs" ++fi + + ngx_include="sys/vfs.h"; . auto/include + +-- +2.30.2 +package/nginx/nginx.mk +3
-1@@ -9,7 +9,9 @@ NGINX_SITE = http://nginx.org/download NGINX_LICENSE = BSD-2-Clause NGINX_LICENSE_FILES = LICENSE NGINX_CPE_ID_VENDOR = nginx -NGINX_DEPENDENCIES = host-pkgconf +NGINX_DEPENDENCIES = \ + host-pkgconf \ + $(if $(BR2_PACKAGE_LIBXCRYPT),libxcrypt) NGINX_CONF_OPTS = \ --crossbuild=Linux::$(BR2_ARCH) \
PATCH 1/1 package/nginx: add libxcrypt optional dependency
In reply to Fabrice FontaineQuoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Fabrice" == Fabrice Fontaine <[email protected]> writes:
Fix build failure on uclibc with libxcrypt which has been added in commit
464bbe26ff5fb9e5bfe26a26ea65c700b90598f5Fixes:
- http://autobuild.buildroot.org/results/79a51b0d348e756517b5c9ce815a67f5c657e7e6Signed-off-by Fabrice Fontaine <[email protected]>
Committed to 2021.02.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard