depthai-core icon indicating copy to clipboard operation
depthai-core copied to clipboard

make: *** No targets specified and no makefile found. Stop.

Open sandip1604 opened this issue 2 years ago • 6 comments

System: Ubuntu 18.04 LTS

I am trying to build depthai-core on my system and upon running CMake --build build , I am getting the following message:

make: *** No targets specified and no makefile found. Stop.

My output of the cmake -H. -Bbuild is attached below

-- The CXX compiler identification is GNU 7.5.0
-- The C compiler identification is GNU 7.5.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Setting build type to 'Debug' as none was specified.
-- Found Git: /usr/bin/git (found version "2.17.1") 
-- [hunter] Calculating Toolchain-SHA1
-- [hunter] Calculating Config-SHA1
-- [hunter] HUNTER_ROOT: /home/sandip/.hunter
-- [hunter] [ Hunter-ID: 062a19a | Toolchain-ID: 8671a89 | Config-ID: 2127330 ]
-- [hunter] NLOHMANN_JSON_ROOT: /home/sandip/.hunter/_Base/062a19a/8671a89/2127330/Install (ver.: 3.9.1)
-- [hunter] XLINK_ROOT: /home/sandip/.hunter/_Base/062a19a/8671a89/2127330/Install (ver.: luxonis-2021.3-develop)
-- [hunter] BZIP2_ROOT: /home/sandip/.hunter/_Base/062a19a/8671a89/2127330/Install (ver.: 1.0.8-p0)
-- [hunter] FP16_ROOT: /home/sandip/.hunter/_Base/062a19a/8671a89/2127330/Install (ver.: luxonis-0.0.0)
-- [hunter] LIBARCHIVE-LUXONIS_ROOT: /home/sandip/.hunter/_Base/062a19a/8671a89/2127330/Install (ver.: 3.4.2-p2)
-- [hunter] SPDLOG_ROOT: /home/sandip/.hunter/_Base/062a19a/8671a89/2127330/Install (ver.: 1.8.2)
-- [hunter] ZLIB_ROOT: /home/sandip/.hunter/_Base/062a19a/8671a89/2127330/Install (ver.: 1.2.11-p1)
-- [hunter] BACKWARD_ROOT: /home/sandip/.hunter/_Base/062a19a/8671a89/2127330/Install (ver.: 1.6)
CMake Error at /home/sandip/.hunter/_Base/062a19a/8671a89/2127330/Install/lib/cmake/ZLIB/ZLIBConfig.cmake:36 (add_library):
  add_library cannot create ALIAS target "ZLIB::ZLIB" because target
  "ZLIB::zlib" is IMPORTED.
Call Stack (most recent call first):
  cmake/depthaiDependencies.cmake:34 (find_package)
  CMakeLists.txt:118 (include)


-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- 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  
-- Could NOT find libdw (missing: LIBDW_LIBRARY LIBDW_INCLUDE_DIR) 
-- Could NOT find libbfd (missing: LIBBFD_LIBRARY LIBBFD_INCLUDE_DIR) 
-- Could NOT find libdwarf (missing: LIBDWARF_LIBRARY LIBDWARF_INCLUDE_DIR LIBELF_LIBRARY LIBELF_INCLUDE_DIR) 
-- Found Backward: /home/sandip/.hunter/_Base/062a19a/8671a89/2127330/Install/lib/backward  
-- Found nlohmann_json: /home/sandip/.hunter/_Base/062a19a/8671a89/2127330/Install/lib/cmake/nlohmann_json/nlohmann_jsonConfig.cmake (found version "3.9.1") 
-- Performing Test FLAG_-Wall
-- Performing Test FLAG_-Wall - Success
-- Performing Test FLAG_-Wextra
-- Performing Test FLAG_-Wextra - Success
-- Performing Test FLAG_-Woverloaded-virtual
-- Performing Test FLAG_-Woverloaded-virtual - Success
-- Performing Test FLAG_-Wformat=2
-- Performing Test FLAG_-Wformat=2 - Success
-- Performing Test FLAG_-Wmisleading-indentation
-- Performing Test FLAG_-Wmisleading-indentation - Success
-- Performing Test FLAG_-Wduplicated-cond
-- Performing Test FLAG_-Wduplicated-cond - Success
-- Performing Test FLAG_-Wduplicated-branches
-- Performing Test FLAG_-Wduplicated-branches - Success
-- Performing Test FLAG_-Wnull-dereference
-- Performing Test FLAG_-Wnull-dereference - Success
-- Performing Test FLAG_-Wdouble-promotion
-- Performing Test FLAG_-Wdouble-promotion - Success
-- Performing Test FLAG_-Wsign-compare
-- Performing Test FLAG_-Wsign-compare - Success
-- Performing Test FLAG_-Wtype-limits
-- Performing Test FLAG_-Wtype-limits - Success
-- Performing Test FLAG_-Werror=self-assign-field
-- Performing Test FLAG_-Werror=self-assign-field - Failed
-- Performing Test FLAG_-Werror=unused-lambda-capture
-- Performing Test FLAG_-Werror=unused-lambda-capture - Failed
-- Performing Test FLAG_-Werror=return-type
-- Performing Test FLAG_-Werror=return-type - Success
-- Performing Test FLAG_-Werror=non-virtual-dtor
-- Performing Test FLAG_-Werror=non-virtual-dtor - Success
-- Performing Test FLAG_-Werror=sign-compare
-- Performing Test FLAG_-Werror=sign-compare - Success
-- Performing Test FLAG_-Werror=reorder
-- Performing Test FLAG_-Werror=reorder - Success
-- Performing Test FLAG_-Werror=switch-enum
-- Performing Test FLAG_-Werror=switch-enum - Success
-- Compiling depthai-core resources in PATCH_ONLY mode
-- Downloading Depthai device side binaries from server...
-- Downloading depthai and patch
-- commit: 99f9c588547e828663bb42e89f816d184d8dcff5
-- depthai-shared between device and host MATCH!. (device: 99f9c588547e828663bb42e89f816d184d8dcff5, host: 99f9c588547e828663bb42e89f816d184d8dcff5
-- Downloading and checking depthai-device-fwp.tar.xz
-- [download 0% complete]
-- [download 1% complete]
-- [download 2% complete]
-- [download 3% complete]
-- [download 4% complete]
-- [download 5% complete]
-- [download 6% complete]
-- [download 7% complete]
-- [download 8% complete]
-- [download 9% complete]
-- [download 10% complete]
-- [download 11% complete]
-- [download 12% complete]
-- [download 13% complete]
-- [download 14% complete]
-- [download 15% complete]
-- [download 16% complete]
-- [download 17% complete]
-- [download 18% complete]
-- [download 19% complete]
-- [download 20% complete]
-- [download 21% complete]
-- [download 22% complete]
-- [download 23% complete]
-- [download 24% complete]
-- [download 25% complete]
-- [download 26% complete]
-- [download 27% complete]
-- [download 28% complete]
-- [download 29% complete]
-- [download 30% complete]
-- [download 31% complete]
-- [download 32% complete]
-- [download 33% complete]
-- [download 34% complete]
-- [download 35% complete]
-- [download 36% complete]
-- [download 37% complete]
-- [download 38% complete]
-- [download 39% complete]
-- [download 40% complete]
-- [download 41% complete]
-- [download 42% complete]
-- [download 43% complete]
-- [download 44% complete]
-- [download 45% complete]
-- [download 46% complete]
-- [download 47% complete]
-- [download 48% complete]
-- [download 49% complete]
-- [download 50% complete]
-- [download 51% complete]
-- [download 52% complete]
-- [download 53% complete]
-- [download 54% complete]
-- [download 55% complete]
-- [download 56% complete]
-- [download 57% complete]
-- [download 58% complete]
-- [download 59% complete]
-- [download 60% complete]
-- [download 61% complete]
-- [download 62% complete]
-- [download 63% complete]
-- [download 64% complete]
-- [download 65% complete]
-- [download 66% complete]
-- [download 67% complete]
-- [download 68% complete]
-- [download 69% complete]
-- [download 70% complete]
-- [download 71% complete]
-- [download 72% complete]
-- [download 73% complete]
-- [download 74% complete]
-- [download 75% complete]
-- [download 76% complete]
-- [download 77% complete]
-- [download 78% complete]
-- [download 79% complete]
-- [download 80% complete]
-- [download 81% complete]
-- [download 82% complete]
-- [download 83% complete]
-- [download 84% complete]
-- [download 85% complete]
-- [download 86% complete]
-- [download 87% complete]
-- [download 88% complete]
-- [download 89% complete]
-- [download 90% complete]
-- [download 91% complete]
-- [download 92% complete]
-- [download 93% complete]
-- [download 94% complete]
-- [download 95% complete]
-- [download 96% complete]
-- [download 97% complete]
-- [download 98% complete]
-- [download 99% complete]
-- [download 100% complete]
-- Downloading depthai bootloader
-- folder: /home/sandip/depthai-core/build/resources
-- maturity: release
-- commit_version_arg: 0.0.15
-- bootloader shared commit: 126f344155346836a6a2d67b0993c161b6b48729
-- depthai-bootloader-shared between device and host MATCH!. (device: 126f344155346836a6a2d67b0993c161b6b48729, host: 126f344155346836a6a2d67b0993c161b6b48729
-- Downloading and checking depthai-bootloader-fwp.tar.xz
-- [download 0% complete]
-- [download 1% complete]
-- [download 2% complete]
-- [download 3% complete]
-- [download 4% complete]
-- [download 5% complete]
-- [download 6% complete]
-- [download 7% complete]
-- [download 8% complete]
-- [download 9% complete]
-- [download 10% complete]
-- [download 11% complete]
-- [download 12% complete]
-- [download 13% complete]
-- [download 14% complete]
-- [download 15% complete]
-- [download 16% complete]
-- [download 17% complete]
-- [download 18% complete]
-- [download 19% complete]
-- [download 20% complete]
-- [download 22% complete]
-- [download 23% complete]
-- [download 25% complete]
-- [download 26% complete]
-- [download 28% complete]
-- [download 29% complete]
-- [download 31% complete]
-- [download 32% complete]
-- [download 34% complete]
-- [download 35% complete]
-- [download 37% complete]
-- [download 38% complete]
-- [download 40% complete]
-- [download 41% complete]
-- [download 42% complete]
-- [download 44% complete]
-- [download 45% complete]
-- [download 47% complete]
-- [download 48% complete]
-- [download 50% complete]
-- [download 51% complete]
-- [download 53% complete]
-- [download 55% complete]
-- [download 56% complete]
-- [download 58% complete]
-- [download 59% complete]
-- [download 61% complete]
-- [download 62% complete]
-- [download 64% complete]
-- [download 65% complete]
-- [download 67% complete]
-- [download 68% complete]
-- [download 70% complete]
-- [download 71% complete]
-- [download 73% complete]
-- [download 75% complete]
-- [download 76% complete]
-- [download 78% complete]
-- [download 79% complete]
-- [download 81% complete]
-- [download 82% complete]
-- [download 84% complete]
-- [download 85% complete]
-- [download 87% complete]
-- [download 88% complete]
-- [download 90% complete]
-- [download 91% complete]
-- [download 93% complete]
-- [download 95% complete]
-- [download 96% complete]
-- [download 98% complete]
-- [download 99% complete]
-- [download 100% complete]
-- LIST OF RESOURCE COMPILED FILES: /home/sandip/depthai-core/build/resources/depthai-device-fwp-2021725697c9b570383b0597951a9d7b162e6182.tar.xz;/home/sandip/depthai-core/build/resources/depthai-bootloader-fwp-0.0.15.tar.xz
-- Check for working incbin assembly directive
-- Check for working incbin assembly directive - works
-- ClangFormat: clang-format not found! Target 'clangformat' not available...
-- OpenCV or required libraries (opencv_core;opencv_imgproc) not found. OpenCV Support disabled
-- BUILD_DATETIME: 2021-10-23 03:19:31 +0000, BUILD_COMMIT: d520c26b9f631c5476f12259c5f7a3f0f25dd0b0, BUILD_COMMIT_DATETIME: 2021-10-21 12:54:34 +0200
-- Configuring incomplete, errors occurred!
See also "/home/sandip/depthai-core/build/CMakeFiles/CMakeOutput.log".
See also "/home/sandip/depthai-core/build/CMakeFiles/CMakeError.log".

sandip1604 avatar Oct 23 '21 03:10 sandip1604

Here is my CMakeError.lo CMakeError.log g

sandip1604 avatar Oct 23 '21 03:10 sandip1604

Hi @sandip1604

Seems like ZLib dependency uses a CMake feature which is available in version 3.11 or later. Ubuntu 18.04 comes with 3.10.2 by default

Not sure if there is any updates to be made from ZLib / Hunter (package manager) to be made to make this more backward compatible. For quickest workaround, I'd suggest updating CMake on your system, using a good walkthrough (installing to /usr/local/ and updating paths seems to do it). Note, uninstalling CMake on the system might want to uninstall some additional things as well so preferably don't uninstall it

themarpe avatar Oct 24 '21 19:10 themarpe

Added a minimal version CMake test into CI, and resolved the Ubuntu 18.04 issue as well https://github.com/luxonis/depthai-core/pull/237

themarpe avatar Oct 24 '21 19:10 themarpe

@sandip1604 Resolved and merged into latest develop

themarpe avatar Oct 25 '21 11:10 themarpe

@themarpe I am using the cmake version higher than 3.11 now but it still throws the same error !. I think I read somewhere in the docs that hunter requires 3.4 and above. not sure but could be a conflict.

sandip1604 avatar Oct 25 '21 19:10 sandip1604

@sandip1604 Please double check that:

  1. Your new CMake is actually being used (maybe use full path instead of the command name only), and check cmake --version
  2. Try compiling latest develop branch which has this issue resolved - should also work with older CMake.
  3. Try removing hunter cache: https://github.com/luxonis/depthai-core#hunter (rm -r ~/.hunter)

The same issue shouldn't happen with newer CMake versions, so most likely some environment configuration issue

themarpe avatar Oct 26 '21 14:10 themarpe