Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 06 Sep 2012 16:04:29 +0200
From:      "O. Hartmann" <ohartman@mail.zedat.fu-berlin.de>
To:        Dimitry Andric <dim@FreeBSD.org>
Cc:        "freebsd-performance@freebsd.org" <freebsd-performance@freebsd.org>, mazhe@alkumuna.eu, Ports FreeBSD <freebsd-ports@FreeBSD.org>
Subject:   Re: Help. Porting "FreeOCL" fails (atomic_ops.h missing, CLANG++ libc++ issues ...)
Message-ID:  <5048AD6D.1050600@mail.zedat.fu-berlin.de>
In-Reply-To: <50489C47.4040101@FreeBSD.org>
References:  <5047659D.8000107@mail.zedat.fu-berlin.de> <50489C47.4040101@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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<char>' 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 <bsd.port.mk>

--------------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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5048AD6D.1050600>