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

Difficulty building w/ CMake: cloning tl_optional "fatal: reference is not a tree" #322

Open
arbor-arthur opened this issue May 3, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@arbor-arthur
Copy link

arbor-arthur commented May 3, 2023

Describe the bug
Running python3 -m pip install . on a git clone of symforce v0.8.0 gives the error:

      -- tl::optional not found, adding with FetchContent
      [ 11%] Creating directories for 'tl_optional-populate'
      [ 22%] Performing download step (git clone) for 'tl_optional-populate'
      Cloning into 'tl_optional-src'...
      fatal: reference is not a tree: c28fcf74d207fc667c4ed3dbae4c251ea551c8c1
      CMake Error at tl_optional-subbuild/tl_optional-populate-prefix/tmp/tl_optional-populate-gitclone.cmake:49 (message):
        Failed to checkout tag: 'c28fcf74d207fc667c4ed3dbae4c251ea551c8c1'

I got around this bug by removing all references to tl optional from symforce/opt/CMakeLists.txt and installing it separately, which is fine because it is a header-only library. I also had to add
include_directories(/usr/local/include) to the top-level CMakeLists.txt. I installed tl-optional with:

git clone https://github.com/TartanLlama/optional.git
cd optional
# for m1/m2 support, modify CMakeLists.txt "https://github.com/catchorg/Catch2/archive/v2.9.2.zip" to be "https://github.com/catchorg/Catch2/archive/v2.13.10.zip"
mkdir build
cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build
cmake --build ./build
sudo cmake --install ./build --prefix /usr/local --config Release

To Reproduce

git clone https://github.com/symforce-org/symforce.git
cd symforce
git checkout v0.8.0
python3 -m pip install .

Expected behavior
Should build without errors.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • OS and version: MacOS Ventura 13.3.1
  • Python version: Python 3.9.13
  • SymForce Version: 0.8.0

Additional context
cmake version 3.26.3

@arbor-arthur arbor-arthur added the bug Something isn't working label May 3, 2023
@chao-qu-skydio
Copy link
Contributor

Thanks for reporting. I'm able to reproduce the same error you saw. Will look into this

@chao-qu-skydio chao-qu-skydio self-assigned this May 4, 2023
@chao-qu-skydio
Copy link
Contributor

This is fixed on main, we will release v0.9 soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants