Opened 10 years ago

Closed 9 years ago

#26612 closed defect (fixed)

bullet: OpenCL/OpenCL.h: No such file or directory

Reported by: ryandesign (Ryan Schmidt) Owned by: stromnov (Andrew Stromnov)
Priority: Normal Milestone:
Component: ports Version: 1.9.1
Keywords: Cc: raphael-st (Raphael Straub)
Port: bullet

Description

Trying to install bullet 2.77-2218 on Mac OS X 10.5.8 ppc I get

error: OpenCL/OpenCL.h: No such file or directory

There was no problem installing bullet 2.75 on this Mac.

OpenCL is a new feature of Snow Leopard; if bullet now requires OpenCL that makes it incompatible with Leopard and Tiger.

Second, the header is actually opencl.h, not OpenCL.h, so this will fail on Snow Leopard too if the file system is case sensitive.

Attachments (3)

main.log.bz2 (10.4 KB) - added by ryandesign (Ryan Schmidt) 10 years ago.
patch-CMakeLists.txt.diff (261 bytes) - added by stromnov (Andrew Stromnov) 10 years ago.
check_opencl_support_apple.patch (431 bytes) - added by max.pfingsthorn@… 10 years ago.
Patch to skip opencl part if no opencl library was found

Download all attachments as: .zip

Change History (10)

Changed 10 years ago by ryandesign (Ryan Schmidt)

Attachment: main.log.bz2 added

comment:1 Changed 10 years ago by stromnov (Andrew Stromnov)

OpenCL header case fixed in r71845.

AFAIK, OpenCL is optional depependency. MiniCL (part of bullet) implements some subset of OpenCL using CPU.

Please, try to disable hardware OpenCL (see attached patch).

Changed 10 years ago by stromnov (Andrew Stromnov)

Attachment: patch-CMakeLists.txt.diff added

comment:2 Changed 10 years ago by ryandesign (Ryan Schmidt)

bullet does now build on my Leopard Mac with this patch. MiniCL still gets built, but nothing gets linked to it, and I don't know if bullet works. I'm guessing this patch would only be appropriate for 10.5 and earlier; using it on 10.6 and up is probably a problem, right?

comment:3 Changed 10 years ago by stromnov (Andrew Stromnov)

Currently OpenCL used only for soft cloth simulations. Soft cloth can be simulated in software, MiniCL (software OpenCL), Apple hardware OpenCL, nVidia hardware OpenCL and AMD hardware OpenCL. You can optionally disable hardware OpenCL on unsupported platform and still get working bullet libs.

You can check this :

  1. Enable demos in Portfile: -DBUILD_DEMOS=ON -DBUILD_MINICL_OPENCL_DEMOS=ON
  2. Demos/OpenCLClothDemo/CMakeLists.txt: remove all lines, except SUBDIRS( MiniCL )
  3. src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/CMakeLists.txt: remove all lines, except SUBDIRS( MiniCL )
  4. src/BulletMultiThreaded/GpuSoftBodySolvers/CMakeLists.txt leave untouched

Build port and then examine executable in Demos/OpenCLClothDemo/MiniCL/.

I'm guessing we have to disable hardware implementations for 10.5 and earlier. For 10.6 such variant must be optional.

comment:4 Changed 10 years ago by raphael-st (Raphael Straub)

Cc: raphael@… added

Cc Me!

comment:5 Changed 10 years ago by max.pfingsthorn@…

I filed a bug against bullet itself (http://code.google.com/p/bullet/issues/detail?id=480) and attached a patch there to fix the issue. I've attached it here as well. It would be great if you could add it to your port.

Changed 10 years ago by max.pfingsthorn@…

Patch to skip opencl part if no opencl library was found

comment:6 Changed 10 years ago by stromnov (Andrew Stromnov)

Thanks!

Committed in r75809.

comment:7 Changed 9 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: newclosed

Doesn't look like there's any reason for this to still be open.

Note: See TracTickets for help on using tickets.