KhronosGroup/OpenCL-SDK

How to build for FreeBSD 13.1?

rajhlinux opened this issue · 9 comments

I get this error:

Unix Makefiles

  does not support platform specification, but platform

    x64

  was specified.

Hi, can you please include the command lines you are using to build on FreeBSD?

It looks like you are specifying a platform name with -A when you are creating build files via CMake but this is not supported for the Unix Makefile generator.

Here's what I do - should be all that is required for most Unix-like systems. Feel free to use another directory other than "build" if you would prefer, and start in the OpenCL-SDK directory you've cloned that has up-to-date submodules:

$ mkdir build
$ cd build
$ cmake ..

After the build files are generated and all dependencies have been fetched, simply build using "make".

Thanks for your reply, yes I was using the "-A" option.

I get the follow error after doing:

$ mkdir build
$ cd build
$ cmake ..

In the path:
/usr/home/user/OpenCL-SDK/build/

$ cmake ..

-- The C compiler identification is Clang 13.0.0
-- The CXX compiler identification is Clang 13.0.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- No build type selected, default to Release
CMake Error at CMakeLists.txt:41 (add_subdirectory):
  The source directory

    /home/user/OpenCL-SDK/external/OpenCL-Headers

  does not contain a CMakeLists.txt file.


CMake Error at CMakeLists.txt:42 (add_subdirectory):
  The source directory

    /home/user/OpenCL-SDK/external/OpenCL-ICD-Loader

  does not contain a CMakeLists.txt file.


CMake Error at CMakeLists.txt:43 (add_subdirectory):
  The source directory

    /home/user/OpenCL-SDK/external/OpenCL-CLHPP

  does not contain a CMakeLists.txt file.


-- cargs (https://github.com/likle/cargs) not found. To self-host, set cargs_INCLUDE_PATH and cargs_LIBRARY to point to the headers and library respectively adding '-D cargs_INCLUDE_PATH=/path/to/cargs/include/dir -D cargs_LIBRARY/path/to/cargs/libcargs' to the cmake command. (missing: cargs_INCLUDE_PATH cargs_LIBRARY) 
-- Fetching cargs.
-- Adding cargs subproject: /home/user/OpenCL-SDK/build/_deps/cargs-external-src
-- Found TCLAP: /usr/local/include  
-- Stb (https://github.com/nothings/stb) not found. To self-host, set Stb_INCLUDE_PATH to point to the headers adding '-D Stb_INCLUDE_PATH=/path/to/stb' to the cmake command. (missing: Stb_INCLUDE_PATH) 
-- Fetching Stb.
-- Found Stb: /home/user/OpenCL-SDK/build/_deps/stb-external-src  
CMake Warning (dev) at /usr/local/share/cmake/Modules/FindOpenGL.cmake:315 (message):
  Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
  available.  Run "cmake --help-policy CMP0072" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  FindOpenGL found both a legacy GL library:

    OPENGL_gl_LIBRARY: /usr/local/lib/libGL.so

  and GLVND libraries for OpenGL and GLX:

    OPENGL_opengl_LIBRARY: /usr/local/lib/libOpenGL.so
    OPENGL_glx_LIBRARY: /usr/local/lib/libGLX.so

  OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
  compatibility with CMake 3.10 and below the legacy GL library will be used.
Call Stack (most recent call first):
  cmake/Dependencies/OpenGL/OpenGL.cmake:1 (find_package)
  cmake/Dependencies.cmake:10 (include)
  CMakeLists.txt:49 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found OpenGL: /usr/local/lib/libOpenGL.so   
-- Found GLEW: /usr/local/include (found version "2.2.0") 
-- Found Freetype: /usr/local/lib/libfreetype.so (found version "2.12.1") 
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- Looking for sin in m
-- Looking for sin in m - found
-- Configuring incomplete, errors occurred!

See also "/home/user/OpenCL-SDK/build/CMakeFiles/CMakeOutput.log".

Here is the CMakeOutput.log file:

The system is: FreeBSD - 13.1-RELEASE-p1 - amd64
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: /usr/bin/cc 
Build flags: 
Id flags:  

The output was:
0


Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.out"

The C compiler identification is Clang, found in "/home/user/OpenCL-SDK/build/CMakeFiles/3.24.0/CompilerIdC/a.out"

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler: /usr/bin/c++ 
Build flags: 
Id flags:  

The output was:
0


Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.out"

The CXX compiler identification is Clang, found in "/home/user/OpenCL-SDK/build/CMakeFiles/3.24.0/CompilerIdCXX/a.out"

Detecting C compiler ABI info compiled with the following output:
Change Dir: /home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/local/bin/gmake -f Makefile cmTC_82de8/fast && /usr/local/bin/gmake  -f CMakeFiles/cmTC_82de8.dir/build.make CMakeFiles/cmTC_82de8.dir/build
gmake[1]: Entering directory '/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_82de8.dir/CMakeCCompilerABI.c.o
/usr/bin/cc   -v -MD -MT CMakeFiles/cmTC_82de8.dir/CMakeCCompilerABI.c.o -MF CMakeFiles/cmTC_82de8.dir/CMakeCCompilerABI.c.o.d -o CMakeFiles/cmTC_82de8.dir/CMakeCCompilerABI.c.o -c /usr/local/share/cmake/Modules/CMakeCCompilerABI.c
FreeBSD clang version 13.0.0 (git@github.com:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a303)
Target: x86_64-unknown-freebsd13.1
Thread model: posix
InstalledDir: /usr/bin
 (in-process)
 "/usr/bin/cc" -cc1 -triple x86_64-unknown-freebsd13.1 -emit-obj -mrelax-all --mrelax-relocations -disable-free -disable-llvm-verifier -discard-value-names -main-file-name CMakeCCompilerABI.c -mrelocation-model static -mframe-pointer=all -fno-rounding-math -mconstructor-aliases -munwind-tables -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -v -fcoverage-compilation-dir=/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp -resource-dir /usr/lib/clang/13.0.0 -dependency-file CMakeFiles/cmTC_82de8.dir/CMakeCCompilerABI.c.o.d -MT CMakeFiles/cmTC_82de8.dir/CMakeCCompilerABI.c.o -sys-header-deps -cxx-isystem /home/user/caffe/include/ -fdebug-compilation-dir=/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp -ferror-limit 19 -fgnuc-version=4.2.1 -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o CMakeFiles/cmTC_82de8.dir/CMakeCCompilerABI.c.o -x c /usr/local/share/cmake/Modules/CMakeCCompilerABI.c
clang -cc1 version 13.0.0 based upon LLVM 13.0.0 default target x86_64-unknown-freebsd13.1
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/clang/13.0.0/include
 /usr/include
End of search list.
Linking C executable cmTC_82de8
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_82de8.dir/link.txt --verbose=1
/usr/bin/cc  -v CMakeFiles/cmTC_82de8.dir/CMakeCCompilerABI.c.o -o cmTC_82de8 
FreeBSD clang version 13.0.0 (git@github.com:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a303)
Target: x86_64-unknown-freebsd13.1
Thread model: posix
InstalledDir: /usr/bin
 "/usr/bin/ld" --eh-frame-hdr -dynamic-linker /libexec/ld-elf.so.1 --hash-style=both --enable-new-dtags -o cmTC_82de8 /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o -L/usr/lib CMakeFiles/cmTC_82de8.dir/CMakeCCompilerABI.c.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/crtend.o /usr/lib/crtn.o
gmake[1]: Leaving directory '/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp'



Parsed C implicit include dir info from above output: rv=done
  found start of include info
  found start of implicit include info
    add: [/usr/lib/clang/13.0.0/include]
    add: [/usr/include]
  end of search list found
  collapse include dir [/usr/lib/clang/13.0.0/include] ==> [/usr/lib/clang/13.0.0/include]
  collapse include dir [/usr/include] ==> [/usr/include]
  implicit include dirs: [/usr/lib/clang/13.0.0/include;/usr/include]


Parsed C implicit link information from above output:
  link line regex: [^( *|.*[/\])(ld\.lld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)]
  ignore line: [Change Dir: /home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp]
  ignore line: []
  ignore line: [Run Build Command(s):/usr/local/bin/gmake -f Makefile cmTC_82de8/fast && /usr/local/bin/gmake  -f CMakeFiles/cmTC_82de8.dir/build.make CMakeFiles/cmTC_82de8.dir/build]
  ignore line: [gmake[1]: Entering directory '/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp']
  ignore line: [Building C object CMakeFiles/cmTC_82de8.dir/CMakeCCompilerABI.c.o]
  ignore line: [/usr/bin/cc   -v -MD -MT CMakeFiles/cmTC_82de8.dir/CMakeCCompilerABI.c.o -MF CMakeFiles/cmTC_82de8.dir/CMakeCCompilerABI.c.o.d -o CMakeFiles/cmTC_82de8.dir/CMakeCCompilerABI.c.o -c /usr/local/share/cmake/Modules/CMakeCCompilerABI.c]
  ignore line: [FreeBSD clang version 13.0.0 (git@github.com:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a303)]
  ignore line: [Target: x86_64-unknown-freebsd13.1]
  ignore line: [Thread model: posix]
  ignore line: [InstalledDir: /usr/bin]
  ignore line: [ (in-process)]
  ignore line: [ "/usr/bin/cc" -cc1 -triple x86_64-unknown-freebsd13.1 -emit-obj -mrelax-all --mrelax-relocations -disable-free -disable-llvm-verifier -discard-value-names -main-file-name CMakeCCompilerABI.c -mrelocation-model static -mframe-pointer=all -fno-rounding-math -mconstructor-aliases -munwind-tables -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -v -fcoverage-compilation-dir=/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp -resource-dir /usr/lib/clang/13.0.0 -dependency-file CMakeFiles/cmTC_82de8.dir/CMakeCCompilerABI.c.o.d -MT CMakeFiles/cmTC_82de8.dir/CMakeCCompilerABI.c.o -sys-header-deps -cxx-isystem /home/user/caffe/include/ -fdebug-compilation-dir=/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp -ferror-limit 19 -fgnuc-version=4.2.1 -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o CMakeFiles/cmTC_82de8.dir/CMakeCCompilerABI.c.o -x c /usr/local/share/cmake/Modules/CMakeCCompilerABI.c]
  ignore line: [clang -cc1 version 13.0.0 based upon LLVM 13.0.0 default target x86_64-unknown-freebsd13.1]
  ignore line: [#include "..." search starts here:]
  ignore line: [#include <...> search starts here:]
  ignore line: [ /usr/lib/clang/13.0.0/include]
  ignore line: [ /usr/include]
  ignore line: [End of search list.]
  ignore line: [Linking C executable cmTC_82de8]
  ignore line: [/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_82de8.dir/link.txt --verbose=1]
  ignore line: [/usr/bin/cc  -v CMakeFiles/cmTC_82de8.dir/CMakeCCompilerABI.c.o -o cmTC_82de8 ]
  ignore line: [FreeBSD clang version 13.0.0 (git@github.com:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a303)]
  ignore line: [Target: x86_64-unknown-freebsd13.1]
  ignore line: [Thread model: posix]
  ignore line: [InstalledDir: /usr/bin]
  link line: [ "/usr/bin/ld" --eh-frame-hdr -dynamic-linker /libexec/ld-elf.so.1 --hash-style=both --enable-new-dtags -o cmTC_82de8 /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o -L/usr/lib CMakeFiles/cmTC_82de8.dir/CMakeCCompilerABI.c.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/crtend.o /usr/lib/crtn.o]
    arg [/usr/bin/ld] ==> ignore
    arg [--eh-frame-hdr] ==> ignore
    arg [-dynamic-linker] ==> ignore
    arg [/libexec/ld-elf.so.1] ==> ignore
    arg [--hash-style=both] ==> ignore
    arg [--enable-new-dtags] ==> ignore
    arg [-o] ==> ignore
    arg [cmTC_82de8] ==> ignore
    arg [/usr/lib/crt1.o] ==> obj [/usr/lib/crt1.o]
    arg [/usr/lib/crti.o] ==> obj [/usr/lib/crti.o]
    arg [/usr/lib/crtbegin.o] ==> obj [/usr/lib/crtbegin.o]
    arg [-L/usr/lib] ==> dir [/usr/lib]
    arg [CMakeFiles/cmTC_82de8.dir/CMakeCCompilerABI.c.o] ==> ignore
    arg [-lgcc] ==> lib [gcc]
    arg [--as-needed] ==> ignore
    arg [-lgcc_s] ==> lib [gcc_s]
    arg [--no-as-needed] ==> ignore
    arg [-lc] ==> lib [c]
    arg [-lgcc] ==> lib [gcc]
    arg [--as-needed] ==> ignore
    arg [-lgcc_s] ==> lib [gcc_s]
    arg [--no-as-needed] ==> ignore
    arg [/usr/lib/crtend.o] ==> obj [/usr/lib/crtend.o]
    arg [/usr/lib/crtn.o] ==> obj [/usr/lib/crtn.o]
  collapse library dir [/usr/lib] ==> [/usr/lib]
  implicit libs: [gcc;gcc_s;c;gcc;gcc_s]
  implicit objs: [/usr/lib/crt1.o;/usr/lib/crti.o;/usr/lib/crtbegin.o;/usr/lib/crtend.o;/usr/lib/crtn.o]
  implicit dirs: [/usr/lib]
  implicit fwks: []


Detecting CXX compiler ABI info compiled with the following output:
Change Dir: /home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/local/bin/gmake -f Makefile cmTC_021a2/fast && /usr/local/bin/gmake  -f CMakeFiles/cmTC_021a2.dir/build.make CMakeFiles/cmTC_021a2.dir/build
gmake[1]: Entering directory '/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_021a2.dir/CMakeCXXCompilerABI.cpp.o
/usr/bin/c++   -v -MD -MT CMakeFiles/cmTC_021a2.dir/CMakeCXXCompilerABI.cpp.o -MF CMakeFiles/cmTC_021a2.dir/CMakeCXXCompilerABI.cpp.o.d -o CMakeFiles/cmTC_021a2.dir/CMakeCXXCompilerABI.cpp.o -c /usr/local/share/cmake/Modules/CMakeCXXCompilerABI.cpp
FreeBSD clang version 13.0.0 (git@github.com:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a303)
Target: x86_64-unknown-freebsd13.1
Thread model: posix
InstalledDir: /usr/bin
 (in-process)
 "/usr/bin/c++" -cc1 -triple x86_64-unknown-freebsd13.1 -emit-obj -mrelax-all --mrelax-relocations -disable-free -disable-llvm-verifier -discard-value-names -main-file-name CMakeCXXCompilerABI.cpp -mrelocation-model static -mframe-pointer=all -fno-rounding-math -mconstructor-aliases -munwind-tables -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -v -fcoverage-compilation-dir=/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp -resource-dir /usr/lib/clang/13.0.0 -dependency-file CMakeFiles/cmTC_021a2.dir/CMakeCXXCompilerABI.cpp.o.d -MT CMakeFiles/cmTC_021a2.dir/CMakeCXXCompilerABI.cpp.o -sys-header-deps -cxx-isystem /home/user/caffe/include/ -internal-isystem /usr/include/c++/v1 -fdeprecated-macro -fdebug-compilation-dir=/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp -ferror-limit 19 -fgnuc-version=4.2.1 -fcxx-exceptions -fexceptions -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o CMakeFiles/cmTC_021a2.dir/CMakeCXXCompilerABI.cpp.o -x c++ /usr/local/share/cmake/Modules/CMakeCXXCompilerABI.cpp
clang -cc1 version 13.0.0 based upon LLVM 13.0.0 default target x86_64-unknown-freebsd13.1
#include "..." search starts here:
#include <...> search starts here:
 /home/user/caffe/include
 /usr/include/c++/v1
 /usr/lib/clang/13.0.0/include
 /usr/include
End of search list.
Linking CXX executable cmTC_021a2
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_021a2.dir/link.txt --verbose=1
/usr/bin/c++  -v CMakeFiles/cmTC_021a2.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_021a2 
FreeBSD clang version 13.0.0 (git@github.com:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a303)
Target: x86_64-unknown-freebsd13.1
Thread model: posix
InstalledDir: /usr/bin
 "/usr/bin/ld" --eh-frame-hdr -dynamic-linker /libexec/ld-elf.so.1 --hash-style=both --enable-new-dtags -o cmTC_021a2 /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o -L/usr/lib CMakeFiles/cmTC_021a2.dir/CMakeCXXCompilerABI.cpp.o -lc++ -lm -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/crtend.o /usr/lib/crtn.o
gmake[1]: Leaving directory '/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp'



Parsed CXX implicit include dir info from above output: rv=done
  found start of include info
  found start of implicit include info
    add: [/home/user/caffe/include]
    add: [/usr/include/c++/v1]
    add: [/usr/lib/clang/13.0.0/include]
    add: [/usr/include]
  end of search list found
  collapse include dir [/home/user/caffe/include] ==> [/home/user/caffe/include]
  collapse include dir [/usr/include/c++/v1] ==> [/usr/include/c++/v1]
  collapse include dir [/usr/lib/clang/13.0.0/include] ==> [/usr/lib/clang/13.0.0/include]
  collapse include dir [/usr/include] ==> [/usr/include]
  implicit include dirs: [/home/user/caffe/include;/usr/include/c++/v1;/usr/lib/clang/13.0.0/include;/usr/include]


Parsed CXX implicit link information from above output:
  link line regex: [^( *|.*[/\])(ld\.lld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)]
  ignore line: [Change Dir: /home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp]
  ignore line: []
  ignore line: [Run Build Command(s):/usr/local/bin/gmake -f Makefile cmTC_021a2/fast && /usr/local/bin/gmake  -f CMakeFiles/cmTC_021a2.dir/build.make CMakeFiles/cmTC_021a2.dir/build]
  ignore line: [gmake[1]: Entering directory '/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp']
  ignore line: [Building CXX object CMakeFiles/cmTC_021a2.dir/CMakeCXXCompilerABI.cpp.o]
  ignore line: [/usr/bin/c++   -v -MD -MT CMakeFiles/cmTC_021a2.dir/CMakeCXXCompilerABI.cpp.o -MF CMakeFiles/cmTC_021a2.dir/CMakeCXXCompilerABI.cpp.o.d -o CMakeFiles/cmTC_021a2.dir/CMakeCXXCompilerABI.cpp.o -c /usr/local/share/cmake/Modules/CMakeCXXCompilerABI.cpp]
  ignore line: [FreeBSD clang version 13.0.0 (git@github.com:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a303)]
  ignore line: [Target: x86_64-unknown-freebsd13.1]
  ignore line: [Thread model: posix]
  ignore line: [InstalledDir: /usr/bin]
  ignore line: [ (in-process)]
  ignore line: [ "/usr/bin/c++" -cc1 -triple x86_64-unknown-freebsd13.1 -emit-obj -mrelax-all --mrelax-relocations -disable-free -disable-llvm-verifier -discard-value-names -main-file-name CMakeCXXCompilerABI.cpp -mrelocation-model static -mframe-pointer=all -fno-rounding-math -mconstructor-aliases -munwind-tables -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -v -fcoverage-compilation-dir=/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp -resource-dir /usr/lib/clang/13.0.0 -dependency-file CMakeFiles/cmTC_021a2.dir/CMakeCXXCompilerABI.cpp.o.d -MT CMakeFiles/cmTC_021a2.dir/CMakeCXXCompilerABI.cpp.o -sys-header-deps -cxx-isystem /home/user/caffe/include/ -internal-isystem /usr/include/c++/v1 -fdeprecated-macro -fdebug-compilation-dir=/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp -ferror-limit 19 -fgnuc-version=4.2.1 -fcxx-exceptions -fexceptions -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o CMakeFiles/cmTC_021a2.dir/CMakeCXXCompilerABI.cpp.o -x c++ /usr/local/share/cmake/Modules/CMakeCXXCompilerABI.cpp]
  ignore line: [clang -cc1 version 13.0.0 based upon LLVM 13.0.0 default target x86_64-unknown-freebsd13.1]
  ignore line: [#include "..." search starts here:]
  ignore line: [#include <...> search starts here:]
  ignore line: [ /home/user/caffe/include]
  ignore line: [ /usr/include/c++/v1]
  ignore line: [ /usr/lib/clang/13.0.0/include]
  ignore line: [ /usr/include]
  ignore line: [End of search list.]
  ignore line: [Linking CXX executable cmTC_021a2]
  ignore line: [/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_021a2.dir/link.txt --verbose=1]
  ignore line: [/usr/bin/c++  -v CMakeFiles/cmTC_021a2.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_021a2 ]
  ignore line: [FreeBSD clang version 13.0.0 (git@github.com:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a303)]
  ignore line: [Target: x86_64-unknown-freebsd13.1]
  ignore line: [Thread model: posix]
  ignore line: [InstalledDir: /usr/bin]
  link line: [ "/usr/bin/ld" --eh-frame-hdr -dynamic-linker /libexec/ld-elf.so.1 --hash-style=both --enable-new-dtags -o cmTC_021a2 /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o -L/usr/lib CMakeFiles/cmTC_021a2.dir/CMakeCXXCompilerABI.cpp.o -lc++ -lm -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/crtend.o /usr/lib/crtn.o]
    arg [/usr/bin/ld] ==> ignore
    arg [--eh-frame-hdr] ==> ignore
    arg [-dynamic-linker] ==> ignore
    arg [/libexec/ld-elf.so.1] ==> ignore
    arg [--hash-style=both] ==> ignore
    arg [--enable-new-dtags] ==> ignore
    arg [-o] ==> ignore
    arg [cmTC_021a2] ==> ignore
    arg [/usr/lib/crt1.o] ==> obj [/usr/lib/crt1.o]
    arg [/usr/lib/crti.o] ==> obj [/usr/lib/crti.o]
    arg [/usr/lib/crtbegin.o] ==> obj [/usr/lib/crtbegin.o]
    arg [-L/usr/lib] ==> dir [/usr/lib]
    arg [CMakeFiles/cmTC_021a2.dir/CMakeCXXCompilerABI.cpp.o] ==> ignore
    arg [-lc++] ==> lib [c++]
    arg [-lm] ==> lib [m]
    arg [-lgcc] ==> lib [gcc]
    arg [--as-needed] ==> ignore
    arg [-lgcc_s] ==> lib [gcc_s]
    arg [--no-as-needed] ==> ignore
    arg [-lc] ==> lib [c]
    arg [-lgcc] ==> lib [gcc]
    arg [--as-needed] ==> ignore
    arg [-lgcc_s] ==> lib [gcc_s]
    arg [--no-as-needed] ==> ignore
    arg [/usr/lib/crtend.o] ==> obj [/usr/lib/crtend.o]
    arg [/usr/lib/crtn.o] ==> obj [/usr/lib/crtn.o]
  collapse library dir [/usr/lib] ==> [/usr/lib]
  implicit libs: [c++;m;gcc;gcc_s;c;gcc;gcc_s]
  implicit objs: [/usr/lib/crt1.o;/usr/lib/crti.o;/usr/lib/crtbegin.o;/usr/lib/crtend.o;/usr/lib/crtn.o]
  implicit dirs: [/usr/lib]
  implicit fwks: []


Performing C++ SOURCE FILE Test COMPILER_HAS_HIDDEN_VISIBILITY succeeded with the following output:
Change Dir: /home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/local/bin/gmake -f Makefile cmTC_e7a98/fast && /usr/local/bin/gmake  -f CMakeFiles/cmTC_e7a98.dir/build.make CMakeFiles/cmTC_e7a98.dir/build
gmake[1]: Entering directory '/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_e7a98.dir/src.cxx.o
/usr/bin/c++ -DCOMPILER_HAS_HIDDEN_VISIBILITY  -fvisibility=hidden -MD -MT CMakeFiles/cmTC_e7a98.dir/src.cxx.o -MF CMakeFiles/cmTC_e7a98.dir/src.cxx.o.d -o CMakeFiles/cmTC_e7a98.dir/src.cxx.o -c /home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp/src.cxx
Linking CXX executable cmTC_e7a98
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_e7a98.dir/link.txt --verbose=1
/usr/bin/c++ CMakeFiles/cmTC_e7a98.dir/src.cxx.o -o cmTC_e7a98 
gmake[1]: Leaving directory '/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp'


Source file was:
int main() { return 0; }
Performing C++ SOURCE FILE Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY succeeded with the following output:
Change Dir: /home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/local/bin/gmake -f Makefile cmTC_d038e/fast && /usr/local/bin/gmake  -f CMakeFiles/cmTC_d038e.dir/build.make CMakeFiles/cmTC_d038e.dir/build
gmake[1]: Entering directory '/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_d038e.dir/src.cxx.o
/usr/bin/c++ -DCOMPILER_HAS_HIDDEN_INLINE_VISIBILITY  -fvisibility-inlines-hidden -MD -MT CMakeFiles/cmTC_d038e.dir/src.cxx.o -MF CMakeFiles/cmTC_d038e.dir/src.cxx.o.d -o CMakeFiles/cmTC_d038e.dir/src.cxx.o -c /home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp/src.cxx
Linking CXX executable cmTC_d038e
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_d038e.dir/link.txt --verbose=1
/usr/bin/c++ CMakeFiles/cmTC_d038e.dir/src.cxx.o -o cmTC_d038e 
gmake[1]: Leaving directory '/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp'


Source file was:
int main() { return 0; }
Performing C++ SOURCE FILE Test COMPILER_HAS_DEPRECATED_ATTR succeeded with the following output:
Change Dir: /home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/local/bin/gmake -f Makefile cmTC_e91ff/fast && /usr/local/bin/gmake  -f CMakeFiles/cmTC_e91ff.dir/build.make CMakeFiles/cmTC_e91ff.dir/build
gmake[1]: Entering directory '/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_e91ff.dir/src.cxx.o
/usr/bin/c++ -DCOMPILER_HAS_DEPRECATED_ATTR   -MD -MT CMakeFiles/cmTC_e91ff.dir/src.cxx.o -MF CMakeFiles/cmTC_e91ff.dir/src.cxx.o.d -o CMakeFiles/cmTC_e91ff.dir/src.cxx.o -c /home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp/src.cxx
/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp/src.cxx:2:25: warning: 'somefunc' is deprecated [-Wdeprecated-declarations]
    int main() { return somefunc();}
                        ^
/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp/src.cxx:1:16: note: 'somefunc' has been explicitly marked deprecated here
__attribute__((__deprecated__)) int somefunc() { return 0; }
               ^
1 warning generated.
Linking CXX executable cmTC_e91ff
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_e91ff.dir/link.txt --verbose=1
/usr/bin/c++ CMakeFiles/cmTC_e91ff.dir/src.cxx.o -o cmTC_e91ff 
gmake[1]: Leaving directory '/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp'


Source file was:
__attribute__((__deprecated__)) int somefunc() { return 0; }
    int main() { return somefunc();}
Determining if the function sin exists in the m passed with the following output:
Change Dir: /home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/local/bin/gmake -f Makefile cmTC_57336/fast && /usr/local/bin/gmake  -f CMakeFiles/cmTC_57336.dir/build.make CMakeFiles/cmTC_57336.dir/build
gmake[1]: Entering directory '/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_57336.dir/CheckFunctionExists.c.o
/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=sin -MD -MT CMakeFiles/cmTC_57336.dir/CheckFunctionExists.c.o -MF CMakeFiles/cmTC_57336.dir/CheckFunctionExists.c.o.d -o CMakeFiles/cmTC_57336.dir/CheckFunctionExists.c.o -c /usr/local/share/cmake/Modules/CheckFunctionExists.c
/usr/local/share/cmake/Modules/CheckFunctionExists.c:7:3: warning: incompatible redeclaration of library function 'sin' [-Wincompatible-library-redeclaration]
  CHECK_FUNCTION_EXISTS(void);
  ^
<command line>:1:31: note: expanded from here
#define CHECK_FUNCTION_EXISTS sin
                              ^
/usr/local/share/cmake/Modules/CheckFunctionExists.c:7:3: note: 'sin' is a builtin with type 'double (double)'
<command line>:1:31: note: expanded from here
#define CHECK_FUNCTION_EXISTS sin
                              ^
1 warning generated.
Linking C executable cmTC_57336
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_57336.dir/link.txt --verbose=1
/usr/bin/cc  -DCHECK_FUNCTION_EXISTS=sin CMakeFiles/cmTC_57336.dir/CheckFunctionExists.c.o -o cmTC_57336  -lm 
gmake[1]: Leaving directory '/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp'

Thanks

Alright, I had to start over and did:

git clone --recursive https://github.com/KhronosGroup/OpenCL-SDK.git

$ cd OpenCL-SDK
$ mkdir build
$ cd build
$ cmake ..
$ make

And now get a different error after doing "make":

[  1%] Building C object external/OpenCL-ICD-Loader/CMakeFiles/OpenCL.dir/loader/icd.c.o
/usr/home/user/OpenCL-SDK/external/OpenCL-ICD-Loader/loader/icd.c:343:25: error: use of undeclared identifier 'PATH_SEPARATOR'
    next = strchr(path, PATH_SEPARATOR);
                        ^
1 error generated.
*** Error code 1

Stop.
make[2]: stopped in /usr/home/user/OpenCL-SDK/build
*** Error code 1

Stop.
make[1]: stopped in /usr/home/user/OpenCL-SDK/build
*** Error code 1

Stop.
make: stopped in /usr/home/user/OpenCL-SDK/build

Here is the output after doing "cmake":

-- The C compiler identification is Clang 13.0.0
-- The CXX compiler identification is Clang 13.0.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- No build type selected, default to Release
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Looking for secure_getenv
-- Looking for secure_getenv - not found
-- Looking for __secure_getenv
-- Looking for __secure_getenv - not found
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- cargs (https://github.com/likle/cargs) not found. To self-host, set cargs_INCLUDE_PATH and cargs_LIBRARY to point to the headers and library respectively adding '-D cargs_INCLUDE_PATH=/path/to/cargs/include/dir -D cargs_LIBRARY/path/to/cargs/libcargs' to the cmake command. (missing: cargs_INCLUDE_PATH cargs_LIBRARY) 
-- Fetching cargs.
-- Adding cargs subproject: /usr/home/user/OpenCL-SDK/build/_deps/cargs-external-src
-- Found TCLAP: /usr/local/include  
-- Stb (https://github.com/nothings/stb) not found. To self-host, set Stb_INCLUDE_PATH to point to the headers adding '-D Stb_INCLUDE_PATH=/path/to/stb' to the cmake command. (missing: Stb_INCLUDE_PATH) 
-- Fetching Stb.
-- Found Stb: /usr/home/user/OpenCL-SDK/build/_deps/stb-external-src  
CMake Warning (dev) at /usr/local/share/cmake/Modules/FindOpenGL.cmake:315 (message):
  Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
  available.  Run "cmake --help-policy CMP0072" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  FindOpenGL found both a legacy GL library:

    OPENGL_gl_LIBRARY: /usr/local/lib/libGL.so

  and GLVND libraries for OpenGL and GLX:

    OPENGL_opengl_LIBRARY: /usr/local/lib/libOpenGL.so
    OPENGL_glx_LIBRARY: /usr/local/lib/libGLX.so

  OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
  compatibility with CMake 3.10 and below the legacy GL library will be used.
Call Stack (most recent call first):
  cmake/Dependencies/OpenGL/OpenGL.cmake:1 (find_package)
  cmake/Dependencies.cmake:10 (include)
  CMakeLists.txt:49 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found OpenGL: /usr/local/lib/libOpenGL.so   
-- Found GLEW: /usr/local/include (found version "2.2.0") 
-- Found Freetype: /usr/local/lib/libfreetype.so (found version "2.12.1") 
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- Looking for sin in m
-- Looking for sin in m - found
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/home/user/OpenCL-SDK/build

Here is the cmakeoutput.log file:

The system is: FreeBSD - 13.1-RELEASE-p1 - amd64
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: /usr/bin/cc 
Build flags: 
Id flags:  

The output was:
0


Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.out"

The C compiler identification is Clang, found in "/usr/home/user/OpenCL-SDK/build/CMakeFiles/3.24.0/CompilerIdC/a.out"

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler: /usr/bin/c++ 
Build flags: 
Id flags:  

The output was:
0


Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.out"

The CXX compiler identification is Clang, found in "/usr/home/user/OpenCL-SDK/build/CMakeFiles/3.24.0/CompilerIdCXX/a.out"

Detecting C compiler ABI info compiled with the following output:
Change Dir: /usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/local/bin/gmake -f Makefile cmTC_b6fa4/fast && /usr/local/bin/gmake  -f CMakeFiles/cmTC_b6fa4.dir/build.make CMakeFiles/cmTC_b6fa4.dir/build
gmake[1]: Entering directory '/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_b6fa4.dir/CMakeCCompilerABI.c.o
/usr/bin/cc   -v -MD -MT CMakeFiles/cmTC_b6fa4.dir/CMakeCCompilerABI.c.o -MF CMakeFiles/cmTC_b6fa4.dir/CMakeCCompilerABI.c.o.d -o CMakeFiles/cmTC_b6fa4.dir/CMakeCCompilerABI.c.o -c /usr/local/share/cmake/Modules/CMakeCCompilerABI.c
FreeBSD clang version 13.0.0 (git@github.com:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a303)
Target: x86_64-unknown-freebsd13.1
Thread model: posix
InstalledDir: /usr/bin
 (in-process)
 "/usr/bin/cc" -cc1 -triple x86_64-unknown-freebsd13.1 -emit-obj -mrelax-all --mrelax-relocations -disable-free -disable-llvm-verifier -discard-value-names -main-file-name CMakeCCompilerABI.c -mrelocation-model static -mframe-pointer=all -fno-rounding-math -mconstructor-aliases -munwind-tables -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -v -fcoverage-compilation-dir=/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp -resource-dir /usr/lib/clang/13.0.0 -dependency-file CMakeFiles/cmTC_b6fa4.dir/CMakeCCompilerABI.c.o.d -MT CMakeFiles/cmTC_b6fa4.dir/CMakeCCompilerABI.c.o -sys-header-deps -cxx-isystem /home/user/caffe/include/ -fdebug-compilation-dir=/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp -ferror-limit 19 -fgnuc-version=4.2.1 -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o CMakeFiles/cmTC_b6fa4.dir/CMakeCCompilerABI.c.o -x c /usr/local/share/cmake/Modules/CMakeCCompilerABI.c
clang -cc1 version 13.0.0 based upon LLVM 13.0.0 default target x86_64-unknown-freebsd13.1
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/clang/13.0.0/include
 /usr/include
End of search list.
Linking C executable cmTC_b6fa4
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_b6fa4.dir/link.txt --verbose=1
/usr/bin/cc  -v CMakeFiles/cmTC_b6fa4.dir/CMakeCCompilerABI.c.o -o cmTC_b6fa4 
FreeBSD clang version 13.0.0 (git@github.com:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a303)
Target: x86_64-unknown-freebsd13.1
Thread model: posix
InstalledDir: /usr/bin
 "/usr/bin/ld" --eh-frame-hdr -dynamic-linker /libexec/ld-elf.so.1 --hash-style=both --enable-new-dtags -o cmTC_b6fa4 /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o -L/usr/lib CMakeFiles/cmTC_b6fa4.dir/CMakeCCompilerABI.c.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/crtend.o /usr/lib/crtn.o
gmake[1]: Leaving directory '/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp'



Parsed C implicit include dir info from above output: rv=done
  found start of include info
  found start of implicit include info
    add: [/usr/lib/clang/13.0.0/include]
    add: [/usr/include]
  end of search list found
  collapse include dir [/usr/lib/clang/13.0.0/include] ==> [/usr/lib/clang/13.0.0/include]
  collapse include dir [/usr/include] ==> [/usr/include]
  implicit include dirs: [/usr/lib/clang/13.0.0/include;/usr/include]


Parsed C implicit link information from above output:
  link line regex: [^( *|.*[/\])(ld\.lld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)]
  ignore line: [Change Dir: /usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp]
  ignore line: []
  ignore line: [Run Build Command(s):/usr/local/bin/gmake -f Makefile cmTC_b6fa4/fast && /usr/local/bin/gmake  -f CMakeFiles/cmTC_b6fa4.dir/build.make CMakeFiles/cmTC_b6fa4.dir/build]
  ignore line: [gmake[1]: Entering directory '/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp']
  ignore line: [Building C object CMakeFiles/cmTC_b6fa4.dir/CMakeCCompilerABI.c.o]
  ignore line: [/usr/bin/cc   -v -MD -MT CMakeFiles/cmTC_b6fa4.dir/CMakeCCompilerABI.c.o -MF CMakeFiles/cmTC_b6fa4.dir/CMakeCCompilerABI.c.o.d -o CMakeFiles/cmTC_b6fa4.dir/CMakeCCompilerABI.c.o -c /usr/local/share/cmake/Modules/CMakeCCompilerABI.c]
  ignore line: [FreeBSD clang version 13.0.0 (git@github.com:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a303)]
  ignore line: [Target: x86_64-unknown-freebsd13.1]
  ignore line: [Thread model: posix]
  ignore line: [InstalledDir: /usr/bin]
  ignore line: [ (in-process)]
  ignore line: [ "/usr/bin/cc" -cc1 -triple x86_64-unknown-freebsd13.1 -emit-obj -mrelax-all --mrelax-relocations -disable-free -disable-llvm-verifier -discard-value-names -main-file-name CMakeCCompilerABI.c -mrelocation-model static -mframe-pointer=all -fno-rounding-math -mconstructor-aliases -munwind-tables -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -v -fcoverage-compilation-dir=/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp -resource-dir /usr/lib/clang/13.0.0 -dependency-file CMakeFiles/cmTC_b6fa4.dir/CMakeCCompilerABI.c.o.d -MT CMakeFiles/cmTC_b6fa4.dir/CMakeCCompilerABI.c.o -sys-header-deps -cxx-isystem /home/user/caffe/include/ -fdebug-compilation-dir=/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp -ferror-limit 19 -fgnuc-version=4.2.1 -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o CMakeFiles/cmTC_b6fa4.dir/CMakeCCompilerABI.c.o -x c /usr/local/share/cmake/Modules/CMakeCCompilerABI.c]
  ignore line: [clang -cc1 version 13.0.0 based upon LLVM 13.0.0 default target x86_64-unknown-freebsd13.1]
  ignore line: [#include "..." search starts here:]
  ignore line: [#include <...> search starts here:]
  ignore line: [ /usr/lib/clang/13.0.0/include]
  ignore line: [ /usr/include]
  ignore line: [End of search list.]
  ignore line: [Linking C executable cmTC_b6fa4]
  ignore line: [/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_b6fa4.dir/link.txt --verbose=1]
  ignore line: [/usr/bin/cc  -v CMakeFiles/cmTC_b6fa4.dir/CMakeCCompilerABI.c.o -o cmTC_b6fa4 ]
  ignore line: [FreeBSD clang version 13.0.0 (git@github.com:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a303)]
  ignore line: [Target: x86_64-unknown-freebsd13.1]
  ignore line: [Thread model: posix]
  ignore line: [InstalledDir: /usr/bin]
  link line: [ "/usr/bin/ld" --eh-frame-hdr -dynamic-linker /libexec/ld-elf.so.1 --hash-style=both --enable-new-dtags -o cmTC_b6fa4 /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o -L/usr/lib CMakeFiles/cmTC_b6fa4.dir/CMakeCCompilerABI.c.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/crtend.o /usr/lib/crtn.o]
    arg [/usr/bin/ld] ==> ignore
    arg [--eh-frame-hdr] ==> ignore
    arg [-dynamic-linker] ==> ignore
    arg [/libexec/ld-elf.so.1] ==> ignore
    arg [--hash-style=both] ==> ignore
    arg [--enable-new-dtags] ==> ignore
    arg [-o] ==> ignore
    arg [cmTC_b6fa4] ==> ignore
    arg [/usr/lib/crt1.o] ==> obj [/usr/lib/crt1.o]
    arg [/usr/lib/crti.o] ==> obj [/usr/lib/crti.o]
    arg [/usr/lib/crtbegin.o] ==> obj [/usr/lib/crtbegin.o]
    arg [-L/usr/lib] ==> dir [/usr/lib]
    arg [CMakeFiles/cmTC_b6fa4.dir/CMakeCCompilerABI.c.o] ==> ignore
    arg [-lgcc] ==> lib [gcc]
    arg [--as-needed] ==> ignore
    arg [-lgcc_s] ==> lib [gcc_s]
    arg [--no-as-needed] ==> ignore
    arg [-lc] ==> lib [c]
    arg [-lgcc] ==> lib [gcc]
    arg [--as-needed] ==> ignore
    arg [-lgcc_s] ==> lib [gcc_s]
    arg [--no-as-needed] ==> ignore
    arg [/usr/lib/crtend.o] ==> obj [/usr/lib/crtend.o]
    arg [/usr/lib/crtn.o] ==> obj [/usr/lib/crtn.o]
  collapse library dir [/usr/lib] ==> [/usr/lib]
  implicit libs: [gcc;gcc_s;c;gcc;gcc_s]
  implicit objs: [/usr/lib/crt1.o;/usr/lib/crti.o;/usr/lib/crtbegin.o;/usr/lib/crtend.o;/usr/lib/crtn.o]
  implicit dirs: [/usr/lib]
  implicit fwks: []


Detecting CXX compiler ABI info compiled with the following output:
Change Dir: /usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/local/bin/gmake -f Makefile cmTC_df0e8/fast && /usr/local/bin/gmake  -f CMakeFiles/cmTC_df0e8.dir/build.make CMakeFiles/cmTC_df0e8.dir/build
gmake[1]: Entering directory '/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_df0e8.dir/CMakeCXXCompilerABI.cpp.o
/usr/bin/c++   -v -MD -MT CMakeFiles/cmTC_df0e8.dir/CMakeCXXCompilerABI.cpp.o -MF CMakeFiles/cmTC_df0e8.dir/CMakeCXXCompilerABI.cpp.o.d -o CMakeFiles/cmTC_df0e8.dir/CMakeCXXCompilerABI.cpp.o -c /usr/local/share/cmake/Modules/CMakeCXXCompilerABI.cpp
FreeBSD clang version 13.0.0 (git@github.com:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a303)
Target: x86_64-unknown-freebsd13.1
Thread model: posix
InstalledDir: /usr/bin
 (in-process)
 "/usr/bin/c++" -cc1 -triple x86_64-unknown-freebsd13.1 -emit-obj -mrelax-all --mrelax-relocations -disable-free -disable-llvm-verifier -discard-value-names -main-file-name CMakeCXXCompilerABI.cpp -mrelocation-model static -mframe-pointer=all -fno-rounding-math -mconstructor-aliases -munwind-tables -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -v -fcoverage-compilation-dir=/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp -resource-dir /usr/lib/clang/13.0.0 -dependency-file CMakeFiles/cmTC_df0e8.dir/CMakeCXXCompilerABI.cpp.o.d -MT CMakeFiles/cmTC_df0e8.dir/CMakeCXXCompilerABI.cpp.o -sys-header-deps -cxx-isystem /home/user/caffe/include/ -internal-isystem /usr/include/c++/v1 -fdeprecated-macro -fdebug-compilation-dir=/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp -ferror-limit 19 -fgnuc-version=4.2.1 -fcxx-exceptions -fexceptions -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o CMakeFiles/cmTC_df0e8.dir/CMakeCXXCompilerABI.cpp.o -x c++ /usr/local/share/cmake/Modules/CMakeCXXCompilerABI.cpp
clang -cc1 version 13.0.0 based upon LLVM 13.0.0 default target x86_64-unknown-freebsd13.1
#include "..." search starts here:
#include <...> search starts here:
 /home/user/caffe/include
 /usr/include/c++/v1
 /usr/lib/clang/13.0.0/include
 /usr/include
End of search list.
Linking CXX executable cmTC_df0e8
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_df0e8.dir/link.txt --verbose=1
/usr/bin/c++  -v CMakeFiles/cmTC_df0e8.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_df0e8 
FreeBSD clang version 13.0.0 (git@github.com:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a303)
Target: x86_64-unknown-freebsd13.1
Thread model: posix
InstalledDir: /usr/bin
 "/usr/bin/ld" --eh-frame-hdr -dynamic-linker /libexec/ld-elf.so.1 --hash-style=both --enable-new-dtags -o cmTC_df0e8 /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o -L/usr/lib CMakeFiles/cmTC_df0e8.dir/CMakeCXXCompilerABI.cpp.o -lc++ -lm -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/crtend.o /usr/lib/crtn.o
gmake[1]: Leaving directory '/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp'



Parsed CXX implicit include dir info from above output: rv=done
  found start of include info
  found start of implicit include info
    add: [/home/user/caffe/include]
    add: [/usr/include/c++/v1]
    add: [/usr/lib/clang/13.0.0/include]
    add: [/usr/include]
  end of search list found
  collapse include dir [/home/user/caffe/include] ==> [/home/user/caffe/include]
  collapse include dir [/usr/include/c++/v1] ==> [/usr/include/c++/v1]
  collapse include dir [/usr/lib/clang/13.0.0/include] ==> [/usr/lib/clang/13.0.0/include]
  collapse include dir [/usr/include] ==> [/usr/include]
  implicit include dirs: [/home/user/caffe/include;/usr/include/c++/v1;/usr/lib/clang/13.0.0/include;/usr/include]


Parsed CXX implicit link information from above output:
  link line regex: [^( *|.*[/\])(ld\.lld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)]
  ignore line: [Change Dir: /usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp]
  ignore line: []
  ignore line: [Run Build Command(s):/usr/local/bin/gmake -f Makefile cmTC_df0e8/fast && /usr/local/bin/gmake  -f CMakeFiles/cmTC_df0e8.dir/build.make CMakeFiles/cmTC_df0e8.dir/build]
  ignore line: [gmake[1]: Entering directory '/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp']
  ignore line: [Building CXX object CMakeFiles/cmTC_df0e8.dir/CMakeCXXCompilerABI.cpp.o]
  ignore line: [/usr/bin/c++   -v -MD -MT CMakeFiles/cmTC_df0e8.dir/CMakeCXXCompilerABI.cpp.o -MF CMakeFiles/cmTC_df0e8.dir/CMakeCXXCompilerABI.cpp.o.d -o CMakeFiles/cmTC_df0e8.dir/CMakeCXXCompilerABI.cpp.o -c /usr/local/share/cmake/Modules/CMakeCXXCompilerABI.cpp]
  ignore line: [FreeBSD clang version 13.0.0 (git@github.com:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a303)]
  ignore line: [Target: x86_64-unknown-freebsd13.1]
  ignore line: [Thread model: posix]
  ignore line: [InstalledDir: /usr/bin]
  ignore line: [ (in-process)]
  ignore line: [ "/usr/bin/c++" -cc1 -triple x86_64-unknown-freebsd13.1 -emit-obj -mrelax-all --mrelax-relocations -disable-free -disable-llvm-verifier -discard-value-names -main-file-name CMakeCXXCompilerABI.cpp -mrelocation-model static -mframe-pointer=all -fno-rounding-math -mconstructor-aliases -munwind-tables -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -v -fcoverage-compilation-dir=/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp -resource-dir /usr/lib/clang/13.0.0 -dependency-file CMakeFiles/cmTC_df0e8.dir/CMakeCXXCompilerABI.cpp.o.d -MT CMakeFiles/cmTC_df0e8.dir/CMakeCXXCompilerABI.cpp.o -sys-header-deps -cxx-isystem /home/user/caffe/include/ -internal-isystem /usr/include/c++/v1 -fdeprecated-macro -fdebug-compilation-dir=/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp -ferror-limit 19 -fgnuc-version=4.2.1 -fcxx-exceptions -fexceptions -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o CMakeFiles/cmTC_df0e8.dir/CMakeCXXCompilerABI.cpp.o -x c++ /usr/local/share/cmake/Modules/CMakeCXXCompilerABI.cpp]
  ignore line: [clang -cc1 version 13.0.0 based upon LLVM 13.0.0 default target x86_64-unknown-freebsd13.1]
  ignore line: [#include "..." search starts here:]
  ignore line: [#include <...> search starts here:]
  ignore line: [ /home/user/caffe/include]
  ignore line: [ /usr/include/c++/v1]
  ignore line: [ /usr/lib/clang/13.0.0/include]
  ignore line: [ /usr/include]
  ignore line: [End of search list.]
  ignore line: [Linking CXX executable cmTC_df0e8]
  ignore line: [/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_df0e8.dir/link.txt --verbose=1]
  ignore line: [/usr/bin/c++  -v CMakeFiles/cmTC_df0e8.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_df0e8 ]
  ignore line: [FreeBSD clang version 13.0.0 (git@github.com:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a303)]
  ignore line: [Target: x86_64-unknown-freebsd13.1]
  ignore line: [Thread model: posix]
  ignore line: [InstalledDir: /usr/bin]
  link line: [ "/usr/bin/ld" --eh-frame-hdr -dynamic-linker /libexec/ld-elf.so.1 --hash-style=both --enable-new-dtags -o cmTC_df0e8 /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o -L/usr/lib CMakeFiles/cmTC_df0e8.dir/CMakeCXXCompilerABI.cpp.o -lc++ -lm -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/crtend.o /usr/lib/crtn.o]
    arg [/usr/bin/ld] ==> ignore
    arg [--eh-frame-hdr] ==> ignore
    arg [-dynamic-linker] ==> ignore
    arg [/libexec/ld-elf.so.1] ==> ignore
    arg [--hash-style=both] ==> ignore
    arg [--enable-new-dtags] ==> ignore
    arg [-o] ==> ignore
    arg [cmTC_df0e8] ==> ignore
    arg [/usr/lib/crt1.o] ==> obj [/usr/lib/crt1.o]
    arg [/usr/lib/crti.o] ==> obj [/usr/lib/crti.o]
    arg [/usr/lib/crtbegin.o] ==> obj [/usr/lib/crtbegin.o]
    arg [-L/usr/lib] ==> dir [/usr/lib]
    arg [CMakeFiles/cmTC_df0e8.dir/CMakeCXXCompilerABI.cpp.o] ==> ignore
    arg [-lc++] ==> lib [c++]
    arg [-lm] ==> lib [m]
    arg [-lgcc] ==> lib [gcc]
    arg [--as-needed] ==> ignore
    arg [-lgcc_s] ==> lib [gcc_s]
    arg [--no-as-needed] ==> ignore
    arg [-lc] ==> lib [c]
    arg [-lgcc] ==> lib [gcc]
    arg [--as-needed] ==> ignore
    arg [-lgcc_s] ==> lib [gcc_s]
    arg [--no-as-needed] ==> ignore
    arg [/usr/lib/crtend.o] ==> obj [/usr/lib/crtend.o]
    arg [/usr/lib/crtn.o] ==> obj [/usr/lib/crtn.o]
  collapse library dir [/usr/lib] ==> [/usr/lib]
  implicit libs: [c++;m;gcc;gcc_s;c;gcc;gcc_s]
  implicit objs: [/usr/lib/crt1.o;/usr/lib/crti.o;/usr/lib/crtbegin.o;/usr/lib/crtend.o;/usr/lib/crtn.o]
  implicit dirs: [/usr/lib]
  implicit fwks: []


Determining if the function pthread_create exists in the pthread passed with the following output:
Change Dir: /usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/local/bin/gmake -f Makefile cmTC_d47bb/fast && /usr/local/bin/gmake  -f CMakeFiles/cmTC_d47bb.dir/build.make CMakeFiles/cmTC_d47bb.dir/build
gmake[1]: Entering directory '/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_d47bb.dir/CheckFunctionExists.c.o
/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=pthread_create -MD -MT CMakeFiles/cmTC_d47bb.dir/CheckFunctionExists.c.o -MF CMakeFiles/cmTC_d47bb.dir/CheckFunctionExists.c.o.d -o CMakeFiles/cmTC_d47bb.dir/CheckFunctionExists.c.o -c /usr/local/share/cmake/Modules/CheckFunctionExists.c
Linking C executable cmTC_d47bb
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_d47bb.dir/link.txt --verbose=1
/usr/bin/cc  -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTC_d47bb.dir/CheckFunctionExists.c.o -o cmTC_d47bb  -lpthread 
gmake[1]: Leaving directory '/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp'



Performing C++ SOURCE FILE Test COMPILER_HAS_HIDDEN_VISIBILITY succeeded with the following output:
Change Dir: /usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/local/bin/gmake -f Makefile cmTC_24ed1/fast && /usr/local/bin/gmake  -f CMakeFiles/cmTC_24ed1.dir/build.make CMakeFiles/cmTC_24ed1.dir/build
gmake[1]: Entering directory '/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_24ed1.dir/src.cxx.o
/usr/bin/c++ -DCOMPILER_HAS_HIDDEN_VISIBILITY  -fvisibility=hidden -MD -MT CMakeFiles/cmTC_24ed1.dir/src.cxx.o -MF CMakeFiles/cmTC_24ed1.dir/src.cxx.o.d -o CMakeFiles/cmTC_24ed1.dir/src.cxx.o -c /usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp/src.cxx
Linking CXX executable cmTC_24ed1
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_24ed1.dir/link.txt --verbose=1
/usr/bin/c++ CMakeFiles/cmTC_24ed1.dir/src.cxx.o -o cmTC_24ed1 
gmake[1]: Leaving directory '/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp'


Source file was:
int main() { return 0; }
Performing C++ SOURCE FILE Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY succeeded with the following output:
Change Dir: /usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/local/bin/gmake -f Makefile cmTC_7b327/fast && /usr/local/bin/gmake  -f CMakeFiles/cmTC_7b327.dir/build.make CMakeFiles/cmTC_7b327.dir/build
gmake[1]: Entering directory '/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_7b327.dir/src.cxx.o
/usr/bin/c++ -DCOMPILER_HAS_HIDDEN_INLINE_VISIBILITY  -fvisibility-inlines-hidden -MD -MT CMakeFiles/cmTC_7b327.dir/src.cxx.o -MF CMakeFiles/cmTC_7b327.dir/src.cxx.o.d -o CMakeFiles/cmTC_7b327.dir/src.cxx.o -c /usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp/src.cxx
Linking CXX executable cmTC_7b327
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_7b327.dir/link.txt --verbose=1
/usr/bin/c++ CMakeFiles/cmTC_7b327.dir/src.cxx.o -o cmTC_7b327 
gmake[1]: Leaving directory '/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp'


Source file was:
int main() { return 0; }
Performing C++ SOURCE FILE Test COMPILER_HAS_DEPRECATED_ATTR succeeded with the following output:
Change Dir: /usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/local/bin/gmake -f Makefile cmTC_d9b91/fast && /usr/local/bin/gmake  -f CMakeFiles/cmTC_d9b91.dir/build.make CMakeFiles/cmTC_d9b91.dir/build
gmake[1]: Entering directory '/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_d9b91.dir/src.cxx.o
/usr/bin/c++ -DCOMPILER_HAS_DEPRECATED_ATTR   -MD -MT CMakeFiles/cmTC_d9b91.dir/src.cxx.o -MF CMakeFiles/cmTC_d9b91.dir/src.cxx.o.d -o CMakeFiles/cmTC_d9b91.dir/src.cxx.o -c /usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp/src.cxx
/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp/src.cxx:2:25: warning: 'somefunc' is deprecated [-Wdeprecated-declarations]
    int main() { return somefunc();}
                        ^
/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp/src.cxx:1:16: note: 'somefunc' has been explicitly marked deprecated here
__attribute__((__deprecated__)) int somefunc() { return 0; }
               ^
1 warning generated.
Linking CXX executable cmTC_d9b91
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_d9b91.dir/link.txt --verbose=1
/usr/bin/c++ CMakeFiles/cmTC_d9b91.dir/src.cxx.o -o cmTC_d9b91 
gmake[1]: Leaving directory '/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp'


Source file was:
__attribute__((__deprecated__)) int somefunc() { return 0; }
    int main() { return somefunc();}
Determining if the function sin exists in the m passed with the following output:
Change Dir: /usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/local/bin/gmake -f Makefile cmTC_2258c/fast && /usr/local/bin/gmake  -f CMakeFiles/cmTC_2258c.dir/build.make CMakeFiles/cmTC_2258c.dir/build
gmake[1]: Entering directory '/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_2258c.dir/CheckFunctionExists.c.o
/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=sin -MD -MT CMakeFiles/cmTC_2258c.dir/CheckFunctionExists.c.o -MF CMakeFiles/cmTC_2258c.dir/CheckFunctionExists.c.o.d -o CMakeFiles/cmTC_2258c.dir/CheckFunctionExists.c.o -c /usr/local/share/cmake/Modules/CheckFunctionExists.c
/usr/local/share/cmake/Modules/CheckFunctionExists.c:7:3: warning: incompatible redeclaration of library function 'sin' [-Wincompatible-library-redeclaration]
  CHECK_FUNCTION_EXISTS(void);
  ^
<command line>:1:31: note: expanded from here
#define CHECK_FUNCTION_EXISTS sin
                              ^
/usr/local/share/cmake/Modules/CheckFunctionExists.c:7:3: note: 'sin' is a builtin with type 'double (double)'
<command line>:1:31: note: expanded from here
#define CHECK_FUNCTION_EXISTS sin
                              ^
1 warning generated.
Linking C executable cmTC_2258c
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_2258c.dir/link.txt --verbose=1
/usr/bin/cc  -DCHECK_FUNCTION_EXISTS=sin CMakeFiles/cmTC_2258c.dir/CheckFunctionExists.c.o -o cmTC_2258c  -lm 
gmake[1]: Leaving directory '/usr/home/user/OpenCL-SDK/build/CMakeFiles/CMakeTmp'

Thanks.

Thanks, this is helpful, and this looks like progress. Unfortunately, it also looks like we'll need some minor updates for the ICD loader and perhaps a few other parts of the SDK to work with FreeBSD.

Here is where PATH_SEPARATOR is defined in icd_platform.h:

#if defined(__linux__) || defined(__APPLE__)

#define PATH_SEPARATOR  ':'
#define DIRECTORY_SYMBOL '/'
// a bit more code here

#elif defined(_WIN32)

#define PATH_SEPARATOR ';'
#define DIRECTORY_SYMBOL '\\'

#endif

Because FreeBSD meets none of these conditions PATH_SEPARATOR is never defined.

A couple of things we can do to fix this:

  • Add || defined(__FreeBSD__) to the first condition, since the path separator and directory symbol should be the same as for Linux and Apple.
  • Change the first condition from defined(__linux__) to defined(__unix__), which will cover Linux, FreeBSD, and more.

It would also be nice to add a final #else condition with an informative error if an unknown OS is found.

Could you try making these changes to see if it will work for you? I don't have access to a FreeBSD system.

Useful reference: https://stackoverflow.com/questions/142508/how-do-i-check-os-with-a-preprocessor-directive

Thank You bashbaug, I will try these.

The program have successfully built, Thank You.

I simply modified Line 22 from:
#if defined(__linux__) || defined(__APPLE__)

To:
#if defined(__uniux__) || defined(__FreeBSD__) || defined(__APPLE__)

Then did a make again:

$ make

Consolidate compiler generated dependencies of target OpenCL
[  1%] Building C object external/OpenCL-ICD-Loader/CMakeFiles/OpenCL.dir/loader/icd.c.o
[  3%] Building C object external/OpenCL-ICD-Loader/CMakeFiles/OpenCL.dir/loader/icd_dispatch.c.o
[  4%] Building C object external/OpenCL-ICD-Loader/CMakeFiles/OpenCL.dir/loader/icd_dispatch_generated.c.o
[  6%] Building C object external/OpenCL-ICD-Loader/CMakeFiles/OpenCL.dir/loader/linux/icd_linux.c.o
[  7%] Building C object external/OpenCL-ICD-Loader/CMakeFiles/OpenCL.dir/loader/linux/icd_linux_envvars.c.o
/usr/home/user/OpenCL-SDK/external/OpenCL-ICD-Loader/loader/linux/icd_linux_envvars.c:51:9: warning: Warning:  Falling back to non-secure getenv for environmental lookups!  Consider updating to a different libc. [-W#pragma-messages]
#pragma message(                                                                       \
        ^
1 warning generated.
[  9%] Linking C shared library libOpenCL.so
[  9%] Built target OpenCL
[ 10%] Building CXX object external/OpenCL-CLHPP/examples/src/CMakeFiles/trivial.dir/trivial.cpp.o
[ 12%] Linking CXX executable trivial
[ 12%] Built target trivial
[ 13%] Building CXX object external/OpenCL-CLHPP/examples/src/CMakeFiles/trivialSizeTCompat.dir/trivialSizeTCompat.cpp.o
[ 15%] Linking CXX executable trivialSizeTCompat
[ 15%] Built target trivialSizeTCompat
[ 16%] Building CXX object external/OpenCL-CLHPP/examples/src/CMakeFiles/headerexample.dir/headerexample.cpp.o
[ 18%] Linking CXX executable headerexample
[ 18%] Built target headerexample
[ 19%] Building C object _deps/cargs-external-build/CMakeFiles/cargs.dir/src/cargs.c.o
[ 21%] Linking C static library libcargs.a
[ 21%] Built target cargs
[ 22%] Building C object _deps/cargs-external-build/CMakeFiles/cargstest.dir/test/main.c.o
[ 24%] Building C object _deps/cargs-external-build/CMakeFiles/cargstest.dir/test/option_test.c.o
[ 25%] Linking C executable cargstest
[ 25%] Built target cargstest
[ 27%] Building C object lib/CMakeFiles/OpenCLUtils.dir/src/Utils/Utils.c.o
[ 28%] Linking C static library libOpenCLUtils.a
[ 28%] Built target OpenCLUtils
[ 30%] Building CXX object lib/CMakeFiles/OpenCLUtilsCpp.dir/src/Utils/Utils.cpp.o
[ 31%] Linking CXX static library libOpenCLUtilsCpp.a
[ 31%] Built target OpenCLUtilsCpp
[ 33%] Building C object lib/CMakeFiles/OpenCLSDK.dir/src/SDK/CLI.c.o
[ 34%] Building C object lib/CMakeFiles/OpenCLSDK.dir/src/SDK/Context.c.o
[ 36%] Building C object lib/CMakeFiles/OpenCLSDK.dir/src/SDK/Image.c.o
[ 37%] Building C object lib/CMakeFiles/OpenCLSDK.dir/src/SDK/Random.c.o
[ 39%] Linking C static library libOpenCLSDK.a
[ 39%] Built target OpenCLSDK
[ 40%] Building CXX object lib/CMakeFiles/OpenCLSDKCpp.dir/src/SDK/CLI.cpp.o
[ 42%] Building CXX object lib/CMakeFiles/OpenCLSDKCpp.dir/src/SDK/Image.cpp.o
[ 43%] Building CXX object lib/CMakeFiles/OpenCLSDKCpp.dir/src/SDK/InteropContext.cpp.o
[ 45%] Building CXX object lib/CMakeFiles/OpenCLSDKCpp.dir/src/SDK/InteropWindow.cpp.o
[ 46%] Linking CXX static library libOpenCLSDKCpp.a
[ 46%] Built target OpenCLSDKCpp
[ 46%] Built target enumopencl-device-code
[ 48%] Building CXX object samples/core/enumopencl/CMakeFiles/enumopencl.dir/main.cpp.o
[ 50%] Linking CXX executable ../../../bin/enumopencl
[ 50%] Built target enumopencl
[ 50%] Built target copybuffer-device-code
[ 51%] Building CXX object samples/core/copybuffer/CMakeFiles/copybuffer.dir/main.cpp.o
[ 53%] Linking CXX executable ../../../bin/copybuffer
[ 53%] Built target copybuffer
[ 53%] Built target copybufferkernel-device-code
[ 54%] Building CXX object samples/core/copybufferkernel/CMakeFiles/copybufferkernel.dir/main.cpp.o
[ 56%] Linking CXX executable ../../../bin/copybufferkernel
[ 56%] Built target copybufferkernel
[ 57%] Copying saxpy.cl
[ 57%] Built target saxpy-device-code
[ 59%] Building C object samples/core/saxpy/CMakeFiles/saxpy.dir/main.c.o
[ 60%] Linking CXX executable ../../../bin/saxpy
[ 60%] Built target saxpy
[ 62%] Building CXX object samples/core/saxpy/CMakeFiles/saxpycpp.dir/main.cpp.o
[ 63%] Linking CXX executable ../../../bin/saxpycpp
[ 63%] Built target saxpycpp
[ 65%] Copying reduce.cl
[ 65%] Built target reduce-device-code
[ 66%] Building C object samples/core/reduce/CMakeFiles/reduce.dir/main.c.o
[ 68%] Linking CXX executable ../../../bin/reduce
[ 68%] Built target reduce
[ 69%] Building CXX object samples/core/reduce/CMakeFiles/reducecpp.dir/main.cpp.o
[ 71%] Linking CXX executable ../../../bin/reducecpp
[ 71%] Built target reducecpp
[ 72%] Copying blur.cl
[ 72%] Built target blur-device-code
[ 74%] Building C object samples/core/blur/CMakeFiles/blur.dir/main.c.o
[ 75%] Linking CXX executable ../../../bin/blur
[ 75%] Built target blur
[ 77%] Copying Collatz.cl
[ 77%] Built target binaries-device-code
[ 78%] Building C object samples/core/binaries/CMakeFiles/binaries.dir/main.c.o
[ 80%] Linking CXX executable ../../../bin/binaries
[ 80%] Built target binaries
[ 81%] Copying histogram.cl
[ 81%] Built target histogram-device-code
[ 83%] Building CXX object samples/extensions/khr/histogram/CMakeFiles/histogramcpp.dir/main.cpp.o
[ 84%] Linking CXX executable ../../../../bin/histogramcpp
[ 84%] Built target histogramcpp
[ 86%] Copying conway.cl
[ 87%] Copying conway.frag.glsl
[ 89%] Copying conway.vert.glsl
[ 89%] Built target conway-device-code
[ 90%] Building CXX object samples/extensions/khr/conway/CMakeFiles/conwaycpp.dir/main.cpp.o
/usr/home/user/OpenCL-SDK/samples/extensions/khr/conway/main.cpp:357:13: warning: 22 enumeration values not handled in switch: 'Resized', 'LostFocus', 'GainedFocus'... [-Wswitch]
    switch (event.type)
            ^
1 warning generated.
[ 92%] Linking CXX executable ../../../../bin/conwaycpp
[ 92%] Built target conwaycpp
[ 93%] Copying nbody.cl
[ 95%] Copying nbody.frag.glsl
[ 96%] Copying nbody.vert.glsl
[ 96%] Built target nbody-device-code
[ 98%] Building CXX object samples/extensions/khr/nbody/CMakeFiles/nbodycpp.dir/main.cpp.o
/usr/home/user/OpenCL-SDK/samples/extensions/khr/nbody/main.cpp:388:13: warning: 17 enumeration values not handled in switch: 'LostFocus', 'GainedFocus', 'TextEntered'... [-Wswitch]
    switch (event.type)
            ^
1 warning generated.
[100%] Linking CXX executable ../../../../bin/nbodycpp
[100%] Built target nbodycpp

As for adding an "else" check for the preprocessor directives in OS checking, this might work placed right above the first #endif directive:

#elif !defined(__uniux__) || !defined(__FreeBSD__) || !defined(__APPLE__) || !defined(_WIN32)
printf("Unknow OS, determined at icd_platform.h");

It did compile but not sure how to trick the compiler to think I am using an OS that is not compatible.

@bashbaug can this fix be submitted as a PR? That way I can grab the PR as a patch and apply it to the cross-compilation script.

I mean, a PR to OpenCL-Headers + OpenCL-ICD-Loader, which is the core library we are trying to cross-compile, not the SDK as a whole.

Yes - let's move discussion to the issue I just created, since we'll be making changes to the OpenCL ICD loader at least.

KhronosGroup/OpenCL-ICD-Loader#184

I'll create a PR with @rajhlinux's changes. I don't have a FreeBSD system setup to easily test things right now (I can try setting up a VM), so I'll need a bit of help with the review, though.