From patchwork Thu Jul 1 19:29:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrice Fontaine X-Patchwork-Id: 1499701 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=140.211.166.136; helo=smtp3.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=T4KgfD3O; dkim-atps=neutral Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (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 4GG7bM5LVQz9sT6 for ; Fri, 2 Jul 2021 05:30:21 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 3DA8260B17; Thu, 1 Jul 2021 19:30:19 +0000 (UTC) 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 FUl9D9OvVqnw; Thu, 1 Jul 2021 19:30:18 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 89CDB60B15; Thu, 1 Jul 2021 19:30:17 +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 43E471BF419 for ; Thu, 1 Jul 2021 19:30:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 404C660B15 for ; Thu, 1 Jul 2021 19:30:16 +0000 (UTC) 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 m2yj4tDCM6hp for ; Thu, 1 Jul 2021 19:30:15 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by smtp3.osuosl.org (Postfix) with ESMTPS id 409B660A81 for ; Thu, 1 Jul 2021 19:30:15 +0000 (UTC) Received: by mail-wr1-x42f.google.com with SMTP id p8so9637912wrr.1 for ; Thu, 01 Jul 2021 12:30:15 -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=743a1m/OIHyvMNKhfQpkXxg4Ii52OnMohDpcH/SnFR0=; b=T4KgfD3OvcrdP1dSKmCda8e4a4PRgoA/p5wrLijYUjkCv2zPaaLo+MfYArln80dFug T5b2iTA1qLFq1iTnnhy+4mXmuElrh9HHrirMygwJTmj/yMAO9Fjf9S/074wEI3PSW8HM F6Nl9QU9fS8SlXhD5iWe4/7jkRB5yGHbrYH3KwgJiZ8zvE46Hz7rM87BM+JVK1l7yScY h/syyPdsyzQpcC/mRqWMDUObjtjWbn+Q8nhLGQ5CRaSxz2svaHWWPZJk1VgpmA4K4rdX eYcbw8hKFhW8+C7FycxlZF0URXzMjUZbm5VCcndzGzjmSrdr43lp5K8wYqtyKRufHpnO OuQg== 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=743a1m/OIHyvMNKhfQpkXxg4Ii52OnMohDpcH/SnFR0=; b=Bh4Mm2sXs44Ey+lt6NowsxDrj6PoMZT5XiXu97K/JYCB2sZvy+WU08zuWadsiK9CdK ADbfQGgQPE/DC9gD/JR+5QrZ11/Mhz8AWh6nu3lWBAN/LlrHzyp4+VMe1RHh03FFxL2q +LMynS73O/Td3QXn0ebi03lT9iZmPS/NsWCbAH1IlihQgpI7+QgrwNTZg+n23jCqo53N qedlLqJ4GRHju9ft0acFt4kh0QTsNfaNIjqj3RbmaMVSsXjNSYvqrAet1LG/7E1eo1jP OndzgY8D9AnmBboeSTCBpPAGMrJkkuIxvloZmiqxlczbCDqYCovNSgAaCIheb504fEVu QaIw== X-Gm-Message-State: AOAM530aWcmfvaw5rilQNM8O3JXLRZwY8u1v8vlFzROI8h+A2dEcLXjZ QuV+74hkqjMuUw3AY3harGnPUEn4fyn/KQ== X-Google-Smtp-Source: ABdhPJz+JRjG/w0y2svwO7PcvgQSiXAe/yA9upxeRC2aQsOLtm4LG76lazIEZPcvc0udb0OViQQRww== X-Received: by 2002:a5d:5302:: with SMTP id e2mr1468348wrv.75.1625167813013; Thu, 01 Jul 2021 12:30:13 -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 e8sm919423wrq.10.2021.07.01.12.30.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jul 2021 12:30:12 -0700 (PDT) From: Fabrice Fontaine To: buildroot@buildroot.org Date: Thu, 1 Jul 2021 21:29:59 +0200 Message-Id: <20210701192959.137405-1-fontaine.fabrice@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/1] package/zstd: fix dynamic build without threads 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: Andrey Smirnov , Fabrice Fontaine Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Dynamic build without threads is broken since bump to version 1.5.0 in commit aad8bbf58842dd62a4911d2c671ad9598e26b459 Indeed, dynamic library is built with threads support since https://github.com/facebook/zstd/commit/91465e23b2710de031a762874cafb417f8b7556e To fix this build failure, add -nomt if needed however libzstd-nomt is a "special target that builds a library in single-thread mode _and_ without zstdmt_compress.c". For an unknown reason, this target fails to build and don't create any symlinks so replace libzstd-{mt,nomt} by lib-{mt,nomt} even if this will have the side effect of building a shared and a static version of the library. While at it, also replace "libzstd.a libzstd" by "lib" Fixes: - http://autobuild.buildroot.org/results/e609601a0fc91c44d88a12c35b29ce937381462f Signed-off-by: Fabrice Fontaine --- package/zstd/zstd.mk | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/package/zstd/zstd.mk b/package/zstd/zstd.mk index 2a876376a2..47d774bc81 100644 --- a/package/zstd/zstd.mk +++ b/package/zstd/zstd.mk @@ -43,19 +43,22 @@ ifeq ($(BR2_STATIC_LIBS),y) ZSTD_BUILD_LIBS = libzstd.a ZSTD_INSTALL_LIBS = install-static else ifeq ($(BR2_SHARED_LIBS),y) -ZSTD_BUILD_LIBS = libzstd +ZSTD_BUILD_LIBS = lib ZSTD_INSTALL_LIBS = install-shared else -ZSTD_BUILD_LIBS = libzstd.a libzstd +ZSTD_BUILD_LIBS = lib ZSTD_INSTALL_LIBS = install-static install-shared endif # The HAVE_THREAD flag is read by the 'programs' makefile but not by the 'lib' -# one. Building a multi-threaded binary with a library (which defaults to -# single-threaded) gives a runtime error when compressing files. -# The 'lib' makefile provides specific '%-mt' targets for this purpose. +# one. Building a multi-threaded binary with a static library (which defaults +# to single-threaded) gives a runtime error when compressing files. +# The 'lib' makefile provides specific '%-mt' and '%-nomt' targets for this +# purpose. ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) ZSTD_BUILD_LIBS := $(addsuffix -mt,$(ZSTD_BUILD_LIBS)) +else +ZSTD_BUILD_LIBS := $(addsuffix -nomt,$(ZSTD_BUILD_LIBS)) endif define ZSTD_BUILD_CMDS