Comments (4)
Is this intentional? Or is this a bug?
Not a C++ rules owner, but I would guess the answer is "neither": This is a result of the changes to label stringification that come with Bzlmod, but the solib paths are also more of an implementation detail of the cc rules.
Could you describe your use case for hardcoding these paths in the first place?
from bazel.
That's more due to bzlmod than any requirements within C++ rules. It could be changed back. But also paths like this shouldn't be hard coded IMO.
from bazel.
I think the use of an @@ pathname was unexpected when we had not enabled bzlmod. It looked like an omission that had pulled behavior in for bzlmod without consideration of the option itself.
from bazel.
Is this intentional? Or is this a bug?
Not a C++ rules owner, but I would guess the answer is "neither": This is a result of the changes to label stringification that come with Bzlmod, but the solib paths are also more of an implementation detail of the cc rules.
Could you describe your use case for hardcoding these paths in the first place?
The use case, which I inherited and will not attempt to defend, was as follows:
We have a rule that runs protoc
, and tells it to run a Python binary of ours as a plugin. I'll call it //:A
. The //:A
Python binary in turn wanted to run a prebuilt executable @B//:B
from an external repository. This @B//:B
binary needs a libtinfo.so.5
shared object, and this happens to be in yet a different external repository. In order to allow @B//:B
to run, the code in //:A
had set up LD_LIBRARY_PATH
by calling the Python runfiles library with the hardcoded _solib_
path to libtinfo.so.5
(relative to the root of the runfiles, naturally), and then taking the dirname of the result since LD_LIBRARY_PATH
needs to list directories and not files.
This hardcoded _solib_
path had a single @
, so when the mangled path started to contain @@
instead in Bazel 7, even when bzlmod was disabled, this portion of our build failed because @B//:B
failed to run, and so //:A
bailed out with an error, and so protoc
bailed out with an error. It was a merry chase to figure out why : )
from bazel.
Related Issues (20)
- [7.2.0] Avoid Windows short paths in Bzlmod HOT 3
- protobuf not building under /tmp due to sandboxing
- Building bazel 6.5.0 using bazel tag has dependency on future version HOT 1
- Status of Bazel 8.0.0-pre.20240422.4
- [Mirror] [email protected] HOT 1
- Bazel 7 Skymeld Regression HOT 6
- JSON profile shows actions before the start of the build when there are long-running remote-executed builds HOT 2
- [Mirror] zig 0.12.0 HOT 3
- [bazel.build] Problem with /install
- Surface toolchain and platform information through Build Event
- --output_groups can't override previous --output_groups arguments
- [Mirror] abseil-cpp HOT 1
- Relaxing scope rules for genquery()
- Implement Starlark Transition Composition
- incompatible_disallow_ctx_resolve_tools
- [7.2.0] Exit if `--experimental_remote_output_service` is set, but not `--remote_cache` HOT 1
- Source jar contents don't match the regular one's HOT 2
- Docs - https://bazel.build/help slack invite is broken HOT 2
- [7.2.0] Update commons-compress to 1.26.1 HOT 2
- [Mirror] rules go patch release 0.47.1 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bazel.