Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.0.0rc4] Programatic error in cc_shared_library #24518

Closed
jsharpe opened this issue Nov 27, 2024 · 6 comments
Closed

[8.0.0rc4] Programatic error in cc_shared_library #24518

jsharpe opened this issue Nov 27, 2024 · 6 comments
Labels

Comments

@jsharpe
Copy link
Contributor

jsharpe commented Nov 27, 2024

Description of the bug:

I'm hitting this error with 8.0.0rc4, the same code is ok in 7.4.1.

ERROR: /home/james.sharpe/.cache/bazel/_bazel_james.sharpe/120360a4609c561725b4ef03d7bc710f/external/esp/BUILD.bazel:135:18: in cc_shared_library rule @@esp//:egads-shared:
Traceback (most recent call last):
        File "/virtual_builtins_bzl/common/cc/cc_shared_library.bzl", line 675, column 114, in _cc_shared_library_impl
        File "/virtual_builtins_bzl/common/cc/cc_shared_library.bzl", line 532, column 44, in _filter_inputs
        File "/virtual_builtins_bzl/common/cc/cc_shared_library.bzl", line 81, column 28, in _sort_linker_inputs
        File "/virtual_builtins_bzl/common/cc/cc_shared_library.bzl", line 57, column 9, in _programmatic_error
Error in fail: Your build has triggered a programmatic error in the cc_shared_library rule. Please file an issue in https://github.com/bazelbuild/bazel : @@esp//:egads,@@esp//:egads_lib,@@esp//:emp,@@esp//:egads_util,@@esp//:opencascade,@@esp//:uvmap,@@//src/logging:redirect_printf,@@//src/logging:logging,@@esp//:opencascade-shared vs 17

Which category does this issue belong to?

No response

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

It can be reproduced using the following:

cc_shared_library(
    name = "a-shared",
    shared_lib_name = "liba.so",
    deps = [":a"],
)

cc_shared_library(
    name = "b-shared",
    dynamic_deps = [":a-shared"],
    deps = [":b"],
)

cc_library(
    name = "b",
    visibility = ["//visibility:public"],
    deps = [
        ":a",
    ],
)

cc_library(
    name = "test",
)

cc_library(
    name = "a",
    deps = [":test"]
)

Which operating system are you running Bazel on?

Linux

What is the output of bazel info release?

8.0.0rc4

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse HEAD ?

No response

If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.

No response

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

@jsharpe
Copy link
Contributor Author

jsharpe commented Nov 28, 2024

Bug was present in 7.4.0, 7.4.1 was fixed. Believe its a patch from @fmeum that is the root cause of this issue.

@sgowroji sgowroji added the team-Rules-CPP Issues for C++ rules label Nov 28, 2024
@fmeum
Copy link
Collaborator

fmeum commented Nov 28, 2024

@meteorcloudy While the cherry-pick attempt at #24002 was canceled due to the regression, there was another at #24005 that went through.

@fmeum
Copy link
Collaborator

fmeum commented Nov 28, 2024

@bazel-io fork 8.0.0

@fmeum
Copy link
Collaborator

fmeum commented Nov 28, 2024

#24522

github-merge-queue bot pushed a commit that referenced this issue Nov 28, 2024
@meteorcloudy
Copy link
Member

rc6 was just released with a fix for this: https://github.com/bazelbuild/bazel/releases/tag/8.0.0rc6

@jsharpe
Copy link
Contributor Author

jsharpe commented Nov 28, 2024

rc6 fixes this for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants