wpilibsuite / allwpilib

Official Repository of WPILibJ and WPILibC
https://wpilib.org/
Other
1.05k stars 611 forks source link

Add jinja2 to prerequisites in README-CMAKE.md #5769

Closed valentinegb closed 10 months ago

valentinegb commented 10 months ago

Describe the bug I am using CMake to build the repository. Using the following command:

cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/opt/homebrew/Cellar/wpilib/2023.4.3 -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=Release -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_VERBOSE_MAKEFILE=ON -Wno-dev -DBUILD_TESTING=OFF -DCMAKE_OSX_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk

I get this error:

Traceback (most recent call last):
  File "/tmp/wpilib-20231016-3394-ellcrb/allwpilib-2023.4.3/ntcore/generate_topics.py", line 4, in <module>
    from jinja2 import Environment, FileSystemLoader
ModuleNotFoundError: No module named 'jinja2'
CMake Error at ntcore/CMakeLists.txt:11 (message):
  python and python3 generate_topics.py failed

To Reproduce Steps to reproduce the behavior:

  1. Install cmake (v3.27.7)
  2. Install opencv (v4.8.1)
  3. Install openjdk (v21)
  4. Run the CMake command shown above

Expected behavior Expected to build all the libraries listed in README-CMAKE.md.

Desktop

Additional context In case the context matters, I am creating a Homebrew formula for WPILib.

calcmogul commented 10 months ago

You need to install that Python module.

PeterJohnson commented 10 months ago

We probably need to update the readme. See the cmake Mac CI workflow here: https://github.com/wpilibsuite/allwpilib/blob/main/.github/workflows/cmake.yml#L46

valentinegb commented 10 months ago

You need to install that Python module.

That should probably be stated in README-CMAKE.md.

valentinegb commented 10 months ago

We probably need to update the readme. See the cmake Mac CI workflow here: https://github.com/wpilibsuite/allwpilib/blob/main/.github/workflows/cmake.yml#L46

Oh that's super helpful for what I'm doing, thank you!