From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by dpdk.org (Postfix) with ESMTP id EB3CD4F9C for ; Fri, 30 Mar 2018 16:28:33 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 428138182D16; Fri, 30 Mar 2018 14:28:33 +0000 (UTC) Received: from localhost (ovpn-204-106.brq.redhat.com [10.40.204.106]) by smtp.corp.redhat.com (Postfix) with ESMTP id CAE9E2026DFD; Fri, 30 Mar 2018 14:28:31 +0000 (UTC) Date: Fri, 30 Mar 2018 16:28:30 +0200 From: Timothy Redaelli To: Maxime Coquelin Cc: Andrew Rybchenko , "dev@dpdk.org" , Ferruh Yigit , Thomas Monjalon , Tonghao Zhang Message-ID: <20180330162830.1d7ccba2@redhat.com> In-Reply-To: <93d00a28-d52d-25b3-42d0-84b1d95c756a@redhat.com> References: <93d00a28-d52d-25b3-42d0-84b1d95c756a@redhat.com> Organization: Red Hat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Fri, 30 Mar 2018 14:28:33 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Fri, 30 Mar 2018 14:28:33 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'tredaelli@redhat.com' RCPT:'' Subject: Re: [dpdk-dev] Build is broken in dpdk-next-net X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Mar 2018 14:28:34 -0000 On Fri, 30 Mar 2018 15:27:55 +0200 Maxime Coquelin wrote: > Hi Andrew, >=20 > On 03/30/2018 03:18 PM, Andrew Rybchenko wrote: > > Hi all, > >=20 > > Build is broken in dpdk-next-net for me on Ubuntu 16.04.4: > >=20 > > lib/librte_vhost/fd_man.c: In function =E2=80=98fdset_pipe_read_cb=E2= =80=99: > > lib/librte_vhost/fd_man.c:284:2: error: ignoring return value of > > =E2=80=98read=E2=80=99, declared with attribute warn_unused_result > > [-Werror=3Dunused-result] read(readfd, charbuf, sizeof(charbuf)); ^ > > lib/librte_vhost/fd_man.c: In function =E2=80=98fdset_pipe_notify=E2=80= =99: > > lib/librte_vhost/fd_man.c:324:2: error: ignoring return value of > > =E2=80=98write=E2=80=99, declared with attribute warn_unused_result > > [-Werror=3Dunused-result] write(fdset->u.writefd, "1", 1); ^ > >=20 > > $ gcc --version > > gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609 =20 >=20 > Thanks for reporting, I don't catch it with my Fedora build system: > $ gcc --version > gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5) Those kind of warnings are enabled by "-D_FORTIFY_SOURCE=3D2" (enabled by default in Ubuntu [1]). To have the same behavior on Fedora you need to set -D_FORTIFY_SOURCE=3D2 by hand, for example with: # make EXTRA_CFLAGS=3D"-D_FORTIFY_SOURCE=3D2" Usually I build dpdk with the flags we also use when we build the Fedora/RHEL package. To do that I have in my .bashrc (all in one line): export EXTRA_CFLAGS=3D"-O2 -g -pipe -Werror=3Dformat-security -Wp,-D_FORTIFY_SOURCE=3D2 -fexceptions -fstack-protector-strong --param=3Dssp-buffer-size=3D4 -grecord-gcc-switches -specs=3D/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=3Dgeneric -fasynchronous-unwind-tables -Wformat" > >=20 > > As I understand it is broken in > > ad94ade905454401b705be9e06b19e54a1c78148 vhost: add pipe event for > > optimizing negotiating =20 >=20 > I confirm it is this patch. >=20 > Xiangxia, can you provide a fix please? >=20 > Ferruh, how do you want to proceed? > Would you revert it? >=20 > Thanks, > Maxime > > Andrew. > > =20 [1] https://wiki.ubuntu.com/ToolChain/CompilerFlags#A-D_FORTIFY_SOURCE.3D2