From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:57677) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gj3M9-0002Dv-Ka for qemu-devel@nongnu.org; Mon, 14 Jan 2019 09:36:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gj3M3-0007NW-9x for qemu-devel@nongnu.org; Mon, 14 Jan 2019 09:36:49 -0500 References: <1547473614-20033-1-git-send-email-thuth@redhat.com> <2d8dad3d-05a1-7c16-4640-1df9e2b82642@redhat.com> From: Thomas Huth Message-ID: Date: Mon, 14 Jan 2019 15:36:17 +0100 MIME-Version: 1.0 In-Reply-To: <2d8dad3d-05a1-7c16-4640-1df9e2b82642@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] configure: Work-around a bug in libiscsi 1.9.0 when used in gnu99 mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= , Peter Maydell , qemu-devel@nongnu.org, berrange@redhat.com Cc: Paolo Bonzini , Peter Lieven , qemu-block@nongnu.org, Ronnie Sahlberg On 2019-01-14 15:31, Philippe Mathieu-Daud=C3=A9 wrote: > On 1/14/19 2:46 PM, Thomas Huth wrote: >> The header "scsi-lowlevel.h" of libiscsi 1.9.0 contains some bad >> "inline" prototype definitions which GCC refuses to compile in its >> gnu99 mode: >> >> In file included from block/iscsi.c:52:0: >> /usr/include/iscsi/scsi-lowlevel.h:810:13: error: inline function >> =E2=80=98scsi_set_uint16=E2=80=99 declared but never defined [-Werror] >> inline void scsi_set_uint16(unsigned char *c, uint16_t val); >> ^ >> /usr/include/iscsi/scsi-lowlevel.h:809:13: error: inline function >> =E2=80=98scsi_set_uint32=E2=80=99 declared but never defined [-Werror] >> inline void scsi_set_uint32(unsigned char *c, uint32_t val); >> ^ >> >> This has been fixed by upstream libiscsi in version 1.10.0 (see >> https://github.com/sahlberg/libiscsi/commit/7692027d6c11 ), but >> since we still want to support 1.9.0 for CentOS 7 / RHEL7, we >> have to work-around the issue by compiling with "-fgnu89-inline" >> in this case instead. >> >> Suggested-by: Daniel P. Berrang=C3=A9 >> Signed-off-by: Thomas Huth >> --- >> configure | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> diff --git a/configure b/configure >> index 2b9ba7d..aa80c17 100755 >> --- a/configure >> +++ b/configure >> @@ -4562,6 +4562,11 @@ if test "$libiscsi" !=3D "no" ; then >> libiscsi=3D"yes" >> libiscsi_cflags=3D$($pkg_config --cflags libiscsi) >> libiscsi_libs=3D$($pkg_config --libs libiscsi) >> + if $pkg_config --exact-version=3D=3D1.9.0 libiscsi; then >=20 > The first offending commit is d327ab09c which got included in 1.8.0, so > using "exact" is not correct. We require at least version 1.9.0, so the only version which can have this problem when compiling QEMU is 1.9.0. Thomas