From owner-freebsd-toolchain@FreeBSD.ORG Wed Mar 5 11:30:37 2014 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9EF59302; Wed, 5 Mar 2014 11:30:37 +0000 (UTC) Received: from mail.made4.biz (mail.made4.biz [IPv6:2001:41d0:2:c018::1:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 62B83C93; Wed, 5 Mar 2014 11:30:37 +0000 (UTC) Received: from [2001:1b48:10b:cafe:225:64ff:febe:589f] (helo=viking.yzserv.com) by mail.made4.biz with esmtpsa (TLSv1:DHE-RSA-AES128-SHA:128) (Exim 4.82 (FreeBSD)) (envelope-from ) id 1WLA1y-000IXZ-5o; Wed, 05 Mar 2014 12:30:36 +0100 Message-ID: <53170AD1.4090506@FreeBSD.org> Date: Wed, 05 Mar 2014 12:30:25 +0100 From: =?ISO-8859-1?Q?Jean-S=E9bastien_P=E9dron?= User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: freebsd-toolchain@freebsd.org Subject: Various issues with Clang and libc++ while playing with OpenCL (FYI) X-Enigmail-Version: 1.6 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="QDV5WFf1Xs5Qkq47TOCi0qhIRjdPHel1u" Cc: Koop Mast X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Mar 2014 11:30:37 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --QDV5WFf1Xs5Qkq47TOCi0qhIRjdPHel1u Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello! [Note: I'm not subscribed to this list] I'm trying to make OpenCL work on FreeBSD, using Mesa 10.1 release candidate. The implementation of libOpenCL.so in Mesa, called Clover, is in C++. In the configure.ac script, they require GCC 4.7+, but I think it's mainly for C++11 support. When building Mesa with Clang 3.4 and 11-CURRENT's libc++, I had the following issues: 1. Clang 3.4 fails to build Clover, see this PR: https://bugs.freedesktop.org/show_bug.cgi?id=3D74098 In the last comment, there's a patch to Clover, working around the problem. Its author opened a ticket on LLVM bug tracker: http://llvm.org/bugs/show_bug.cgi?id=3D18645 2. Mesa's configure script is looking for stddef.h here: /usr/local/llvm34/lib/clang/3.4/include LLVM/Clang ports don't install this file. I just added a symlink to /usr/include/stddef.h and Mesa was happy. I still need to check how it goes if I remove the check and the symlink. But perhaps Mesa is right to expect this header (and maybe other) in this directory, I don't know. 3. Our base libc++ has a bug in the header. I posted a PR on Mesa bug tracker here, before I found out it was a problem with libc++: https://bugs.freedesktop.org/show_bug.cgi?id=3D75505 Apparently, it's fixed in libc++ upstream, in r199848. 4. At runtime, any OpenCL program segfaults in libc++ (I don't have the stack trace at hand and can't remember what it was... Something with basic_string). When using libc++ from ports (devel/libc++, r200683) and the work around for problem #1, Clover builds and OpenCL programs run fine. This is mostly a "FYI" report, I think we can live with libc++ from ports for Mesa. --=20 Jean-S=E9bastien P=E9dron --QDV5WFf1Xs5Qkq47TOCi0qhIRjdPHel1u Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJTFwrZAAoJEDnpl2Gl/ZTMNEQP/iPjLUvmvma+BeGvOWwsL7Oj UnrjUNTYVQ9QTuFdzUONJxRVEwlcx0rUejHWKZEe7sgHZjJlawITs6kVJNA0cEz3 r5gKfib2GCH5Mc0YUDEsIEEDJs5vbFCE6aONYZ3X5SK5vDRap7H86X/4PKR4K8p/ +plrHWLtovITGvn83sOlzu6zyPZfhEOJuze/vdgJYu0JhXdkoUqyP4ZCqSjHltDd rD3E3rDXWDKfJ97NY9WAH8/chZb8XntCSCdfApl6Vocy9vJFkzHCfnIJpJjF5cSx P/20C55Zxmix41Ls5NycWbtLjJ7FSoOV+dM0sBaAHe545dXZhEjF32oIQUUmQqRZ wNVlZY6GWCVBf6+fmhrkuXgAzmm3cMdj9pRgBXTmEoFG7VerulQ6uEQTwbQakU83 47MMHiQEscXo3Lhxxwqxz3MpTsDUWN7rUxZtDx//akpgGDvktP2ytuD0wCZF9+ol cELlr9E1+m13b2DObSq4qwT7j6v+nCb3eLrYokwEZACFKnzWa8thlOOYrks/efT+ GxIEsVpEnVoD4XbtVG6aK9NYUiIjNO2rVQWNsAnMMwQr69Nt1gWxI0R1fljmxEj3 k0mAUZiDjk2qy2Vb29ueoIkDJ55rIH01EhCXBlVUke8/xJ6D4q2yb5nQrfmMd4rU 8UJCKh+Q6WvOGyth1Jo4 =IbRs -----END PGP SIGNATURE----- --QDV5WFf1Xs5Qkq47TOCi0qhIRjdPHel1u--