rules_foreign_cc icon indicating copy to clipboard operation
rules_foreign_cc copied to clipboard

fix: Make CMAKE_RANLIB the no-op command

Open gr1mpatr0n opened this issue 9 months ago • 3 comments

Addresses #1394.

gr1mpatr0n avatar Apr 26 '25 21:04 gr1mpatr0n

Hmm, this doesn't seem to be as clear-cut as I thought. Now, the colon is sitting right up against the preceding path for some reason.

/bin/sh: 1: /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/90e2e9b2d72fa9b00c19ff0535bb31ae/execroot/rules_foreign_cc_examples/bazel-out/k8-dbg/bin/cmake_hello_world_lib/static/libhello_ninja.build_tmpdir/:: not found

Why on Earth is the colon (CMAKE_RANLIB) not at the very least space delimited from the preceding path?!

Is there some difference when using clang-cl that I am not aware of? It seems to have differing behaviour in that case.

gr1mpatr0n avatar Apr 26 '25 21:04 gr1mpatr0n

Brother I feel your pain here. I spent a day chasing up this issue.

johnnyshields avatar Aug 16 '25 19:08 johnnyshields

@johnnyshields I gave up on Bazel a while ago, and it's not a lack of will of learning.

It lacks the most basic C/C++ toolchain support. Something as basic as requesting a target to be built with C++17 standard requires hand-coding the flag for every toolchain you want to support (GCC, MSVC, not to mention the stranger ones like IAR). What is the purpose of a build system that cannot abstract the most basic options?

Just use a competent solution like CMake. Yes it has its warts, but it's been battle-tested and "just works" for the most part. If you need hermiticity, use a container. Happy days.

gr1mpatr0n avatar Aug 27 '25 14:08 gr1mpatr0n