davisking / dlib

A toolkit for making real world machine learning and data analysis applications in C++
http://dlib.net
Boost Software License 1.0
13.21k stars 3.34k forks source link

Cannot compile against anaconda's clang compilers #1525

Closed 183amir closed 5 years ago

183amir commented 5 years ago

I am trying to compile dlib in conda against anaconda compilers and it fails to build. The build in cmake with: -- Configuring incomplete, errors occurred! within this log:

+ cmake -LAH ../tools/python -DCMAKE_PREFIX_PATH=/Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/bin/python -DPYTHON_LIBRARY=/Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/libpython3.6m.dylib -DPYTHON_INCLUDE_DIR=/Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/include/python3.6m -DDLIB_PNG_SUPPORT=1 -DPNG_INCLUDE_DIR=/Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/include -DPNG_PNG_INCLUDE_DIR=/Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/include -DPNG_LIBRARY=/Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/libpng.dylib -DZLIB_INCLUDE_DIRS=/Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/include -DZLIB_LIBRARIES=/Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/libz.dylib -DDLIB_JPEG_SUPPORT=1 -DJPEG_INCLUDE_DIR=/Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/include -DJPEG_LIBRARY=/Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/libjpeg.dylib -DDLIB_LINK_WITH_SQLITE3=1 -DDLIB_NO_GUI_SUPPORT=1 -DUSE_SSE2_INSTRUCTIONS=1 -DUSE_SSE4_INSTRUCTIONS=1 -DUSE_AVX_INSTRUCTIONS=0 -DDLIB_USE_BLAS=1 -DDLIB_USE_LAPACK=1 -DDLIB_USE_CUDA=0 -DDLIB_GIF_SUPPORT=0
-- The C compiler identification is Clang 4.0.1
-- The CXX compiler identification is Clang 4.0.1
-- Check for working C compiler: /Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_build_env/bin/x86_64-apple-darwin13.4.0-clang
-- Check for working C compiler: /Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_build_env/bin/x86_64-apple-darwin13.4.0-clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_build_env/bin/x86_64-apple-darwin13.4.0-clang++
-- Check for working CXX compiler: /Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_build_env/bin/x86_64-apple-darwin13.4.0-clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: /Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/bin/python (found version "3.6.4") 
-- Found PythonLibs: /Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/libpython3.6m.dylib
-- Performing Test HAS_CPP14_FLAG
-- Performing Test HAS_CPP14_FLAG - Success
-- pybind11 v2.2.2
-- Using CMake version: 3.12.2
-- Compiling dlib version: 19.16.0
-- SSE4 instructions can be executed by the host processor.
-- AVX instructions can be executed by the host processor.
-- Enabling SSE4 instructions
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE  
-- Searching for BLAS and LAPACK
-- Searching for BLAS and LAPACK
-- Found PkgConfig: /Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_build_env/bin/pkg-config (found version "0.29.2") 
-- Checking for module 'cblas'
--   No package 'cblas' found
-- Checking for module 'lapack'
--   No package 'lapack' found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of void*
-- Check size of void* - done
-- Found Intel MKL BLAS/LAPACK library
-- Looking for sgesv
-- Looking for sgesv - found
-- Looking for sgesv_
-- Looking for sgesv_ - found
CMake Error at /Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/work/dlib/cmake_utils/use_cpp_11.cmake:74 (target_compile_features):
  target_compile_features no known features for CXX compiler

  "Clang"

  version 4.0.1.
Call Stack (most recent call first):
  /Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/work/dlib/CMakeLists.txt:828 (enable_cpp11_for_target)

-- Building a C++11 test project to see if your compiler supports C++11
-- C++11 activated.
-- Configuring incomplete, errors occurred!
See also "/Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/work/build/CMakeFiles/CMakeOutput.log".
-- Cache values
// Path to a program.
CMAKE_AR:FILEPATH=/usr/bin/ar

// Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel ...
CMAKE_BUILD_TYPE:STRING=Release

// Enable/Disable color output during build.
CMAKE_COLOR_MAKEFILE:BOOL=ON

// CXX compiler
CMAKE_CXX_COMPILER:FILEPATH=/Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_build_env/bin/x86_64-apple-darwin13.4.0-clang++

// LLVM archiver
CMAKE_CXX_COMPILER_AR:FILEPATH=/Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_build_env/bin/llvm-ar

// Generate index for LLVM archive
CMAKE_CXX_COMPILER_RANLIB:FILEPATH=/Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_build_env/bin/llvm-ranlib

// Flags used by the CXX compiler during all build types.
CMAKE_CXX_FLAGS:STRING=-march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0 -I/Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/include -fdebug-prefix-map=${SRC_DIR}=/usr/local/src/conda/${PKG_NAME}-${PKG_VERSION} -fdebug-prefix-map=${PREFIX}=/usr/local/src/conda-prefix

// Flags used by the CXX compiler during DEBUG builds.
CMAKE_CXX_FLAGS_DEBUG:STRING=-g

// Flags used by the CXX compiler during MINSIZEREL builds.
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG

// Flags used by the CXX compiler during RELEASE builds.
CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG

// Flags used by the CXX compiler during RELWITHDEBINFO builds.
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG

// C compiler
CMAKE_C_COMPILER:FILEPATH=/Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_build_env/bin/x86_64-apple-darwin13.4.0-clang

// LLVM archiver
CMAKE_C_COMPILER_AR:FILEPATH=/Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_build_env/bin/llvm-ar

// Generate index for LLVM archive
CMAKE_C_COMPILER_RANLIB:FILEPATH=/Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_build_env/bin/llvm-ranlib

// Flags used by the C compiler during all build types.
CMAKE_C_FLAGS:STRING=-march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -I/Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/include -fdebug-prefix-map=${SRC_DIR}=/usr/local/src/conda/${PKG_NAME}-${PKG_VERSION} -fdebug-prefix-map=${PREFIX}=/usr/local/src/conda-prefix

// Flags used by the C compiler during DEBUG builds.
CMAKE_C_FLAGS_DEBUG:STRING=-g

// Flags used by the C compiler during MINSIZEREL builds.
CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG

// Flags used by the C compiler during RELEASE builds.
CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG

// Flags used by the C compiler during RELWITHDEBINFO builds.
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG

// Flags used by the linker during all build types.
CMAKE_EXE_LINKER_FLAGS:STRING=-Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-rpath,/Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib -L/Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib

// Flags used by the linker during DEBUG builds.
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=

// Flags used by the linker during MINSIZEREL builds.
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=

// Flags used by the linker during RELEASE builds.
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=

// Flags used by the linker during RELWITHDEBINFO builds.
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=

// Enable/Disable output of compile commands during generation.
CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF

// User executables (bin)
CMAKE_INSTALL_BINDIR:PATH=bin

// Read-only architecture-independent data (DATAROOTDIR)
CMAKE_INSTALL_DATADIR:PATH=

// Read-only architecture-independent data root (share)
CMAKE_INSTALL_DATAROOTDIR:PATH=share

// Documentation root (DATAROOTDIR/doc/PROJECT_NAME)
CMAKE_INSTALL_DOCDIR:PATH=

// C header files (include)
CMAKE_INSTALL_INCLUDEDIR:PATH=include

// Info documentation (DATAROOTDIR/info)
CMAKE_INSTALL_INFODIR:PATH=

// Object code libraries (lib)
CMAKE_INSTALL_LIBDIR:PATH=lib

// Program executables (libexec)
CMAKE_INSTALL_LIBEXECDIR:PATH=libexec

// Locale-dependent data (DATAROOTDIR/locale)
CMAKE_INSTALL_LOCALEDIR:PATH=

// Modifiable single-machine data (var)
CMAKE_INSTALL_LOCALSTATEDIR:PATH=var

// Man documentation (DATAROOTDIR/man)
CMAKE_INSTALL_MANDIR:PATH=

// Path to a program.
CMAKE_INSTALL_NAME_TOOL:FILEPATH=/usr/bin/install_name_tool

// C header files for non-gcc (/usr/include)
CMAKE_INSTALL_OLDINCLUDEDIR:PATH=/usr/include

// Install path prefix, prepended onto install directories.
CMAKE_INSTALL_PREFIX:PATH=/usr/local

// Run-time variable data (LOCALSTATEDIR/run)
CMAKE_INSTALL_RUNSTATEDIR:PATH=

// System admin executables (sbin)
CMAKE_INSTALL_SBINDIR:PATH=sbin

// Modifiable architecture-independent data (com)
CMAKE_INSTALL_SHAREDSTATEDIR:PATH=com

// Read-only single-machine data (etc)
CMAKE_INSTALL_SYSCONFDIR:PATH=etc

// Path to a program.
CMAKE_LINKER:FILEPATH=/usr/bin/ld

// Path to a program.
CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make

// Flags used by the linker during the creation of modules during all build types.
CMAKE_MODULE_LINKER_FLAGS:STRING=-Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-rpath,/Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib -L/Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib

// Flags used by the linker during the creation of modules during DEBUG builds.
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=

// Flags used by the linker during the creation of modules during MINSIZEREL builds.
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=

// Flags used by the linker during the creation of modules during RELEASE builds.
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=

// Flags used by the linker during the creation of modules during RELWITHDEBINFO builds.
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=

// Path to a program.
CMAKE_NM:FILEPATH=/usr/bin/nm

// Path to a program.
CMAKE_OBJCOPY:FILEPATH=CMAKE_OBJCOPY-NOTFOUND

// Path to a program.
CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump

// Build architectures for OSX
CMAKE_OSX_ARCHITECTURES:STRING=

// Minimum OS X version to target for deployment (at runtime); newer APIs weak linked. Set to empty string for default value.
CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9

// The product will be built against the headers and libraries located inside the indicated SDK.
CMAKE_OSX_SYSROOT:PATH=/Library/Developer/CommandLineTools/SDKs/MacOSX10.13.sdk

// Path to a program.
CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib

// Flags used by the linker during the creation of shared libraries during all build types.
CMAKE_SHARED_LINKER_FLAGS:STRING=-Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-rpath,/Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib -L/Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib

// Flags used by the linker during the creation of shared libraries during DEBUG builds.
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=

// Flags used by the linker during the creation of shared libraries during MINSIZEREL builds.
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=

// Flags used by the linker during the creation of shared libraries during RELEASE builds.
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=

// Flags used by the linker during the creation of shared libraries during RELWITHDEBINFO builds.
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=

// If set, runtime paths are not added when installing shared libraries, but are added when building.
CMAKE_SKIP_INSTALL_RPATH:BOOL=NO

// If set, runtime paths are not added when using shared libraries.
CMAKE_SKIP_RPATH:BOOL=NO

// Flags used by the linker during the creation of static libraries during all build types.
CMAKE_STATIC_LINKER_FLAGS:STRING=

// Flags used by the linker during the creation of static libraries during DEBUG builds.
CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=

// Flags used by the linker during the creation of static libraries during MINSIZEREL builds.
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=

// Flags used by the linker during the creation of static libraries during RELEASE builds.
CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=

// Flags used by the linker during the creation of static libraries during RELWITHDEBINFO builds.
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=

// Path to a program.
CMAKE_STRIP:FILEPATH=/usr/bin/strip

// If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make.  This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo.
CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE

// Enable this if you want to turn on the DLIB_ASSERT macro
DLIB_ENABLE_ASSERTS:BOOL=OFF

// Enable this if you want to turn on the DLIB_STACK_TRACE macros
DLIB_ENABLE_STACK_TRACE:BOOL=OFF

// Disable this if you don't want to link against libgif
DLIB_GIF_SUPPORT:BOOL=0

// Enable this if you don't want to compile any non-ISO C++ code (i.e. you don't use any of the API Wrappers)
DLIB_ISO_CPP_ONLY:BOOL=OFF

// Disable this if you don't want to link against libjpeg
DLIB_JPEG_SUPPORT:BOOL=1

// Disable this if you don't want to link against sqlite3
DLIB_LINK_WITH_SQLITE3:BOOL=1

// Enable this if you don't want to compile any of the dlib GUI code
DLIB_NO_GUI_SUPPORT:BOOL=1

// Disable this if you don't want to link against libpng
DLIB_PNG_SUPPORT:BOOL=1

// Disable this if you don't want to use a BLAS library
DLIB_USE_BLAS:BOOL=1

// Disable this if you don't want to use NVIDIA CUDA
DLIB_USE_CUDA:BOOL=0

// Disable this if you don't want to use a LAPACK library
DLIB_USE_LAPACK:BOOL=1

// Disable this is you don't want to use the MKL DFTI FFT implementation
DLIB_USE_MKL_FFT:BOOL=ON

// Enable this if you have MKL installed and want to use the sequential version instead of the multi-core version.
DLIB_USE_MKL_SEQUENTIAL:BOOL=OFF

// Path to a file.
JPEG_INCLUDE_DIR:PATH=/Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/include

// pkg-config executable
PKG_CONFIG_EXECUTABLE:FILEPATH=/Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_build_env/bin/pkg-config

// Path to a file.
PNG_PNG_INCLUDE_DIR:PATH=/Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/include

// C++ standard flag, e.g. -std=c++11, -std=c++14, /std:c++14.  Defaults to C++14 mode.
PYBIND11_CPP_STANDARD:STRING=-std=c++14

// Install pybind11 header files?
PYBIND11_INSTALL:BOOL=OFF

// Python version to use for compiling modules
PYBIND11_PYTHON_VERSION:STRING=

// Build pybind11 test suite?
PYBIND11_TEST:BOOL=OFF

// Path to a program.
PYTHON_EXECUTABLE:FILEPATH=/Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/bin/python

// Path to a library.
PYTHON_LIBRARY:FILEPATH=/Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/libpython3.6m.dylib

// Compile your program with AVX instructions
USE_AVX_INSTRUCTIONS:BOOL=0

// Install pybind11 headers in Python include directory instead of default installation prefix
USE_PYTHON_INCLUDE_DIR:BOOL=OFF

// Compile your program with SSE2 instructions
USE_SSE2_INSTRUCTIONS:BOOL=1

// Compile your program with SSE4 instructions
USE_SSE4_INSTRUCTIONS:BOOL=1

// Path to a file.
ZLIB_INCLUDE_DIR:PATH=/Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/include

// Path to a library.
ZLIB_LIBRARY_DEBUG:FILEPATH=ZLIB_LIBRARY_DEBUG-NOTFOUND

// Path to a library.
ZLIB_LIBRARY_RELEASE:FILEPATH=/Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/libz.dylib

// Path to a file.
mkl_include_dir:PATH=/Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/include

// Path to a library.
mkl_intel:FILEPATH=/Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/libmkl_intel_lp64.dylib

// Path to a library.
mkl_rt:FILEPATH=/Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/libmkl_rt.dylib

// Path to a library.
openmp_libraries:FILEPATH=/Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/libiomp5.dylib

// Path to a library.
sqlite:FILEPATH=/Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/libsqlite3.dylib

// Path to a file.
sqlite_path:PATH=/Users/gitlab/builds/b6d3167a/0/bob/bob.conda/miniconda/conda-bld/dlib_1540298650759/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/include

I am able to compile dlib 19.7 using the same compilers but I have tested 19.8, 19.10, and 19.16 and they all fail with the same error. Looks like the error is happening in dlib/cmake_utils/use_cpp_11.cmake and there are 3 commits changing that file since 19.7: https://github.com/davisking/dlib/commit/3b2d73db68d33b8d61f4b7906cfb52d90e353496#diff-d593bfc2d0dd0b78325fba99f82951fa https://github.com/davisking/dlib/commit/f18f753c0435b8c3f09b0e639ee8e015c7771c54#diff-d593bfc2d0dd0b78325fba99f82951fa and https://github.com/davisking/dlib/commit/e26e09d3fa105ab438e7f4847e1f4111cd65fe7d#diff-d593bfc2d0dd0b78325fba99f82951fa

Here is also the CMakeOutput.log file. The full build log is here: https://gitlab.idiap.ch/bob/bob.conda/-/jobs/151058

Unfortunately, my knowledge of CMake is very limited so any help is appreciated.

To reproduce this issue using conda you can run the following steps: Install miniconda on a Mac machine: https://conda.io/miniconda.html

Then:

$ conda activate base # make sure this command runs without an error
$ conda install conda-build
$ git clone https://gitlab.idiap.ch/bob/bob.admin.git
$ git clone https://gitlab.idiap.ch/bob/bob.conda.git
$ cd bob.conda
$ git checkout dlib
$ ../bob.admin/conda/conda-build.sh conda/dlib
davisking commented 5 years ago

You have to use a compiler that isn't broken. Anaconda has a bad habit of packaging open source software into their distribution and breaking it. Looks like they broke clang. You should use clang from an official source.

183amir commented 5 years ago

To make sure the binaries are ABI compatible within my environment, I have to use these compilers. I have found this thread to be relevant: https://cmake.org/pipermail/cmake/2016-December/064733.html looks like the problem arises with using old policies in cmake.