Skip to content

Fixing rippled build errors

Elliot Lee edited this page Feb 16, 2023 · 9 revisions

If you run into conan errors:

grpc-proto/cci.20220627: WARN: Build folder /home/user/.conan/data/grpc-proto/cci.20220627/_/_/build/0623b89cdfdcdc89b2ee9f15778d9510adc21398
ERROR: grpc-proto/cci.20220627: Error in build() method, line 97
        cmake = self._configure_cmake()
while calling '_configure_cmake', line 63
        cmake.definitions["GOOGLEAPIS_PROTO_DIRS"] = self.dependencies["googleapis"].cpp_info.resdirs[0].replace("\\", "/")
        IndexError: list index out of range
CMake Error at /usr/share/cmake/Modules/CMakeDetermineSystem.cmake:130 (message):
  Could not find toolchain file:
  conan-dependencies/build/generators/conan_toolchain.cmake
Call Stack (most recent call first):
  CMakeLists.txt:14 (project)

Then you may need to run:

conan remove grpc/1.50.1

conan remove grpc/1.44.0

conan remove grpc-proto

conan remove googleapis

(The subdependencies grpc-proto, googleapis need to be removed)

In this case, this was caused by the need to update grpc. Conan has issues when versions update, so you may need to manually clear out the old versions of the grpc-related packages. i.e.:

for x in  grpc googleapis grpc-proto; do conan remove $x ; done

The problem is that Conan does not include the recipe revision in the package ID, so an updated recipe does not trigger a rebuild. That might change with Conan 2.0, so hopefully this issue goes away once we upgrade to that - although we will surely get new issues.

Alternatively, if it's not too much trouble, the nuclear option is to rm -rf ~/.conan/data

Then, you can rerun the conan install command(s).

Clone this wiki locally