From owner-freebsd-current@freebsd.org Thu Dec 29 19:26:42 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 83D13C963C5; Thu, 29 Dec 2016 19:26:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1A07112C9; Thu, 29 Dec 2016 19:26:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:7b8:3a7::7d0d:fedb:8b40:bd7f] (unknown [IPv6:2001:7b8:3a7:0:7d0d:fedb:8b40:bd7f]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 0BE1118E00; Thu, 29 Dec 2016 20:26:39 +0100 (CET) Content-Type: multipart/signed; boundary="Apple-Mail=_7E4B473B-2A78-450A-B2FA-D18E34A4078C"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: emulators/qemu: qemu ports failing due to compiler error on 12-CURRENT From: Dimitry Andric In-Reply-To: <20161229172949.48792b29@thor.walstatt.dynvpn.de> Date: Thu, 29 Dec 2016 20:26:32 +0100 Cc: FreeBSD CURRENT , FreeBSD Ports , Ed Maste Message-Id: References: <20161207104203.7c9524a3@thor.walstatt.dynvpn.de> <782FAC01-9A7C-438F-912C-831628A08E63@FreeBSD.org> <20161229172949.48792b29@thor.walstatt.dynvpn.de> To: "O. Hartmann" X-Mailer: Apple Mail (2.3124) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Dec 2016 19:26:42 -0000 --Apple-Mail=_7E4B473B-2A78-450A-B2FA-D18E34A4078C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 29 Dec 2016, at 17:29, O. Hartmann wrote: >=20 > Am Wed, 7 Dec 2016 23:31:01 +0100 > Dimitry Andric schrieb: >=20 >> On 07 Dec 2016, at 10:42, O. Hartmann wrote: >>>=20 >>> I try my first steps in cross compiling ports with poudriere and = therefore I try to >>> setup an appropriate jail and QEMU environment. >>>=20 >>> Well, I'm failing at the jail setup due to the non-exitence of any = suitable QEMU >>> environment and for that I tried to figure out to find some proper = HOWTO. >>> Searching via google ave some hints, but in questions which QEMU = from ports should be >>> used, all leave me alone, so I tried >>>=20 >>> emulators/qemu >>> emulators/qemu-devel >>> emulators/qemu-static >>>=20 >>> emulators/qemu is known for me to fail since months and the days of = 11-CURRENT, there >>> is a compiler error spit out with clang 3.8 and now 3.9. The very = same for qemu-devel >>> (both ports used with standard options, no extras). See also Bug = 214873 >>> (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D214873) and Bug = 215100 >>> (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D215100). >>=20 >> I couldn't reproduce the compilation errors, it builds fine for me = until >> the link phase. >=20 > Well, I face this in poudriere on the most recent 12-CURRENT, too as = well as 12-CURRENT > buildworld today. >=20 > On the host I'd like to run qemu for testing aarch64 binaries for a = Odroid-C2 project, I > use a customized /etc/src.conf - but on poudriere, there is no such = customisation but > the failing is identical. Looking at your errors, it seems that the port has decided to enable rdma support. This is normally enabled using --enable-rdma with the configure script, but I don't see that at all in the port Makefile. On my systems, it runs a test to check for rdma support, but this fails. Quoting from config.log: cc -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=3D64 -D_LARGEFILE_SOURCE = -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings = -Wmissing-prototypes -fno-strict-aliasing -fno-common = -I/usr/work/share/dim/ports/emulators/qemu/work/qemu-2.6.1 = -I/usr/local/include -DPREFIX=3D\""/usr/local\"" -Wno-string-plus-int = -Wno-initializer-overrides -Wendif-labels -Wmissing-include-dirs = -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self = -Wignored-qualifiers -Wold-style-definition -Wtype-limits = -fstack-protector-strong -I/usr/local/include = -I/usr/local/include/p11-kit-1 -I/usr/local/include -o = config-temp/qemu-conf.exe config-temp/qemu-conf.c -m64 -g = -fstack-protector -L"/usr/local/lib" -lrdmacm -libverbs config-temp/qemu-conf.c:1:10: fatal error: 'rdma/rdma_cma.h' file = not found #include ^ The minimal test program it tries to compile here is just this: #include int main(void) { return 0; } and it attempts to link it with -lrdmacm -libverbs. If this somehow succeeds on your system, then it will think rdma support is available, while apparently the support is not complete, if it misses the rdma_getaddrinfo() function. Do you have some Linux rdma or infiniband headers or libraries installed into /usr or /usr/local? This might be the cause of the problems. If you don't want or care about rdma, you can try the following patch (should similarly apply to the other qemu ports): Index: emulators/qemu/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- emulators/qemu/Makefile (revision 429888) +++ emulators/qemu/Makefile (working copy) @@ -78,6 +78,7 @@ --disable-libssh2 --enable-debug \ --prefix=3D${PREFIX} --cc=3D${CC} --enable-docs = --disable-kvm \ --disable-linux-user --disable-linux-aio --disable-xen \ + --disable-rdma \ --smbd=3D${LOCALBASE}/sbin/smbd --enable-debug-info = --python=3D${PYTHON_CMD} \ --extra-cflags=3D-I${WRKSRC}\ -I${LOCALBASE}/include\ = -DPREFIX=3D\\\"\"${PREFIX}\\\"\" -Dimitry --Apple-Mail=_7E4B473B-2A78-450A-B2FA-D18E34A4078C Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.30 iEYEARECAAYFAlhlY24ACgkQsF6jCi4glqPl9gCggjnnz4w9JLTLO0h5jxTc1Ce7 XgMAn0h6QKO4VGrPdzsM6ViQhsjswGIG =Amfo -----END PGP SIGNATURE----- --Apple-Mail=_7E4B473B-2A78-450A-B2FA-D18E34A4078C--