Closed personball closed 10 months ago
Or how to build depthai-unity without the source code of depthai-core, just reference the Releases of depthai-core ?
Hi @personball
Just tried with fresh clone following these steps and I was able to compile without any issue. Could you give a try?
git clone https://github.com/luxonis/depthai-unity.git cd depthai-unity/ git submodule update --init --recursive cmake -S. -BbuildW1 -D'BUILD_SHARED_LIBS=ON' cmake --build buildW1 --config Release --parallel 12
it was building with (-- Building for: Visual Studio 17 2022)
Hi @gespona , Thank you for your reply.
When I follow your instructions to run cmake -S. -BbuildW1 -D'BUILD_SHARED_LIBS=ON'
, I got this:
PS personball> cmake -S. -BbuildW1 -D'BUILD_SHARED_LIBS=ON'
-- Building for: Visual Studio 17 2022
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
CMake Deprecation Warning at depthai-core/CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- Generating new toolchain...
-- Using toolchain file: C:/Users/perso/source/repos/depthai-unity/buildW1/depthai-core/generated/toolchain.cmake
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.28/Modules/ExternalProject.cmake:3198 (message):
The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is
not set. The policy's OLD behavior will be used. When using a URL
download, the timestamps of extracted files should preferably be that of
the time of extraction, otherwise code that depends on the extracted
contents might not be rebuilt if the URL changes. The OLD behavior
preserves the timestamps from the archive instead, but this is usually not
what you want. Update your project to the NEW behavior or specify the
DOWNLOAD_EXTRACT_TIMESTAMP option with a value of true to avoid this
robustness issue.
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.28/Modules/ExternalProject.cmake:4422 (_ep_add_download_command)
CMakeLists.txt:4 (ExternalProject_Add)
This warning is for project developers. Use -Wno-dev to suppress it.
-- [hunter] Initializing Hunter workspace (cb0ea1f74f4a2c49a807de34885743495fccccbe)
-- [hunter] https://github.com/cpp-pm/hunter/archive/v0.23.322.tar.gz
-- [hunter] -> C:/.hunter/_Base/Download/Hunter/0.23.322/cb0ea1f
[hunter ** INTERNAL **] Build project failed
[hunter ** INTERNAL **] [Directory:C:/Users/perso/source/repos/depthai-unity/depthai-core]
------------------------------ ERROR ------------------------------
https://docs.hunter.sh/en/latest/reference/errors/error.internal.html
-------------------------------------------------------------------
CMake Error at depthai-core/cmake/HunterGate.cmake:87 (message):
Call Stack (most recent call first):
depthai-core/cmake/HunterGate.cmake:97 (hunter_gate_error_page)
depthai-core/cmake/HunterGate.cmake:345 (hunter_gate_internal_error)
depthai-core/cmake/HunterGate.cmake:509 (hunter_gate_download)
depthai-core/CMakeLists.txt:34 (HunterGate)
-- Configuring incomplete, errors occurred!
And I try it with hunter trace options -DHUNTER_STATUS_DEBUG=ON -DHUNTER_TLS_VERIFY=OFF
, Then:
-- Configuring done (0.6s)
-- Generating done (0.0s)
-- Build files have been written to: C:/.hunter/_Base/Download/Hunter/0.23.322/cb0ea1f/Build
-- [hunter] Initializing Hunter workspace (cb0ea1f74f4a2c49a807de34885743495fccccbe)
-- [hunter] https://github.com/cpp-pm/hunter/archive/v0.23.322.tar.gz
-- [hunter] -> C:/.hunter/_Base/Download/Hunter/0.23.322/cb0ea1f
适用于 .NET Framework MSBuild 版本 17.8.3+195e7f5a3
1>Checking Build System
Creating directories for 'Hunter'
Building Custom Rule C:/.hunter/_Base/Download/Hunter/0.23.322/cb0ea1f/CMakeLists.txt
Performing download step (download, verify and extract) for 'Hunter'
-- verifying file...
file='C:/.hunter/_Base/Download/Hunter/0.23.322/cb0ea1f/v0.23.322.tar.gz'
-- SHA1 hash of
C:/.hunter/_Base/Download/Hunter/0.23.322/cb0ea1f/v0.23.322.tar.gz
does not match expected value
expected: 'cb0ea1f74f4a2c49a807de34885743495fccccbe'
actual: 'da39a3ee5e6b4b0d3255bfef95601890afd80709'
-- File already exists but hash mismatch. Removing...
-- Downloading...
dst='C:/.hunter/_Base/Download/Hunter/0.23.322/cb0ea1f/v0.23.322.tar.gz'
timeout='none'
inactivity timeout='none'
-- Using src='https://github.com/cpp-pm/hunter/archive/v0.23.322.tar.gz'
-- Retrying...
-- Using src='https://github.com/cpp-pm/hunter/archive/v0.23.322.tar.gz'
-- Retry after 5 seconds (attempt #2) ...
-- Using src='https://github.com/cpp-pm/hunter/archive/v0.23.322.tar.gz'
-- Retry after 5 seconds (attempt #3) ...
-- Using src='https://github.com/cpp-pm/hunter/archive/v0.23.322.tar.gz'
-- Retry after 15 seconds (attempt #4) ...
-- Using src='https://github.com/cpp-pm/hunter/archive/v0.23.322.tar.gz'
Append: After I update the SHA1 hash in HunterGate(...), and setup the http proxy(for jump over GFW):
...
No update step for 'Hunter'
No patch step for 'Hunter'
No configure step for 'Hunter'
No build step for 'Hunter'
No install step for 'Hunter'
Completed 'Hunter'
Building Custom Rule C:/.hunter/_Base/Download/Hunter/0.23.322/da39a3e/CMakeLists.txt
-- [hunter *** DEBUG *** 2024-01-22T00:37:56] Finished
[hunter ** FATAL ERROR **] Master file not found:
[hunter ** FATAL ERROR **] C:/.hunter/_Base/Download/Hunter/0.23.322/da39a3e/Unpacked/cmake/Hunter
[hunter ** FATAL ERROR **] try to update Hunter/HunterGate
[hunter ** FATAL ERROR **] [Directory:C:/Users/perso/source/repos/depthai-unity/depthai-core]
------------------------------ ERROR ------------------------------
https://docs.hunter.sh/en/latest/reference/errors/error.incorrect.input.data.html
-------------------------------------------------------------------
CMake Error at depthai-core/cmake/HunterGate.cmake:87 (message):
Call Stack (most recent call first):
depthai-core/cmake/HunterGate.cmake:111 (hunter_gate_error_page)
depthai-core/cmake/HunterGate.cmake:115 (hunter_gate_fatal_error)
depthai-core/cmake/HunterGate.cmake:529 (hunter_gate_user_error)
depthai-core/CMakeLists.txt:34 (HunterGate)
-- Configuring incomplete, errors occurred!
It seems Hunter not work well.
yes seems an issue with hunter compiling depthai-core, but I'm not able to reproduce on my side.
did you tried to compile depthai-core alone ? https://github.com/luxonis/depthai-core
I see few issues here related to hunter: https://github.com/luxonis/depthai-core/issues/953 https://github.com/luxonis/depthai-core/issues/876
there is recommendation to delete hunter cache directory: del C:/.hunter maybe worth to try?
yes seems an issue with hunter compiling depthai-core, but I'm not able to reproduce on my side.
did you tried to compile depthai-core alone ? https://github.com/luxonis/depthai-core
I see few issues here related to hunter: luxonis/depthai-core#953 luxonis/depthai-core#876
there is recommendation to delete hunter cache directory: del C:/.hunter maybe worth to try?
Hi @gespona
I delete C:/.hunter each time I run cmake.
Maybe it is some problem with network.
I have success build my demo project with released depthai-core dlls, And I use vcpkg to resolve dependencies.
Please Consider release all DepthAI packages through vcpkg, It is supported by microsoft and has much better experience for developer.
Hi, @gespona
Same error occured for me.
Below link returns 404: https://raw.githubusercontent.com/cpp-pm/hunter-cache/master/eb87dbf/nlohmann_json/3.9.1/f8a20a7/151cbba/4830b34/da39a3e/basic-deps.DONE.
Hi @lighterhy, deleting your C:/Users/<USER>/.hunter/
seems to solve the issue on the hunter side.
Could you see if that works for you? If not, maybe it's best to open a new issue, since this one is closed.
build Fail
reproduce:
output
from first line, I see nlohmann_json 3.9.1 is not available in this Hunter Gate:
if I Update the version of nlohmann_json in depthai-core\cmake\Hunter\config.cmake with
build again, get this:
change any version for nlohmann_json will not Fix This.
Please Help me.