Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4543022imm; Mon, 30 Jul 2018 17:15:02 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdhfH96HgGzhiHNdxc3nbUkL4lu/SA6PSzPSg6JNRpVfaHJiJ8NLAb0ef9+yF6xswvqK1/T X-Received: by 2002:a17:902:25ab:: with SMTP id y40-v6mr6016465pla.120.1532996102322; Mon, 30 Jul 2018 17:15:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532996102; cv=none; d=google.com; s=arc-20160816; b=P7DvJPsxaK6Ino/0Ss00Y06AswkU2atVh2xKxIyEQARp/1J0WTaFYcygK7DYBK42z9 ACk+cJzoxnPHcQ58Dj7byEygArA+MZzjhe3mLusqYCeDBvMDWpJMSqyzZ9mDcJk9S/jm zCHjo3gmjwkMaXUN0NilRVrpZvE1j/RevXLWzzVrE02TiCYW3jpUyFgbe8aoZplFeutq Z+C+zlTCrZXGE3nbEAsCDQMyMyYMnGEIuyFu0JT9pHtQzaNA8OKCA4Nl06Zry6J7DbnS sQ35KkWo1uPE/qXF33Te2ZF6gsAjkGpg02Rl/CMDOLaqZo0lOAEes1e1LoD/uF3dAf4D eD0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=n143SrL6VDsL4Kqnv1Zchxa8q88H+rujc7DpJba7doo=; b=vLsgnAc8i7THz0BBmb0gYXwsC+YspcAv+t3PZ7mHyfGKs6TnQH/l//GK1t6MB36R9Y gzkqwnR2nc6W/p3LxMQO+do77cxwwX+KEBzQeibYRMR9d73+K4Ffu9NFCCYql+geOwNQ pj4PUtDj8RDsfvTBVIzwrk+BmA1bbQH0vi9RNG+x6O8t+RlsRweLm4/xKjP7ngk5Y3xV vvpwZks5FcXgB5ExNZXe9PKcPhD5b+Cy1IsZEUy+fBq1bDj5R4ZdhbdTrf4P0wdxtXIO J5fN+KLJE43iwHc7HeoO4U3cT33mp5JZ7/0vsaAHcZgyH2fy5MU8jIb0dfMomWy1opfk k3hA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 11-v6si4025305plc.154.2018.07.30.17.14.47; Mon, 30 Jul 2018 17:15:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732128AbeGaBv0 (ORCPT + 99 others); Mon, 30 Jul 2018 21:51:26 -0400 Received: from www62.your-server.de ([213.133.104.62]:50144 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731941AbeGaBvZ (ORCPT ); Mon, 30 Jul 2018 21:51:25 -0400 Received: from [78.46.172.3] (helo=sslproxy06.your-server.de) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.85_2) (envelope-from ) id 1fkIIT-000782-1Z; Tue, 31 Jul 2018 02:13:53 +0200 Received: from [62.203.87.61] (helo=linux.home) by sslproxy06.your-server.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1fkIIS-000Nzh-T9; Tue, 31 Jul 2018 02:13:52 +0200 Subject: Re: [PATCH v3] perf build: Build error in libbpf with EXTRA_CFLAGS="-Wp,-D_FORTIFY_SOURCE=2 -O2" To: Jakub Kicinski , Thomas Richter Cc: ast@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, heiko.carstens@de.ibm.com, brueckner@linux.vnet.ibm.com, schwidefsky@de.ibm.com References: <20180730085323.75738-1-tmricht@linux.ibm.com> <20180730123509.0ffa4737@cakuba.netronome.com> From: Daniel Borkmann Message-ID: Date: Tue, 31 Jul 2018 02:13:52 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20180730123509.0ffa4737@cakuba.netronome.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.100.0/24797/Mon Jul 30 18:42:33 2018) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/30/2018 09:35 PM, Jakub Kicinski wrote: > On Mon, 30 Jul 2018 10:53:23 +0200, Thomas Richter wrote: >> commit 531b014e7a2f ("tools: bpf: make use of reallocarray") >> causes a compiler error when building the perf tool in the linux-next >> tree. Compile file tools/lib/bpf/libbpf.c on a FEDORA 28 >> installation with gcc compiler >> version: gcc (GCC) 8.0.1 20180324 (Red Hat 8.0.1-0.20) >> shows this error message: >> >> [root@p23lp27] # make V=1 EXTRA_CFLAGS="-Wp,-D_FORTIFY_SOURCE=2 -O2" >> [...] >> make -f /home6/tmricht/linux-next/tools/build/Makefile.build >> dir=./util/scripting-engines obj=libperf >> libbpf.c: In function ‘bpf_object__elf_collect’: >> libbpf.c:811:15: error: ignoring return value of ‘strerror_r’, >> declared with attribute warn_unused_result [-Werror=unused-result] >> strerror_r(-err, errmsg, sizeof(errmsg)); >> ^ >> cc1: all warnings being treated as errors >> mv: cannot stat './.libbpf.o.tmp': No such file or directory >> /home6/tmricht/linux-next/tools/build/Makefile.build:96: recipe for target 'libbpf.o' failed >> >> Replace all occurrences of strerror() by calls to strerror_r(). >> To keep the compiler quiet also use the return value from strerror_r() >> otherwise a 'variable set but not use' warning which is treated as error >> terminates the compile. >> >> Cc: Alexei Starovoitov >> Cc: Daniel Borkmann >> Cc: Jakub Kicinski >> Suggested-by: Jakub Kicinski >> Suggested-by: Daniel Borkmann >> Reviewed-by: Hendrik Brueckner >> Signed-off-by: Thomas Richter Applied to bpf-next, thanks Thomas!