-
Notifications
You must be signed in to change notification settings - Fork 4.5k
C shared libraries depend on libstdc++ #6221
Copy link
Copy link
Closed
Labels
P4This is either out of scope or we don't have bandwidth to review a PR. (No assignee)This is either out of scope or we don't have bandwidth to review a PR. (No assignee)not staleIssues or PRs that are inactive but not considered staleIssues or PRs that are inactive but not considered staleteam-Rules-CPPIssues for C++ rulesIssues for C++ rulestype: feature request
Metadata
Metadata
Assignees
Labels
P4This is either out of scope or we don't have bandwidth to review a PR. (No assignee)This is either out of scope or we don't have bandwidth to review a PR. (No assignee)not staleIssues or PRs that are inactive but not considered staleIssues or PRs that are inactive but not considered staleteam-Rules-CPPIssues for C++ rulesIssues for C++ rulestype: feature request
Description of the problem / feature request:
When I build C shard libraries, they end up having a dependency on libstdg++.so.6.
I have not figured out a way to remove this dependency.
Feature requests: what underlying problem are you trying to solve with this feature?
I want to build a shard library from C code that does not depend on libstdc++.
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Create a C library with Bazel's cc_binary rule. Set linkshard = True in the BUILD file. Run ldd
on the created shared object. You'll see is has a dependency on libstdc++.so.6.
What operating system are you running Bazel on?
Linux.
What's the output of
bazel info release?development version
It's 0.15.0 with a couple of patches.
Any other information, logs, or outputs that you want to share?
Go folks have worked around this problem
bazel-contrib/rules_go#1681