From owner-freebsd-performance@FreeBSD.ORG Thu Sep 6 14:04:38 2012 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6026E1065677; Thu, 6 Sep 2012 14:04:38 +0000 (UTC) (envelope-from ohartman@mail.zedat.fu-berlin.de) Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) by mx1.freebsd.org (Postfix) with ESMTP id 017F78FC1A; Thu, 6 Sep 2012 14:04:36 +0000 (UTC) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) with esmtp (envelope-from ) id <1T9ch9-0002oE-KO>; Thu, 06 Sep 2012 16:04:35 +0200 Received: from telesto.geoinf.fu-berlin.de ([130.133.86.198]) by inpost2.zedat.fu-berlin.de (Exim 4.69) with esmtpsa (envelope-from ) id <1T9ch9-0003ro-GF>; Thu, 06 Sep 2012 16:04:35 +0200 Message-ID: <5048AD6D.1050600@mail.zedat.fu-berlin.de> Date: Thu, 06 Sep 2012 16:04:29 +0200 From: "O. Hartmann" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:14.0) Gecko/20120810 Thunderbird/14.0 MIME-Version: 1.0 To: Dimitry Andric References: <5047659D.8000107@mail.zedat.fu-berlin.de> <50489C47.4040101@FreeBSD.org> In-Reply-To: <50489C47.4040101@FreeBSD.org> X-Enigmail-Version: 1.4.3 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigEA6BB21C6FDF7EBEAABD5674" X-Originating-IP: 130.133.86.198 X-Mailman-Approved-At: Thu, 06 Sep 2012 16:16:56 +0000 Cc: "freebsd-performance@freebsd.org" , mazhe@alkumuna.eu, Ports FreeBSD Subject: Re: Help. Porting "FreeOCL" fails (atomic_ops.h missing, CLANG++ libc++ issues ...) X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Sep 2012 14:04:38 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigEA6BB21C6FDF7EBEAABD5674 Content-Type: multipart/mixed; boundary="------------050803020201020404080901" This is a multi-part message in MIME format. --------------050803020201020404080901 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello Dimitry, thanks for your response and patches. On 09/06/12 14:51, Dimitry Andric wrote: > On 2012-09-05 16:45, O. Hartmann wrote: > ... >> Well, I tried LLVM/CLANG, but Cmake of the sources fairly fails many >> checks especuially for OpenMP. >=20 > Yes, it is currently not supported. I am not sure if there are serious= > attempts to add it. >=20 >=20 >> Using clang++ requisites the usage of the >> new libc++ (CXXFLAGS+=3D -stdlib=3Dlibc++). But this fails with this e= rror: > ... >> /usr/ports/devel/freeocl/work/FreeOCL-0.3.6-Source/src/parser/parser.h= :118:15: >> >> error: no viable conversion from 'std::__1::basic_istream' to >> 'const bool' >> const bool ok =3D in.get(c); >> ^ ~~~~~~~~~ >=20 > This is a bug in FreeOCL. The istream::get() function returns an > istream reference, which can't be cast directly to bool. However, ther= e > is a negation operator defined for istream, so the line can be changed > to: >=20 > const bool ok =3D !!in.get(c); >=20 > I have attached a patch for the port as I have built it here with clang= =2E > I didn't add the dependency on atomic_ops yet, but it should be fairly > trivial. I fixed that, I forgot the pkg-plist, also. Will followup the PR I sent. it is a simple line: BUILD_DEPENDS=3D ... >=20 > Note I also needed a fix for Mk/bsd.cmake.mk, otherwise the required > ${CPPFLAGS} would not be passed along to CMake, and then the build woul= d > still fail to find the atomic_ops headers in /usr/local/include. Is this going to be fixed with your patch in the ports tree? I'm amazed by the speed you came up with the patches ...;-) My port request can be found here: http://www.freebsd.org/cgi/query-pr.cgi?pr=3D171376 and one for providing the OpenCL header: http://www.freebsd.org/cgi/query-pr.cgi?pr=3D171375 Matthieu Volat also stated that there is another promising OpenCL port "Portable OpenCL", pocl. It seems to have a better LLVM support by design= : http://sourceforge.net/apps/mediawiki/pocl/index.php?title=3DMain_Page Attached you'll find my first naiv attempt to build a port-Makefile, but I fail to fetch(1), since there is an authentication error while trying to fetch from a HTTPS:// source. My abilities in depp-insight-development are limited, so I'm happy if some experienced developers could also look at those software projects and help making a port ;-) it would be nice having FreeOCL and portable OCL for comparison purposes available on FreeBSD. I still have the hope to "lurd" more developers and scientists back to FreeBSD. Never mind ... oh --------------050803020201020404080901 Content-Type: text/plain; charset=us-ascii; name="Makefile" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="Makefile" PORTNAME=3D pocl PORTVERSION=3D 0.6 CATEGORIES=3D devel MAINTAINER=3D ports@FreeBSD.org COMMENT=3D Portable OpenCL - an efficient open source (MIT-licensed) imp= lementation of the OpenCL 1.2 standard. MASTER_SITES=3D https://launchpad.net/pocl/${PORTVERSION}/0.6.0/+downloa= d/ #CONFLICTS=3D freeocl CXXFLAGS+=3D -stdlib=3Dlibc++ LIB_DEPENDS=3D ltdl:${PORTSDIR}/devel/libltdl #USE_GMAKE=3D yes GNU_CONFIGURE=3D yes USE_LDCONFIG=3D yes =2Einclude --------------050803020201020404080901-- --------------enigEA6BB21C6FDF7EBEAABD5674 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.19 (FreeBSD) iQEcBAEBAgAGBQJQSK1zAAoJEOgBcD7A/5N8GVUH/A3OIDJSmhXV/QImCnV5nRvp YeumzzpO8WB7LnMVS2L439wZ4WKjiinPOJCV0qA8GLB2GqyLhW0f36dqD200tZmm nObZxm6W6E2o5acleeVVV3RSdA9PklKomUIDs4qMNr83Cmy+gUIOZD/sTGcnc7xc IBnHs2JjMA5nCrIbfZRL5PmVwckPeT8xPY1bvgVSNusxfQa2DjQzig+0J5K77wiL 77wxUaRz6BVRpcfZJW0F8QlCRgaxvBUIGhSpEn48gNfpmg5JpTNJpVJiqSLCZk5E IvCl0Fa4jQx5HCENVXkYwiEb7bhlDaL/MteRBpnIPNuIRoDMMLTCBr65NnpWSJY= =upkW -----END PGP SIGNATURE----- --------------enigEA6BB21C6FDF7EBEAABD5674--