nasa-jpl / fastcat

C++ EtherCAT Device Command & Control Library
Other
42 stars 11 forks source link

Error using FetchContent #103

Closed mcevoyandy closed 1 year ago

mcevoyandy commented 1 year ago

Instead of compiling from source, if I use the suggested

include(FetchContent)
FetchContent_Declare(fastcat
    GIT_REPOSITORY git@github.com:nasa-jpl/fastcat.git
    GIT_TAG v0.4.3
    )
FetchContent_MakeAvailable(fastcat)

I get the following error from cmake:

-- The C compiler identification is GNU 11.3.0
-- The CXX compiler identification is GNU 11.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found YamlCpp: /usr/include  
-- Found YAMLCPP
-- YAMLCPP_INCLUDE_DIR = /usr/include
-- YAMLCPP_LIBRARY= /usr/lib/x86_64-linux-gnu/libyaml-cpp.so
[ 11%] Creating directories for 'jsd-populate'
[ 22%] Performing download step (git clone) for 'jsd-populate'
Cloning into 'jsd-src'...
fatal: invalid reference: apb-public-migration
CMake Error at jsd-subbuild/jsd-populate-prefix/tmp/jsd-populate-gitclone.cmake:40 (message):
  Failed to checkout tag: 'apb-public-migration'

gmake[2]: *** [CMakeFiles/jsd-populate.dir/build.make:102: jsd-populate-prefix/src/jsd-populate-stamp/jsd-populate-download] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/jsd-populate.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2

CMake Error at /usr/share/cmake-3.22/Modules/FetchContent.cmake:1087 (message):
  Build step for jsd failed: 2
Call Stack (most recent call first):
  /usr/share/cmake-3.22/Modules/FetchContent.cmake:1216:EVAL:2 (__FetchContent_directPopulate)
  /usr/share/cmake-3.22/Modules/FetchContent.cmake:1216 (cmake_language)
  /usr/share/cmake-3.22/Modules/FetchContent.cmake:1259 (FetchContent_Populate)
  build/_deps/fastcat-src/CMakeLists.txt:59 (FetchContent_MakeAvailable)

-- Configuring incomplete, errors occurred!
alex-brinkman commented 1 year ago

Try using a more modern version. v0.12.3 is the latest, v0.4.3 is ancient history

mcevoyandy commented 1 year ago

ah, sorry, I just copied from the README. Updating to the correct version works.