Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#60212 closed defect (fixed)

caf @0.17.4: error: use of undeclared identifier 'CL_DEVICE_TYPE_CUSTOM'

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: Schamschula (Marius Schamschula)
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: Cc:
Port: caf

Description

caf fails to build on 10.7:

/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_caf/caf/work/actor-framework-0.17.4/libcaf_opencl/caf/opencl/global.hpp:47:17: error: use of undeclared identifier 'CL_DEVICE_TYPE_CUSTOM'
  custom      = CL_DEVICE_TYPE_CUSTOM,
                ^

Change History (9)

comment:1 Changed 4 years ago by Schamschula (Marius Schamschula)

10.7, Seriously?

It seems to be looking for OpenCL.

comment:2 Changed 4 years ago by Schamschula (Marius Schamschula)

More precisely, looking for OpenCL >= 1.2.

comment:3 in reply to:  1 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to Schamschula:

10.7, Seriously?

Yes. The 10.7 buildbot worker just came back online and is working through a backlog of builds. As I notice build failures, I file tickets.

If this (or any) port is not expected to work on 10.7 (or any other system), please use the usual methods of indicating that in the Portfile (known_fail yes and a pre-configure block printing an error message for the user). This allows the buildbot to skip the build and allows the user to understand that they do not need to file a bug report about it.

comment:4 Changed 4 years ago by Schamschula (Marius Schamschula)

In this case it is a hardware issue: https://support.apple.com/en-us/HT202823

Pre-Mid 2010 Macs only support OpenCL 1.0.

How does one test for this?

comment:5 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

We use 2009 Xserves for most of our build systems. But we do have caf packages successfully built on OS X 10.9 and later on those servers. (It may build on 10.8 too. 10.8 successfully built the previous version, and the 10.8 worker is currently offline so we don't know what it will do with the current version.)

You can use any criteria you need to in the portfile to decide when to define known_fail and the pre-configure block. If indeed different machines have different OpenCL versions, even on the same macOS version, and you can figure out how to determine the OpenCL version by running a command line program, then you could put that into the portfile.

Last edited 4 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:6 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Looking at /System/Library/Frameworks/OpenCL.framework/Headers/cl.h on a 10.8 system I see:

/* OpenCL Version */
#define CL_VERSION_1_0                              1
#define CL_VERSION_1_1                              1
#define CL_VERSION_1_2                              1

On 10.7 I see only:

/* OpenCL Version */
#define CL_VERSION_1_0                              1
#define CL_VERSION_1_1                              1

So I think 10.7 does not have support for OpenCL 1.2, and if this port needs OpenCL 1.2, then preventing installation on 10.7 and earlier would be a good start.

comment:7 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

And on 10.8 I see cl.h contains:

#define CL_DEVICE_TYPE_CUSTOM                       (1 << 4)

whereas on 10.7 it does not.

comment:8 Changed 4 years ago by Schamschula (Marius Schamschula)

Resolution: fixed
Status: assignedclosed

In d18f17abdc92b85671ab954019f37f0dca457432/macports-ports (master):

caf: not compatible with Lion and below

Closes: #60212

comment:9 Changed 4 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

In 87eb3e89f41c15fba93c325099f430c02d1d7ecc/macports-ports (master):

caf: allow build on older systems

See #60212

Note: See TracTickets for help on using tickets.