Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 08 Sep 2012 10:57:49 +0200
From:      "O. Hartmann" <ohartman@zedat.fu-berlin.de>
To:        Current FreeBSD <freebsd-current@FreeBSD.org>,  Ports FreeBSD <freebsd-ports@freebsd.org>
Subject:   HELP: New Port: devel/pocl: A portable OpenCL library with LLVM backend
Message-ID:  <504B088D.2030709@zedat.fu-berlin.de>

next in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigCA7D68C5F38E1C801AEF73C4
Content-Type: multipart/mixed; boundary="------------020103060009000209060501"

This is a multi-part message in MIME format.
--------------020103060009000209060501
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hello.
I tried to create a "port", see the Makefile attached I created already.
For further informations and your convenience, look at this website:

POCL:
https://launchpad.net/pocl

LLVM:
http://llvm.org/docs/ReleaseNotes.html

I use FreeBSD 10.0-CURRENT r240186M amd64, my world and kernel are build
with CLANG.

The software, pocl, itself is straight forward able to compile. I didn't
"patch" anything or put magic sophisticated knowledge into "porting it",
I simply created the Makefile for the start. Feel free to work on it.

The Makefile is capable of building POCL on all FreeBSD 10 systems I
run, but it fails on FreeBSD 9.1-STABLE. I didn't investigate further,
since I have some first-priority questiosn and maybe some of the more
experienced people here are willing to contribute their knowledge.

0) In my CLANG built world, fetch(1) ends up with an "Authentication
error" fetching the sources from the site (see PR: bin/171402). This
needs to be fixed before the port works out of the box, you need to
download the source tar-ball manually for the first time from the site
mentioned above entitle POCL.

1) The port need to be build with a version number of the shared library
created - otherwise ldconfig doesn't seem to recognize the installed
library and does not load it into the cache.

2) A more sophisticated detection of the build environment is needed. I
failed providing a detection of the existence of a CLANG, legacy or GCC
> 4.6 build environment, I guess this can be done with the version
number of FreeBSD itself or with some knobs I do not know about. I'm new
to the ports system on this sophisticated level.

I think it is too early to announce this port with a PR, since FreeBSD <
10 isn't supported yet.

3) I didn't test the library with "real world" software, but I think I
will this in the near future, if it is working and usable. If some folks
could also provide "tests", please be invited.



Thanks.

Oliver

--------------020103060009000209060501
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.0
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:C/\.[0-9]$//}/$=
{PORTVERSION}/+download/
DISTNAME=3D		${PORTNAME}-${PORTVERSION:C/\.[0-9]$//}

CONFLICTS=3D		opencl-* freeocl*

DISABLE_MAKE_JOBS=3D	yes

OPTIONS_SINGLE=3D		LANG
OPTIONS_SINGLE_LANG=3D	COMP_CLANG COMP_GCC
OPTIONS_DEFAULT=3D	COMP_CLANG

COMP_CLANG_DESC=3D	Use LLVM/CLANG compiler
COMP_GCC_DESC=3D		Use GNU GCC compiler

=2Einclude <bsd.port.options.mk>

=2Eif ${PORT_OPTIONS:MCOMP_GCC}
USE_GCC=3D		4.6+
=2Eendif

=2Eif  ${PORT_OPTIONS:MCOMP_CLANG}
CXXFLAGS+=3D		-stdlib=3Dlibc++
CPPFLAGS+=3D		-I${LOCALBASE}/include
=2Eendif

BUILD_DEPENDS=3D		${LOCALBASE}/bin/llvm-config:${PORTSDIR}/devel/llvm

USE_GMAKE=3D		yes
USE_GL=3D			yes
USE_LDCONFIG=3D		yes
USE_AUTOTOOLS=3D		libltdl

GNU_CONFIGURE=3D		yes

CPPFLAGS+=3D		-I${LOCALBASE}/include
LDFLAGS+=3D		-L${LOCALBASE}/lib

=2Einclude <bsd.port.mk>

--------------020103060009000209060501--

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

iQEcBAEBAgAGBQJQSwiSAAoJEOgBcD7A/5N8XSUH/R+EDEBEuv2yYt7TbbZkNpbk
iWHs7AI1fwB6KmuBkzSS9dg+NAmgtWU6Q0QLexyGh4g66zK13gg6dQ9lCvTUnJ5R
BXNBd4rfrxLshNKxHt8hG/mIleRq6G2Sz7XJvFMejMkeAbRmR9jOg+3IV+2YjV9H
QpOOwIocSRSEQgJggtcqsPOX3hsl2yTt+8bRSDVnMGlkwA/KzWn4mKvapZPaaip7
FNBM0AL6q3UN87OFQhQ9MzCG7B4tGULdO6t6LLoGds4PQG00y37+2U5Zk3si922n
xYNtqV8AeG/QNnnxFD7+2MPvqaHTuGiXyvxT99tsB4BjTyYiMPrWP3f5095twWo=
=Vgbm
-----END PGP SIGNATURE-----

--------------enigCA7D68C5F38E1C801AEF73C4--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?504B088D.2030709>