bazel-contrib / bazel-contrib/rules_foreign_cc

Sysroot compatibility?

Open
#1,439 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Starlark
Stars
737
Forks
270
PR merge metrics
No merged PRs in 30d

Description

I am attempting to build nginx with rules_foreign_cc 0.15.0. I have configured Bazel to use a hermetic C++ toolchain: toolchains_llvm 1.5.0, LLVM 20.1.0 and debian_bullseye_amd64_sysroot.tar.xz. When I attempt to build nginx with configure_make all programs produced by ./configure fail to link with the following error:

/usr/bin/ld: (.text+0x19): undefined reference to `__libc_csu_init'

When I remove the sysroot from C++ toolchain configuration, ./configure works as expected.

What could be the reason of that behaviour? Are rules_foreign_cc hermetic? The libc version in my sysroot is libc-2.31.so.

Contributor guide

Open the contributing guide

Research direction

Start with the configure_make rule and the hermetic toolchain configuration described in the issue, using toolchains_llvm, LLVM 20.1.0, and debian_bullseye_amd64_sysroot.tar.xz. Reproduce the nginx configure failure with and without the sysroot and inspect the linker output around __libc_csu_init. Done means identifying the compatibility boundary and documenting a verified resolution or limitation.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.