Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1420676iog; Sat, 25 Jun 2022 08:52:38 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sxdVtpHUAjkfwVksad9ulSRQr0EkrpgB/zeqQVTawBgMT8WPN8GgoTt1AQr8c46k1LKXDu X-Received: by 2002:a17:907:3e18:b0:722:be7e:302c with SMTP id hp24-20020a1709073e1800b00722be7e302cmr4396904ejc.437.1656172357967; Sat, 25 Jun 2022 08:52:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656172357; cv=none; d=google.com; s=arc-20160816; b=UtV949yea+S/sEc5yMFS47ZCCRv3o21omUDXE+uvlTHW0gaWudLHjQTM1ZTUQ2EqrQ SBgTjkm7oqmfscE+EvfyCE4eRAbwjrW5m+yZtISgXT0xqbcs9QQlFaoy3eZ+JsTmZG2+ GD0JPxBXDdsy7T4jp/nKl8hOF/HS4cFFkzo2QLVMrR7fMlrFPc2/UVpI6UBDNxUAiXaE HRlkcaTB94VeTiy9q/c3XbneSjmhb3686voTqljk06ix+5U/sCvJq+yZVrBvwuj0UVfa hWFw+E7hFL8vlaerh0tTiSA6e3Vscfqq5gIMhDmVifQan4HKboqafwJsgQBm42WfMKXe OFdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=FhikbhadDQ0rX9caD2bvCSuXqnUHt6OCEuRHo6pJkvA=; b=h28RjA2ginA0LvmHiNKMjY5ZhneS12Al/Enl0VpUPTtaAbyPB11u1gNbpITnNuvsBf QqzvVmHtrej4CkfkxMiWo6BeTVL2GH4x5kXRjzLovO8emXSlW0QHLK43JF+G5eGWVpgp o9sYQykU3iVHeFwuB8+isbbe9ICI7ENeKn98EvUC7U+Tbfa2KEJYCF2+A75A0svg+Y0y 44/OphcLD+3rT976C/F4F19NsaTuakSOpx6m4tnaEhirL8lyt1gpmOi6cpu94osbHb7c 4Uxx6HQl/Bvze/FJ7fkRmspiVrZGEDvfCwW0BSO5snzACrjP7Oi6InH+gq/2YRky81OA Vhkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=fIXNCPCR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p30-20020a50cd9e000000b0042dfbca64d5si6600795edi.605.2022.06.25.08.52.01; Sat, 25 Jun 2022 08:52:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=fIXNCPCR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233112AbiFYPe4 (ORCPT + 99 others); Sat, 25 Jun 2022 11:34:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233065AbiFYPez (ORCPT ); Sat, 25 Jun 2022 11:34:55 -0400 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82B61DF48; Sat, 25 Jun 2022 08:34:54 -0700 (PDT) Received: by mail-pj1-x1033.google.com with SMTP id i8-20020a17090aee8800b001ecc929d14dso7500432pjz.0; Sat, 25 Jun 2022 08:34:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=FhikbhadDQ0rX9caD2bvCSuXqnUHt6OCEuRHo6pJkvA=; b=fIXNCPCRvCTu0lOgEh4HFQea67b2Jj2R1K+2555bdlcq4Ka1gXG9Jm8ynFsm7+ilLW XRUm8/pMJUAq9h1G2AjrCTsAKXczSJBlKoQRihOYSk60y4ipilOwcOA8R+cMf7+vXJby seMiyL9Xb/Wg8TfMkmI57kc2/ViJ7ka2ySl8cC/oANRIJZQLR5RiUSA0/ugDJ1K9ZYaA 5MwLSOwOYR+RWZcTqro9aMki4SYkIbPMbBR0DUuiNtCSSKAbRGqXb4PhUcD32PIv7GWm BAM8+keXZKnzHNhwR9RjXm5gM/sRYjnH1Lhm+MhKIuRUi5YfCbdvxQol7MVlvtO+xvPv u+AA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=FhikbhadDQ0rX9caD2bvCSuXqnUHt6OCEuRHo6pJkvA=; b=ryolrr/4RqZ4BQHn1qdT+dtiGRJx57o1PtQu7luHZUYFTFWWAMwvex9OdqEWJkYsl6 gxG7NkywSmWBlgdwmEA1bNFIg8GbgP6pVpxToU8EKi4MNWha97qyV5QjiLbFAGrF+F6e Za3Ix5G/kKqCloLAJQW8wKjRdA5gzS0jRWSFkdSKL16Apq8mJBgxkULzbIZb1Yx8eBiT DGkMz9hKazMZqtoKk412d4UKgBIP8Gs/PtMU3IeezbYXVUcaMeWekO+H1gcBFIvgG7g/ Q55UqefZukfJIJNJal5qqtbcust6wInZz27XQXwxyLyn8FdrMnGcsk/D3P1U8Cm+1TEv p82w== X-Gm-Message-State: AJIora+L1dxsNvJfg1kGeTeLjU7l18no8/7cUCaD53Y8mH+2prk69t6v pt/FkkanWe96ZbYR2dQxF+wzNj05P6HriBvrNuI= X-Received: by 2002:a17:902:6946:b0:167:8ff3:1608 with SMTP id k6-20020a170902694600b001678ff31608mr5010136plt.116.1656171293921; Sat, 25 Jun 2022 08:34:53 -0700 (PDT) Received: from computer.. ([111.43.251.41]) by smtp.gmail.com with ESMTPSA id e17-20020a170902d39100b0016a3db5d608sm3852904pld.289.2022.06.25.08.34.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Jun 2022 08:34:53 -0700 (PDT) From: Zixuan Tan X-Google-Original-From: Zixuan Tan To: terrelln@fb.com Cc: Zixuan Tan , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org Subject: [PATCH] perf build: Suppress openssl v3 deprecation warnings in libcrypto feature test Date: Sat, 25 Jun 2022 23:34:38 +0800 Message-Id: <20220625153439.513559-1-tanzixuan.me@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org With OpenSSL v3 installed, the libcrypto feature check fails as it use the deprecated MD5_* API (and is compiled with -Werror). The error message is as follows. $ make tools/perf ``` Makefile.config:778: No libcrypto.h found, disables jitted code injection, please install openssl-devel or libssl-dev Auto-detecting system features: ... dwarf: [ on ] ... dwarf_getlocations: [ on ] ... glibc: [ on ] ... libbfd: [ on ] ... libbfd-buildid: [ on ] ... libcap: [ on ] ... libelf: [ on ] ... libnuma: [ on ] ... numa_num_possible_cpus: [ on ] ... libperl: [ on ] ... libpython: [ on ] ... libcrypto: [ OFF ] ... libunwind: [ on ] ... libdw-dwarf-unwind: [ on ] ... zlib: [ on ] ... lzma: [ on ] ... get_cpuid: [ on ] ... bpf: [ on ] ... libaio: [ on ] ... libzstd: [ on ] ... disassembler-four-args: [ on ] ``` This is very confusing because the suggested library (on my Ubuntu 20.04 it is libssl-dev) is already installed. As the test only checks for the presence of libcrypto, this commit suppresses the deprecation warning to allow the test to pass. Signed-off-by: Zixuan Tan --- tools/build/feature/test-libcrypto.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/build/feature/test-libcrypto.c b/tools/build/feature/test-libcrypto.c index a98174e0569c..31afff093d0b 100644 --- a/tools/build/feature/test-libcrypto.c +++ b/tools/build/feature/test-libcrypto.c @@ -2,6 +2,12 @@ #include #include +/* + * The MD5_* API have been deprecated since OpenSSL 3.0, which causes the + * feature test to fail silently. This is a workaround. + */ +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + int main(void) { MD5_CTX context; -- 2.34.1