From patchwork Fri Apr 2 16:35:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrice Fontaine X-Patchwork-Id: 1461807 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=pZsmx9Ow; dkim-atps=neutral Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FBlz93tmKz9sV5 for ; Sat, 3 Apr 2021 03:35:33 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 6A0384052F; Fri, 2 Apr 2021 16:35:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6UEE2jl4UaDq; Fri, 2 Apr 2021 16:35:30 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 6B350405AD; Fri, 2 Apr 2021 16:35:29 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 26BD31BF20B for ; Fri, 2 Apr 2021 16:35:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 163D6608FE for ; Fri, 2 Apr 2021 16:35:28 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp3.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6jlI37qs35sn for ; Fri, 2 Apr 2021 16:35:27 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by smtp3.osuosl.org (Postfix) with ESMTPS id C25FC605E6 for ; Fri, 2 Apr 2021 16:35:26 +0000 (UTC) Received: by mail-wr1-x42c.google.com with SMTP id e18so5182911wrt.6 for ; Fri, 02 Apr 2021 09:35:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=VgGAY34iTi5FpM/QaIkXFi38ZkNr+YrECQ7N3i+ZDto=; b=pZsmx9Ow6XTS0aJ8cf09vEM4T0cyZExg+pZ4izh79f4L3p0xAzi23mAxetUZQuAeTI rQfn1QyfU/ROs5jGaL527xUM7wx/W8Q/vLc6Aqw2C5At50YAXqbjMDrTj57jSo8ajTbs RgrXYI3O4ysB/+mGKWqjhjdZiJUrs1otMaRn2petnIieGXkfnkq1Q/Q6lQoydnW0YUnv jk1R4hG3nTiZH4wZxhX3UHG/dbenpEQI35cAT3qeatqiWbZextGKcHXf2iAOXb0Zd6V/ 1769Wx9FoWxdSdGouvb7sJu1RevnJT4hN3+i5i97hZQ5zP/blisxrSUwiJuLpcKgBWJB +8sQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=VgGAY34iTi5FpM/QaIkXFi38ZkNr+YrECQ7N3i+ZDto=; b=kq1yqMocGIt1L4mwpnCbrkkwKSWWZljiMKB+CYs5cVnTnIXmtRbVd6I4mkoBjWRzmL MB39w2mvJCifRoqthCUuz3Tg/yPKPCa7dqSf4ws1tRl/9J8gKg683sr62uObbohiYZdb 6FNmEo9Z6cO8UKRpgKil2BSc8L0hHPEtDJy0Sc+VU/LosXFM4y6c0t5fOtfdTRlBwwmZ Vr3JZTRwdPOdJjVaRYE95EiwKPW7VoJbew3Opc1wf5lyhY12VSHaSO/0lQnCvUvT4T/j /4SFttZrw18SS6Q2EkV+7FPhGBBkhU542bhryXt9pnxLd8UD/7RKm8x3QknzzqUsb1po YVXA== X-Gm-Message-State: AOAM531jl8ERNRDZoage6Zk+AItXBQ6CF4EvSNwlZz0m3ruws7Fo+J1D XvRtXYJbg3LWXqshu9wh4dzcz/rTkjU= X-Google-Smtp-Source: ABdhPJx3z02hEDL8A5v8lWGEiRCZGbP8EM0EaSRiqlPu81uHEkUmpSwtwNsh2KxMrOAl07XseSAUUw== X-Received: by 2002:adf:9243:: with SMTP id 61mr3265722wrj.11.1617381324700; Fri, 02 Apr 2021 09:35:24 -0700 (PDT) Received: from kali.home (lfbn-ren-1-1383-171.w86-229.abo.wanadoo.fr. [86.229.230.171]) by smtp.gmail.com with ESMTPSA id y1sm12349489wmq.29.2021.04.02.09.35.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Apr 2021 09:35:24 -0700 (PDT) From: Fabrice Fontaine To: buildroot@buildroot.org Date: Fri, 2 Apr 2021 18:35:17 +0200 Message-Id: <20210402163517.1254749-1-fontaine.fabrice@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/1] package/nginx: add libxcrypt optional dependency X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Samuel Martin , Fabrice Fontaine Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Fix build failure on uclibc with libxcrypt which has been added in commit 464bbe26ff5fb9e5bfe26a26ea65c700b90598f5 Fixes: - http://autobuild.buildroot.org/results/79a51b0d348e756517b5c9ce815a67f5c657e7e6 Signed-off-by: Fabrice Fontaine --- ...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 diff --git a/package/nginx/0009-auto-os-linux-fix-build-with-libxcrypt.patch b/package/nginx/0009-auto-os-linux-fix-build-with-libxcrypt.patch new file mode 100644 index 0000000000..7e430ffc37 --- /dev/null +++ b/package/nginx/0009-auto-os-linux-fix-build-with-libxcrypt.patch @@ -0,0 +1,38 @@ +From 79f1fe5251afc4e22a138b0c8f44fc9c94093b8b Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +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 +--- + 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 + diff --git a/package/nginx/nginx.mk b/package/nginx/nginx.mk index 9c32546835..8a371a2cc8 100644 --- a/package/nginx/nginx.mk +++ b/package/nginx/nginx.mk @@ -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) \