From owner-freebsd-ports@FreeBSD.ORG Wed Sep 5 14:45:56 2012 Return-Path: Delivered-To: freebsd-ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9E9B3106566B; Wed, 5 Sep 2012 14:45:56 +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 3F6538FC0A; Wed, 5 Sep 2012 14:45:56 +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 <1T9Grb-0000zr-9w>; Wed, 05 Sep 2012 16:45:55 +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 <1T9Grb-0007g1-56>; Wed, 05 Sep 2012 16:45:55 +0200 Message-ID: <5047659D.8000107@mail.zedat.fu-berlin.de> Date: Wed, 05 Sep 2012 16:45:49 +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: Ports FreeBSD , "freebsd-performance@freebsd.org" X-Enigmail-Version: 1.4.3 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigDA220183AD5D429D7C88391E" X-Originating-IP: 130.133.86.198 Cc: Subject: Help. Porting "FreeOCL" fails (atomic_ops.h missing, CLANG++ libc++ issues ...) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Sep 2012 14:45:56 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigDA220183AD5D429D7C88391E Content-Type: multipart/mixed; boundary="------------020905080102060901040901" This is a multi-part message in MIME format. --------------020905080102060901040901 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello. FreeBSD has fallen back far behind the standards of modern scientific computing and I dsperately look for solutions having OpenCL support on FreeBSD anyway. I stumbled into this project recently: FreeOCL at http://code.google.com/p/freeocl/ or the sources located at http://code.google.com/p/freeocl/downloads/detail?name=3DFreeOCL-0.3.6-sr= c.tar.gz&can=3D2&q=3D For your convenience, please find my naive attempt of a port attached to this email. Well, I tried LLVM/CLANG, but Cmake of the sources fairly fails many checks especuially for OpenMP. Using clang++ requisites the usage of the new libc++ (CXXFLAGS+=3D -stdlib=3Dlibc++). But this fails with this erro= r: [...] [ 17%] Building CXX object src/CMakeFiles/FreeOCL.dir/codebuilder.cpp.o In file included from /usr/ports/devel/freeocl/work/FreeOCL-0.3.6-Source/src/codebuilder.cpp:26= : /usr/ports/devel/freeocl/work/FreeOCL-0.3.6-Source/src/parser/parser.h:11= 8:15: error: no viable conversion from 'std::__1::basic_istream' to 'const bool' const bool ok =3D in.get(c); ^ ~~~~~~~~~ /usr/ports/devel/freeocl/work/FreeOCL-0.3.6-Source/src/codebuilder.cpp:44= 4:13: warning: 70 enumeration values not handled in switch: 'VOID', 'BOOL', 'HALF'... [-Wswitch] switch(native->get_type_id()) ^ 1 warning and 1 error generated. *** [src/CMakeFiles/FreeOCL.dir/codebuilder.cpp.o] Error code 1 [..] I tried also setting USE_GCC=3D 4.7+ using gcc-4.7 I installed, but that fails with [...] -- Build files have been written to: /usr/ports/devel/freeocl/work/FreeOCL-0.3.6-Source =3D=3D=3D> Building for freeocl-0.3.6 Scanning dependencies of target FreeOCL [ 1%] Building CXX object src/CMakeFiles/FreeOCL.dir/freeocl.cpp.o In file included from /usr/ports/devel/freeocl/work/FreeOCL-0.3.6-Source/src/freeocl.cpp:18:0: /usr/ports/devel/freeocl/work/FreeOCL-0.3.6-Source/src/freeocl.h:71:2: error: 'u_int64_t' does not name a type *** [src/CMakeFiles/FreeOCL.dir/freeocl.cpp.o] Error code 1 [...] I think patches are required. More disturbing is the use of gcc-4.6 via USE_GCC=3D 4.6+ The error is then a compalin about a missing include file atomic_ops.h which is located in the abandoned KSE facility of the kernel, so the includes seem not to be installed anymore - but since I'm not involved in the development, I can only guess and ask the people here. Maybe some experienced freeBSD developers with the same need for OpenCl is willing to pick up this and help a bit. Well, as far as I see, the FreeOCL project of Roland Borchard is a OpenCL library for CPU usage. As far as I can understand, if we on FreeBSd could have a library "libOpenCL" as this is usually installed by the nVidia BLOB drivers on Linux for the use of OpenCL/GPGPU support with their GPUs, this would fill a still painfull open gap in FreeBSD as a scientific development platform. There is still no suitable compiler for OpenCL out here for freeBSD, but I have still the hope that LLVM can provide such a thing in the near futu= re. I cross post this posting also to "performance" in the hope finding some people attracted and "lurd" into this subject. Regards, O. Hartmann --------------020905080102060901040901 Content-Type: text/plain; charset=us-ascii; name="Makefile" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="Makefile" PORTNAME=3D freeocl PORTVERSION=3D 0.3.6 CATEGORIES=3D devel MAINTAINER=3D ports@FreeBSD.org COMMENT=3D FreeOCL - a free OpenCL implementation for CPU #MASTER_SITES=3D http://freeocl.googlecode.com/files/FreeOCL-0.3= =2E6-src.tar.gz MASTER_SITES=3D http://freeocl.googlecode.com/files/ DISTNAME=3D FreeOCL-${PORTVERSION}-src WRKSRC=3D ${WRKDIR}/FreeOCL-${PORTVERSION}-Source USE_CMAKE=3D YES CMAKE_BUILD_TYPE=3D Release USE_GCC=3D 4.7+ #CXXFLAGS+=3D -stdlib=3Dlibc++ =2Einclude --------------020905080102060901040901-- --------------enigDA220183AD5D429D7C88391E 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) iQEcBAEBAgAGBQJQR2WjAAoJEOgBcD7A/5N8Ih4H/2yb0SMUgrJSiSls0jGuFaD3 P/B28GTeIvnaHHSZyvamY7itARkMx48WAfXRf1Nw5hVT+DLDCmt8T2lDnVmpysrJ GSFSCPNy1/zQ1zmaS6DnLNRV5HPWCSu/YsPbWbDTq3pKPKBRm6zxfifE6XojXiwk a4d4RwvFJ3K9a6riN3ND3N0nK3+fNyRzhVTlYPeVu1yLTNzrYd1OypisuhK5oabl TochS9hr7sKvoAvrlcrR0AUhmhD06CC+DT5MthAFWCumlkCCRq71ZOLp0YBdYToF LRFiHW/0SPYUdJ4UBfRkHUrSqnYB8V/bIrRIl5YhxgR/fmPN9dI66HtK9umJKx4= =m4Px -----END PGP SIGNATURE----- --------------enigDA220183AD5D429D7C88391E--