From patchwork Mon Nov 27 09:27:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 1868690 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Sf0bl54Hzz1yS6 for ; Mon, 27 Nov 2023 20:27:15 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 782786079D; Mon, 27 Nov 2023 09:27:13 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 782786079D X-Virus-Scanned: amavisd-new at osuosl.org 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 25BZOj-e68Ro; Mon, 27 Nov 2023 09:27:12 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 9DE1960A88; Mon, 27 Nov 2023 09:27:11 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 9DE1960A88 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id B915A1BF418 for ; Mon, 27 Nov 2023 09:27:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 9EF70403AC for ; Mon, 27 Nov 2023 09:27:10 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 9EF70403AC 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 OM4m_0wWMTkF for ; Mon, 27 Nov 2023 09:27:08 +0000 (UTC) Received: from smtp-out.orange.com (smtp-out.orange.com [80.12.126.237]) by smtp4.osuosl.org (Postfix) with ESMTPS id 3B74E403CA for ; Mon, 27 Nov 2023 09:27:06 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 3B74E403CA Received: from unknown (HELO opfedv3rlp0b.nor.fr.ftgroup) ([x.x.x.x]) by smtp-out.orange.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Nov 2023 10:27:05 +0100 Received: from unknown (HELO OPE16NORMBX305.corporate.adroot.infra.ftgroup) ([x.x.x.x]) by opfedv3rlp0b.nor.fr.ftgroup with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 27 Nov 2023 10:27:04 +0100 Received: from tl-lnx-nyma7486-2 [x.x.x.x] by OPE16NORMBX305.corporate.adroot.infra.ftgroup [x.x.x.x] with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Mon, 27 Nov 2023 10:27:02 +0100 Received: by tl-lnx-nyma7486-2 (sSMTP sendmail emulation); Mon, 27 Nov 2023 10:27:02 +0100 X-IronPort-AV: E=Sophos;i="6.04,230,1695679200"; d="scan'208";a="71731162" From: To: Date: Mon, 27 Nov 2023 10:27:02 +0100 Message-ID: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Originating-IP: [10.115.26.50] X-ClientProxiedBy: OPE16NORMBX607.corporate.adroot.infra.ftgroup (10.115.27.31) To OPE16NORMBX305.corporate.adroot.infra.ftgroup (10.115.27.10) X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=orange.com; i=@orange.com; q=dns/txt; s=orange002; t=1701077228; x=1732613228; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=9Vy6Q6qEGw7BgFmvgMLANfSfpTM0s3LzQZwLtRNEGS0=; b=Rsi4LEOg9UkrOMjJAvbblkYfX0Wkg0wy0ugF9TwA1ltPyIiuOJyQrEFn 0rHZzpkuFZNitbDOEftLNa7W6Yg2FwHoMVey/XkasU+5BM29Aklm5nwfm zKW/YXR2U7rftqA7n7Aygm3jkglu3cF9iV5xRc9w3CosFWDflI1Y2faQR +PI82VhGhT0mt34PhgE0PqDX3iwrErdr5AUbeIxcFYPDKzFMgV0mrP/qM mlkrRTkWlxY4XBjOIX+65lBfdKZzApvTJtgsspVO2/uJTG4w1VAI6uy+I Gx3cT/0PiMkDCHH8xSisCIvAJi1ZYY16jP6p3OwGMX6vzR7AhfCF+wZL5 A==; X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=orange.com header.i=@orange.com header.a=rsa-sha256 header.s=orange002 header.b=Rsi4LEOg Subject: [Buildroot] [PATCH] package/Erlang: disable for uclibc, fix glibc-build X-BeenThere: buildroot@buildroot.org 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: Maxim Kochetkov , Bernd Kuhls , yann.morin@orange.com Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" From: "Yann E. MORIN" Commit 2cfa86a54882(package/erlang: bump version to 26.0.2) added a patch to restore building on uClibc. However, that patch is not upstream, and has been rejected: https://github.com/erlang/otp/pull/7500 Please open a PR to https://github.com/asmjit/asmjit instead and we will get the fix next time we sync with upstream. We do not want theirs and our implementation to diverge. Furthermore, it happens to work on uClibc, because uClibc does not expose sys/auxv.h, but it fails to work on glibc, because the define is not propagated to "sub-trees", and thus is never defined where it is checked for, even when sys/auxv.h is available. This causes build failures such as: asmjit/core/cpuinfo.cpp: In function ‘void asmjit::_abi_1_10::detectHWCaps(CpuInfo&, long unsigned int, const LinuxHWCapMapping*, size_t)’: asmjit/core/cpuinfo.cpp:840:24: error: ‘getauxval’ was not declared in this scope 840 | unsigned long mask = getauxval(type); | ^~~~~~~~~ asmjit/core/cpuinfo.cpp: In function ‘void asmjit::_abi_1_10::detectARMCpu(CpuInfo&)’: asmjit/core/cpuinfo.cpp:972:21: error: ‘AT_HWCAP’ was not declared in this scope 972 | detectHWCaps(cpu, AT_HWCAP, hwCapMapping, ASMJIT_ARRAY_SIZE(hwCapMapping)); | ^~~~~~~~ asmjit/core/cpuinfo.cpp:973:21: error: ‘AT_HWCAP2’ was not declared in this scope 973 | detectHWCaps(cpu, AT_HWCAP2, hwCapMapping2, ASMJIT_ARRAY_SIZE(hwCapMapping2)); | ^~~~~~~~~ Yet, sys/auxv.h was detected at configure time: checking for sys/auxv.h... yes This defconfig is enough to reproduce the error: BR2_aarch64=y BR2_TOOLCHAIN_EXTERNAL=y BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y BR2_PACKAGE_ERLANG=y Since upstream refused the patch, and there is no fix that was submitted to the actual upstream (asmjit), drop the rejectred patch, and disable for uClibc: the patch is incorrect, and we can't fix a build issue on uClibc by introducing another on glibc. Fixes: http://autobuild.buildroot.org/results/fc1/fc19bad2263bdfacea594217d5ddfde0e27895b1/ http://autobuild.buildroot.org/results/114/11416d81d5b27fc0627b335a971154c088d5754a/ Signed-off-by: Yann E. MORIN Cc: Bernd Kuhls Cc: Maxim Kochetkov --- .../0001-erts-check-for-sys-auxv.h.patch | 44 ------------------- package/erlang/Config.in | 1 + 2 files changed, 1 insertion(+), 44 deletions(-) delete mode 100644 package/erlang/0001-erts-check-for-sys-auxv.h.patch diff --git a/package/erlang/0001-erts-check-for-sys-auxv.h.patch b/package/erlang/0001-erts-check-for-sys-auxv.h.patch deleted file mode 100644 index af4b66d05d..0000000000 --- a/package/erlang/0001-erts-check-for-sys-auxv.h.patch +++ /dev/null @@ -1,44 +0,0 @@ -From ede1e17794c2caf091e810bdfa49040c75f513eb Mon Sep 17 00:00:00 2001 -From: Bernd Kuhls -Date: Sat, 15 Jul 2023 18:36:48 +0200 -Subject: [PATCH] erts: check for sys/auxv.h - -Upstream: https://github.com/erlang/otp/pull/7500 - -Signed-off-by: Bernd Kuhls ---- - erts/configure.ac | 2 +- - erts/emulator/asmjit/core/cpuinfo.cpp | 2 ++ - 2 files changed, 3 insertions(+), 1 deletion(-) - -diff --git a/erts/configure.ac b/erts/configure.ac -index a63d391fb3..9d3e338633 100644 ---- a/erts/configure.ac -+++ b/erts/configure.ac -@@ -1655,7 +1655,7 @@ AC_CHECK_HEADERS(fcntl.h limits.h unistd.h syslog.h dlfcn.h ieeefp.h \ - sys/socket.h sys/sockio.h sys/socketio.h \ - net/errno.h malloc.h arpa/nameser.h libdlpi.h \ - pty.h util.h libutil.h utmp.h langinfo.h poll.h sdkddkver.h \ -- elf.h) -+ elf.h sys/auxv.h) - - AC_CHECK_MEMBERS([struct ifreq.ifr_hwaddr], [], [], - [#ifdef __WIN32__ -diff --git a/erts/emulator/asmjit/core/cpuinfo.cpp b/erts/emulator/asmjit/core/cpuinfo.cpp -index fb2acfc09b..d8b72697ab 100644 ---- a/erts/emulator/asmjit/core/cpuinfo.cpp -+++ b/erts/emulator/asmjit/core/cpuinfo.cpp -@@ -15,8 +15,10 @@ - - // Required by `getauxval()` on Linux. - #if defined(__linux__) -+#if defined(HAVE_SYS_AUXV_H) - #include - #endif -+#endif - - //! Required to detect CPU and features on Apple platforms. - #if defined(__APPLE__) --- -2.39.2 - diff --git a/package/erlang/Config.in b/package/erlang/Config.in index d3fe0dbec1..490d903027 100644 --- a/package/erlang/Config.in +++ b/package/erlang/Config.in @@ -27,6 +27,7 @@ config BR2_PACKAGE_ERLANG depends on BR2_USE_WCHAR depends on !BR2_STATIC_LIBS depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_TOOLCHAIN_USES_UCLIBC depends on BR2_PACKAGE_ERLANG_ARCH_SUPPORTS select BR2_PACKAGE_ZLIB help