Ruslan Baratov edited this page Mar 10, 2018 · 10 revisions
What happens
  • CMake fatal error with one of the messages:
  • [hunter ** FATAL ERROR **] Configure step failed (dir: ...)
  • [hunter ** FATAL ERROR **] Build step failed (dir: ...)
  • Build of some external package failed for some reason
What to do
Fixable errors
  • "Path too long" error with message:
The specified path, file name, or both are too long.  The fully qualified
file name must be less than 260 characters, and the directory name must be
less than 248 characters.

can be fixed by setting HUNTER_ROOT environment variable to some short path, like C:\_hunter. Alternatively you can set HUNTER_BINARY_DIR environment variable. In this case all installed packages will be kept in HUNTER_ROOT but all builds will be triggered in HUNTER_BINARY_DIR. Note that if several Hunter-ID will be send to HUNTER_BINARY_DIR they will block each other and will be build sequentially (builds in HUNTER_ROOT lock different directories so different Hunter-ID instances work in parallel). Note that the problem is about native build tool (like Visual Studio) and not in CMake. CMake already using extended-length path \\?\C:\ format (see ConvertToWindowsExtendedPath).

Mac OS X
  • Runtime application error:
Unknown class * in Interface Builder file at path *.nib

Check you have next flags linked to your target:

target_link_libraries(... "-all_load" "-ObjC")
Reproduce and diagnose package building errors manually

WARNING This may not work always since Hunter can load extra environment variables in internal scripts.

  • Once you enabled HUNTER_STATUS_DEBUG, read the error output in order to find how to build the package manually and to reproduce the error. Read the output of cmake near the error:
[hunter ** FATAL ERROR **] Build step failed (dir: ~/.hunter/_Base/21f5129/d74d0a3/11f31d2/Build/PocoCpp
[hunter ** FATAL ERROR **] [Directory:~/.hunter/_Base/Download/Hunter/0.19.90/21f5129/Unpacked/cmake/projects/PocoCpp]

------------------------------ WIKI -------------------------------

CMake Error at ~/.hunter/_Base/Download/Hunter/0.19.90/21f5129/Unpacked/cmake/modules/hunter_wiki.cmake:12 (message):
Call Stack (most recent call first):
  ~/.hunter/_Base/Download/Hunter/0.19.90/21f5129/Unpacked/cmake/modules/hunter_fatal_error.cmake:20 (hunter_wiki)

Carefuly note the directory that is given near the message "build step failed", and build it, like shown below

# this is the directory given by the error message
cd ~/.hunter/_Base/21f5129/d74d0a3/11f31d2/Build/PocoCpp
cmake --build Build/

Then, you can diagnose more easily the cause of the error, using you standard build tools.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.