Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dlib master & 19.19 and later - build failed on MacOS/clang 10/cmake 3.17.1 #2061

Closed
maxoodf opened this issue Apr 15, 2020 · 8 comments
Closed
Labels

Comments

@maxoodf
Copy link

maxoodf commented Apr 15, 2020

$ cmake -DCMAKE_BUILD_TYPE=Release ../
-- The C compiler identification is Clang 10.0.0
-- The CXX compiler identification is Clang 10.0.0
-- Check for working C compiler: /usr/local/opt/llvm/bin/clang
-- Check for working C compiler: /usr/local/opt/llvm/bin/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: /usr/local/opt/llvm/bin/clang++
-- Check for working CXX compiler: /usr/local/opt/llvm/bin/clang++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using CMake version: 3.17.1
-- Compiling dlib version: 19.19.99
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
 *****************************************************************************
 *** DLIB GUI SUPPORT DISABLED BECAUSE X11 DEVELOPMENT LIBRARIES NOT FOUND ***
 *** Make sure XQuartz is installed if you want GUI support.               ***
 *** You can download XQuartz from: https://www.xquartz.org/               ***
 *****************************************************************************
-- Found system copy of libpng: /usr/local/lib/libpng.dylib;/usr/lib/libz.dylib
-- Found system copy of libjpeg: /usr/local/lib/libjpeg.dylib
-- Searching for BLAS and LAPACK
-- Searching for BLAS and LAPACK
-- Found PkgConfig: /usr/local/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 LAPACK library
-- Found CBLAS library
-- Looking for cblas_ddot
-- Looking for cblas_ddot - found
-- Looking for sgesv
-- Looking for sgesv - found
-- Looking for sgesv_
-- Looking for sgesv_ - found
CUDA_TOOLKIT_ROOT_DIR not found or specified
-- Could NOT find CUDA (missing: CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY) (Required is at least version "7.5")
-- DID NOT FIND CUDA
-- Disabling CUDA support for dlib.  DLIB WILL NOT USE CUDA
CMake Error at dlib/cmake_utils/use_cpp_11.cmake:74 (target_compile_features):
  target_compile_features no known features for CXX compiler

  "Clang"

  version 10.0.0.
Call Stack (most recent call first):
  dlib/CMakeLists.txt:855 (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/max/Documents/devel/libs/dlib/build-release/CMakeFiles/CMakeOutput.log".
@maxoodf maxoodf changed the title Dlib master & 19.19 - build failed on MacOS/clang 10 Dlib master & 19.19 and later - build failed on MacOS/clang 10/cmake 3.17.1 Apr 15, 2020
@davisking
Copy link
Owner

Does doing what #2009 suggests fix it?

@maxoodf
Copy link
Author

maxoodf commented Apr 17, 2020

Unfortunately not.

$ head -20 ../dlib/CMakeLists.txt 
#
# This is a CMake makefile.  You can find the cmake utility and
# information about it at http://www.cmake.org
#


cmake_minimum_required(VERSION 2.8.12)

if(POLICY CMP0025)
  cmake_policy(SET CMP0025 NEW)
endif()
if(POLICY CMP0048)
   cmake_policy(SET CMP0048 NEW)
endif()
if(POLICY CMP0077)
   cmake_policy(SET CMP0077 NEW)
endif()

project(dlib)
$ cmake -DCMAKE_BUILD_TYPE=Release ../
-- The C compiler identification is Clang 10.0.0
-- The CXX compiler identification is Clang 10.0.0
-- Check for working C compiler: /usr/local/opt/llvm/bin/clang
-- Check for working C compiler: /usr/local/opt/llvm/bin/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: /usr/local/opt/llvm/bin/clang++
-- Check for working CXX compiler: /usr/local/opt/llvm/bin/clang++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using CMake version: 3.17.1
-- Compiling dlib version: 19.19.0
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
 *****************************************************************************
 *** DLIB GUI SUPPORT DISABLED BECAUSE X11 DEVELOPMENT LIBRARIES NOT FOUND ***
 *** Make sure XQuartz is installed if you want GUI support.               ***
 *** You can download XQuartz from: https://www.xquartz.org/               ***
 *****************************************************************************
-- Found system copy of libpng: /usr/local/lib/libpng.dylib;/usr/lib/libz.dylib
-- Found system copy of libjpeg: /usr/local/lib/libjpeg.dylib
-- Searching for BLAS and LAPACK
-- Searching for BLAS and LAPACK
-- Found PkgConfig: /usr/local/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 LAPACK library
-- Found CBLAS library
-- Looking for cblas_ddot
-- Looking for cblas_ddot - found
-- Looking for sgesv
-- Looking for sgesv - found
-- Looking for sgesv_
-- Looking for sgesv_ - found
CUDA_TOOLKIT_ROOT_DIR not found or specified
-- Could NOT find CUDA (missing: CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY) (Required is at least version "7.5")
-- DID NOT FIND CUDA
-- Disabling CUDA support for dlib.  DLIB WILL NOT USE CUDA
CMake Error at dlib/cmake_utils/use_cpp_11.cmake:74 (target_compile_features):
  target_compile_features no known features for CXX compiler

  "Clang"

  version 10.0.0.
Call Stack (most recent call first):
  dlib/CMakeLists.txt:861 (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/max/Documents/devel/libs/1/dlib/build-release/CMakeFiles/CMakeOutput.log".

@davisking
Copy link
Owner

¯_(ツ)_/¯ Seems like a bug in cmake or something. I don't have a way to reproduce this, so you will need to figure out a workaround. And post a PR when you figure it out :)

@maxoodf
Copy link
Author

maxoodf commented Apr 19, 2020

Yes, it seems like a bug in Cmake. My workaround is quite simple but it's not a solution - comment out lines 74-85 of dlib/cmake_utils/use_cpp_11.cmake

@davisking
Copy link
Owner

Huh. It seems like there should be a better way. It would be a bit surprising if target_compile_features was just totally broken.

@dlib-issue-bot
Copy link
Collaborator

Warning: this issue has been inactive for 35 days and will be automatically closed on 2020-06-06 if there is no further activity.

If you are waiting for a response but haven't received one it's possible your question is somehow inappropriate. E.g. it is off topic, you didn't follow the issue submission instructions, or your question is easily answerable by reading the FAQ, dlib's official compilation instructions, dlib's API documentation, or a Google search.

@dlib-issue-bot
Copy link
Collaborator

Warning: this issue has been inactive for 43 days and will be automatically closed on 2020-06-06 if there is no further activity.

If you are waiting for a response but haven't received one it's possible your question is somehow inappropriate. E.g. it is off topic, you didn't follow the issue submission instructions, or your question is easily answerable by reading the FAQ, dlib's official compilation instructions, dlib's API documentation, or a Google search.

@dlib-issue-bot
Copy link
Collaborator

Notice: this issue has been closed because it has been inactive for 45 days. You may reopen this issue if it has been closed in error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants