bazel-contrib / bazel-contrib/rules_foreign_cc

Path absolutization fails if packages contain marker string external or workspace_name

Open
#1,138 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Starlark
Stars
737
Forks
270
PR merge metrics
No merged PRs in 30d

Description

It should be
`__var_CMAKE_AR="${EXT_BUILD_ROOT//\\//}/toolchain/toolchains/cc-armv7l-luckfox/wrappers/arm-rockchip830-linux-uclibcgnueabihf-ar"`
not
`__var_CMAKE_AR="toolchain/toolchains/cc-armv7l-${EXT_BUILD_ROOT//\\//}/luckfox/wrappers/arm-rockchip830-linux-uclibcgnueabihf-ar"`

how to fix it?

截屏2023-12-20 14 30 58

[CMake.log](https://github.com/bazelbuild/rules_foreign_cc/files/13723890/CMake.log)
[build_script.sh](https://github.com/bazelbuild/rules_foreign_cc/files/13723892/build_script.sh.log)

Contributor guide

Open the contributing guide

Research direction

Start by comparing the expected and generated __var_CMAKE_AR paths in CMake.log and build_script.sh.log. Trace where EXT_BUILD_ROOT is inserted relative to the package path, then reproduce the case where a package contains the marker string "external" or "workspace_name". Done means the generated path keeps the variable at the beginning as shown in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, shell
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.