The port provides a OpenCL Installable Client Driver as provided by https://forge.imag.fr/projects/ocl-icd/. Fix: Patch attached with submission follows:
Responsible Changed From-To: freebsd-ports-bugs->mva I'll take it.
The port misses a dependency on ruby, which seems to be required for building. On adding USE_RUBY=yes, it fails with [...] gmake[2]: Entering directory `/usr/ports/devel/ocl-icd/work/ocl-icd-2.0.2' CC libOpenCL_la-ocl_icd_loader.lo CC libOpenCL_la-ocl_icd_loader_gen.lo CC libdummy_icd.lo CC libdummy_icd_gen.lo cc1: warnings being treated as errors In file included from ocl_icd_loader.h:30, from ocl_icd_loader_gen.c:29: ocl_icd.h:30: warning: expected [error|warning|ignored] after '#pragma GCC diagnostic' ocl_icd.h:31: warning: unknown option after '#pragma GCC diagnostic' kind cc1: warnings being treated as errors ocl_icd_loader.c:40: warning: expected [error|warning|ignored] after '#pragma GCC diagnostic' ocl_icd_loader.c:41: warning: unknown option after '#pragma GCC diagnostic' kind In file included from ocl_icd_loader.h:30, from ocl_icd_loader_gen.c:29: [...] on RELENG_9 (gcc 4.2.1). Can you please fix this? Thanks Marcus
On, Mon Dec 02, 2013, Marcus von Appen wrote: > The port misses a dependency on ruby, which seems to be required for > building. On adding USE_RUBY=yes, it fails with > > [...] > gmake[2]: Entering directory `/usr/ports/devel/ocl-icd/work/ocl-icd-2.0.2' > CC libOpenCL_la-ocl_icd_loader.lo > CC libOpenCL_la-ocl_icd_loader_gen.lo > CC libdummy_icd.lo > CC libdummy_icd_gen.lo > cc1: warnings being treated as errors > In file included from ocl_icd_loader.h:30, > from ocl_icd_loader_gen.c:29: > ocl_icd.h:30: warning: expected [error|warning|ignored] after '#pragma GCC diagnostic' > ocl_icd.h:31: warning: unknown option after '#pragma GCC diagnostic' kind > cc1: warnings being treated as errors > ocl_icd_loader.c:40: warning: expected [error|warning|ignored] after '#pragma GCC diagnostic' > ocl_icd_loader.c:41: warning: unknown option after '#pragma GCC diagnostic' kind > In file included from ocl_icd_loader.h:30, > from ocl_icd_loader_gen.c:29: > [...] > > on RELENG_9 (gcc 4.2.1). Can you please fix this? This port as well as ports/181243 (devel/opencl-icd) are required for ports/171914 (devel/pocl). Please let me know about the required changes from above. Thanks Marcus
Created attachment 147961 [details] Updated ocl-icd port, build tested with 9.x and 10.x on amd64 and i386 An updated version of the ocl-icd port, with many fixes to pet portlint. The build was tested on 9.x and 10.x amd64/i386. Doesn't it need a pkg-message similar to the one from opencl-icd?
Is this still valid and does the patch look good to you?
Over to kwm
Created attachment 155414 [details] proposed port devel/ocl-icd
The latest SHAR targets recent OCL-ICD 2.2.3. I've successfully built the port on CURRENT (as I do not have other versions at hand).
hartman do you object to putting this port in the lang category? It seems to fit beter, we planning to put clover and beignet also in lang/. And there is the fact that devel/ is kind of over stuffed already.
(In reply to Koop Mast from comment #9) Mast, thank you very much for informing me about the plans. I object - since I see no reason putting this port into another category due to "overcrowding" categories. if this would be a reason, then the concept of categorization is a bit inappropriate. Why "lang"? POCL is definitely no solitair language, like C or CLANG. Spekaing of CLANG, we have lang/clang and devel/llvm. LLVM is the backend of clang and it resides, for a good reason, in devel. I understand POCL, as ocl-icd too, as a architectural backend for openCL. Having made my statement to this, I'm open for other arguments. I also admit that my understanding of POCL could be wrong. By the way, I played around with new POCL 0.11 and I have another SHAR ready. There are two problems with the tests I ran into. The OpenCL examples compile/work not properly in two cases. I'll post another SHAR later this day with some comments on the last Makefile posted here (which didn't work for me!). Regards, O. Hartmann
Created attachment 158177 [details] Proposed update to 2.2.7. Update to 2.2.7. Add patch to build with clang. Add LICENSE_FILE No need to overwrite PKGCONFIGDIR Make manpage regenration optional, don't try to build manpage even if depends are available. Instead of patching the location of OpenCL/vendors use sed, since we need to patch two files.
I'm working on most recent CURRENT, if this is important (no 10.1 or 10.2 availble). Droped in the latest patchset as provided - but build fails with error: [...] ===> Building for ocl-icd-2.2.7 gmake[2]: Entering directory '/usr/ports/devel/ocl-icd/work/ocl-icd-2.2.7' cd . && /bin/sh /usr/ports/devel/ocl-icd/work/ocl-icd-2.2.7/build-aux/missing automake-1.14 --foreign Makefile /usr/ports/devel/ocl-icd/work/ocl-icd-2.2.7/build-aux/missing: automake-1.14: not found [...] This can be resolved by performing autoreconf and setting [...] USES = gmake pathfix autoreconf libtool [...] in Makefile. With that, build performs well. But installation fails with [...] ===> Registering installation for ocl-icd-2.2.7 pkg-static: Unable to access file /usr/ports/devel/ocl-icd/work/stage/usr/local/libdata/pkgconfig/OpenCL.pc: No such file or directory pkg-static: Unable to access file /usr/ports/devel/ocl-icd/work/stage/usr/local/libdata/pkgconfig/ocl-icd.pc: No such file or directory *** Error code 74 [...] since the files in question are about to be installed in ${PREFIX}/lib/pkgconfigdir instead of desired ${PREFIX}/libdata/pkgconfigdir as of my understanding would be the more clean location (lib is supposed to hold libraries and the metadata/config data should go to libdata). Is there a voodoo trick delegating $(libdir) from the Ports framework? In my original patch, I had to patch Makefile.am to meet this aspect, but this seems not to be of convenience for you.
(In reply to ohartman from comment #12) > [...] > ===> Building for ocl-icd-2.2.7 > gmake[2]: Entering directory '/usr/ports/devel/ocl-icd/work/ocl-icd-2.2.7' > cd . && /bin/sh /usr/ports/devel/ocl-icd/work/ocl-icd-2.2.7/build-aux/missing automake-1.14 --foreign Makefile > /usr/ports/devel/ocl-icd/work/ocl-icd-2.2.7/build-aux/missing: automake-1.14: not found > [...] I can't reproduce this, neither on my devel machine nor with poudriere. Most of the time it has something to do with time not being set correctly. The missing libdata/pkgconfig files is due to running autoreconf since that overwrites the pathfix changes.
(In reply to Koop Mast from comment #13) "... it has something to do with time not being set correctly [...]" I do not understand. I see this error on several boxes I have installed and setup recently. I do not use poudriere. The boxes in questions are setup from scratch, last one a week ago. /usr/ports is a SVN tree, checked out via svn (not svnlite).All systems in question are CURRENT (most recent) and one 10.1-STABLE. I see this error also on devel/pocl I propoesed also. In devel/pocl it is aclocal-1.4 missing. Installed is devel/autotools which reels in a bunch of GNU autotools and I consider it correct. Since I do not see where the time comes into play I consider a problem in the Mk-setups, which are very hard to investigate for my opinion. Have you any idea to track down the problem further? I think the problem is a kind of serious since I consider the ports system have to be robust against localised/local configurations. What works in a sterile jail or pudriere hasn't implicitely work on a "grown" system with individual configured ports. Regards, Oliver
@Koop Mast : I was just wondering on what platform you succeeded compiling the port. On all CURRENT systems, longer running and fresh installations, I wasn't able to compile the ports with your suggestion. I had always have to use the option USE_AUTOTOOLS= aclocal A manual installation trial in work with the unpacked/patched sources always revelas that automake 1.14 was used generating some of the scripts and is missing. Today, I see this on several updated CURRENT boxes of mine (most recent ports tree update as of today, "... Updated to revision 393050." [...] ===>>> Starting check of installed ports for available updates ===>>> The devel/automake14 port has been deleted: Has expired: Not used in the ports tree anymore ===>>> Aborting update I will provide you soon with another patchset, aclocal included.
(In reply to ohartman from comment #15) > I wasn't able to compile the ports with your suggestion. I had always have to use the option > > USE_AUTOTOOLS= aclocal > > A manual installation trial in work with the unpacked/patched sources always revelas that automake 1.14 was used generating some of the scripts and is missing. Upstream used automake 1.14, but we have automake 1.15 in the ports tree. The reason it's looking for automake is probably because you have USE_AUTOTOOLS=aclocal. Automake has to be run after aclocal. So try removing that and also try without /etc/make.conf.
(In reply to Tijl Coosemans from comment #16) Without make.conf and USE_AUTOTOOLS=aclocal the port searches for automake 1.14! On CURRENT/ports tree most recent, I'm unable to reproduce Koop Maast's positive report of compilation. I consider now USE_AUTOTOOLS=aclocal as a required tag. The port compiles with that tag set successfully. there is only one bug in one test only shwoing up on FreeBSD and needs to be dealt with.
So I downloaded "Proposed update to 2.2.7" to /tmp and did the following: cd /usr/ports svn patch /tmp/ocl-icd-2.2.7.diff cd devel/ocl-icd make And it just worked. I looked at the distfile contents and all time stamps look good, meaning all files generated by autotools are generated in the correct order. There's also a script named "bootstrap" there that runs autoreconf which guarantees all the different autotools are run correctly. So, there should be no need to rerun any autotool. I suspect you still have other modifications besides USE_AUTOTOOL=aclocal that are causing problems. Try moving your devel/ocl-icd out of the way and then run the above commands.
A commit references this bug: Author: kwm Date: Thu Sep 17 17:45:24 UTC 2015 New revision: 397197 URL: https://svnweb.freebsd.org/changeset/ports/397197 Log: Add ocl-icd - OpenCL Installable Client Driver. This library provides a way that OpenCL programs can open several ICD's. The Intel (beignet) and AMD/ATI (Clover for Mesa) OpenCL implimentations will be build as ICD's. This has as benefit that programs will not link directly against the OpenCL implimentation but against ocl-icd. The user needs to manualy install the OpenCL implimentation they want to use. PR: 181244 Submitted by: ohartman@zedat.fu-berlin.de Changes: head/devel/Makefile head/devel/ocl-icd/ head/devel/ocl-icd/Makefile head/devel/ocl-icd/distinfo head/devel/ocl-icd/files/ head/devel/ocl-icd/files/patch-ocl__icd__debug.h head/devel/ocl-icd/files/patch-ocl__icd__loader.c head/devel/ocl-icd/pkg-descr head/devel/ocl-icd/pkg-plist
Committed by kwm as revision 397197.