Many thanks Peter.
So, let's see it well.
I have Mac OSX 10.6.3, Xcode 3.2.2, Cuda 3.0 and OpenMM 1.1.1.
I created a folder build_openmm, and did:
~/Downloads/build_openmm% ccmake -i ../OpenMM1.1.1-Source/src/
BUILD_TESTING ON
CMAKE_BACKWARDS_COMPATIBILITY 2.4
CMAKE_BUILD_TYPE Debug
CMAKE_INSTALL_PREFIX /usr/local/openmm
CMAKE_OSX_ARCHITECTURES
CMAKE_OSX_DEPLOYMENT_TARGET
CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.6.sdk
CUDA_BUILD_TYPE Device
CUDA_INSTALL_PREFIX /usr/local/cuda/bin
CUDA_SDK_ROOT_DIR /Developer/GPU Computing/C
CUDA_TOOLKIT_ROOT_DIR /usr/local/cuda
DL_LIBRARY /usr/lib/libdl.dylib
FOUND_CUBLAS /usr/local/cuda/lib/libcublas.dylib
FOUND_CUBLASEMU /usr/local/cuda/lib/libcublasemu.dylib
FOUND_CUFFT /usr/local/cuda/lib/libcufft.dylib
FOUND_CUFFTEMU /usr/local/cuda/lib/libcufftemu.dylib
FOUND_CUT FOUND_CUT-NOTFOUND
FOUND_CUT_INCLUDE FOUND_CUT_INCLUDE-NOTFOUND
GCCXML_PATH GCCXML_PATH-NOTFOUND
OPENCL_INCLUDE_DIR /System/Library/Frameworks/OpenCL.framework
OPENCL_LIBRARY /System/Library/Frameworks/OpenCL.framework
OPENMM_BUILD_API_WRAPPERS OFF
OPENMM_BUILD_CUDA_LIB OFF
OPENMM_BUILD_FREE_ENERGY_CUDA_ OFF
OPENMM_BUILD_FREE_ENERGY_PLUGI OFF
OPENMM_BUILD_OPENCL_LIB ON
OPENMM_SVN_REVISION exported
SVNVERSION_PROGRAM /sw/bin/svnversion
(if compiling only for CUDA, 32 bits) all went fine.)
I also did this in ~/Downloads/OpenMM1.1.1-Source/src/CMakeLists.txt:
# Build 32 bit binaries, since CUDA doesn't currently work with 64 bit
#IF (APPLE)
# SET (CMAKE_CXX_FLAGS "-arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5")
# SET (CMAKE_C_FLAGS "-arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5")
#ENDIF (APPLE)
then, make, and got:
[snip]
[ 83%] Generating ../src/OpenCLKernelSources.cpp, ../src/OpenCLKernelSources.h
Scanning dependencies of target OpenMMOpenCL_d
[ 84%] Building CXX object platforms/opencl/sharedTarget/CMakeFiles/OpenMMOpenCL_d.dir/__/src/OpenCLCompact.cpp.o
In file included from /Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/OpenCLContext.h:37,
from /Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/OpenCLArray.h:30,
from /Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/OpenCLCompact.h:28,
from /Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/OpenCLCompact.cpp:27:
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:1653: error: expected identifier before numeric constant
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:1653: error: expected ‘,’ or ‘...’ before numeric constant
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:1655: error: expected constructor, destructor, or type conversion before ‘F’
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:1903: error: ‘param_traits’ is not a template
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:1903: error: ‘param_name’ was not declared in this scope
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:1905: error: explicit specialization of non-template ‘cl::detail::param_traits’
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:1907: error: ‘param_name’ was not declared in this scope
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:1909: error: ‘T’ does not name a type
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:2517: error: ‘cl::detail::param_traits’ is not a template
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:2517: error: ‘cl_device_info’ is not a member of ‘cl::detail’
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:2517: error: ‘cl_device_info’ is not a member of ‘cl::detail’
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:2519: error: expected initializer before ‘getInfo’
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:2699: error: ‘cl::detail::param_traits’ is not a template
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:2699: error: ‘cl_platform_info’ is not a member of ‘cl::detail’
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:2699: error: ‘cl_platform_info’ is not a member of ‘cl::detail’
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:2701: error: expected initializer before ‘getInfo’
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:3239: error: ‘cl::detail::param_traits’ is not a template
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:3239: error: ‘cl_context_info’ is not a member of ‘cl::detail’
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:3239: error: ‘cl_context_info’ is not a member of ‘cl::detail’
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:3241: error: expected initializer before ‘getInfo’
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:3469: error: ‘cl::detail::param_traits’ is not a template
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:3469: error: ‘cl_event_info’ is not a member of ‘cl::detail’
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:3469: error: ‘cl_event_info’ is not a member of ‘cl::detail’
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:3471: error: expected initializer before ‘getInfo’
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:3603: error: ‘cl::detail::param_traits’ is not a template
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:3603: error: ‘cl_profiling_info’ is not a member of ‘cl::detail’
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:3603: error: ‘cl_profiling_info’ is not a member of ‘cl::detail’
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:3605: error: expected initializer before ‘getProfilingInfo’
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:3815: error: ‘cl::detail::param_traits’ is not a template
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:3815: error: ‘cl_mem_info’ is not a member of ‘cl::detail’
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:3815: error: ‘cl_mem_info’ is not a member of ‘cl::detail’
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:3817: error: expected initializer before ‘getInfo’
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:4071: error: ‘cl::detail::param_traits’ is not a template
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:4071: error: ‘cl_image_info’ is not a member of ‘cl::detail’
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:4071: error: ‘cl_image_info’ is not a member of ‘cl::detail’
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:4073: error: expected initializer before ‘getImageInfo’
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:4589: error: ‘cl::detail::param_traits’ is not a template
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:4589: error: ‘cl_sampler_info’ is not a member of ‘cl::detail’
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:4589: error: ‘cl_sampler_info’ is not a member of ‘cl::detail’
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:4591: error: expected initializer before ‘getInfo’
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:6185: error: ‘cl::detail::param_traits’ is not a template
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:6185: error: ‘cl_kernel_info’ is not a member of ‘cl::detail’
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:6185: error: ‘cl_kernel_info’ is not a member of ‘cl::detail’
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:6187: error: expected initializer before ‘getInfo’
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:6313: error: ‘cl::detail::param_traits’ is not a template
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:6313: error: ‘cl_kernel_work_group_info’ is not a member of ‘cl::detail’
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:6313: error: ‘cl_kernel_work_group_info’ is not a member of ‘cl::detail’
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:6315: error: expected initializer before ‘getWorkGroupInfo’
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:7201: error: ‘cl::detail::param_traits’ is not a template
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:7201: error: ‘cl_program_info’ is not a member of ‘cl::detail’
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:7201: error: ‘cl_program_info’ is not a member of ‘cl::detail’
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:7203: error: expected initializer before ‘getInfo’
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:7323: error: ‘cl::detail::param_traits’ is not a template
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:7323: error: ‘cl_program_build_info’ is not a member of ‘cl::detail’
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:7323: error: ‘cl_program_build_info’ is not a member of ‘cl::detail’
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:7325: error: expected initializer before ‘getBuildInfo’
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:7677: error: ‘cl::detail::param_traits’ is not a template
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:7677: error: ‘cl_command_queue_info’ is not a member of ‘cl::detail’
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:7677: error: ‘cl_command_queue_info’ is not a member of ‘cl::detail’
/Users/alan/Downloads/OpenMM1.1.1-Source/src/platforms/opencl/src/cl.hpp:7679: error: expected initializer before ‘getInfo’
make[2]: *** [platforms/opencl/sharedTarget/CMakeFiles/OpenMMOpenCL_d.dir/__/src/OpenCLCompact.cpp.o] Error 1
make[1]: *** [platforms/opencl/sharedTarget/CMakeFiles/OpenMMOpenCL_d.dir/all] Error 2
make: *** [all] Error 2
Note that when I updated to Cuda 3.0, the examples in /Developer/GPU\ Computing/OpenCL/ din't work by doing a simple 'make'.
I had to do this:
http://forums.nvidia.com/index.php?show ... try1038451
The big point here for me is, are you Peter using Xcode 3.2.2? I frankly agree with you that OpenGL/opengl.h should be standard, but I remember debugging code and finding out problem with case. I have to say that my MacOSX filesystem is case sensitive.
But what's really strange is that I don't have problems with OpenGL/opengl.h, the error is different now. Any idea of how to check that?
Many thanks,
Alan