Skip to content

rules_go breaks with incompatible_require_linker_input_cc_api #2720

@shahms

Description

@shahms

(See kythe/kythe#4760)

What version of rules_go are you using?

v0.24.7

What version of gazelle are you using?

v0.22.2

What version of Bazel are you using?

3.7.0

Does this issue reproduce with the latest releases of all the above?

yes

What did you do?

bazel test --incompatible_require_linker_input_cc_api //kythe/...

What did you expect to see?

A successful build.

What did you see instead?

ERROR: /usr/local/google/home/shahms/.cache/bazel/_bazel_shahms/f0c8a49cbf1bfaa82de86be744427f4b/external/com_github_jmhodges_levigo/BUILD.bazel:9:11: in go_library rule @com_github_jmhodges_levigo//:levigo:
Traceback (most recent call last):
        File "/usr/local/google/home/shahms/.cache/bazel/_bazel_shahms/f0c8a49cbf1bfaa82de86be744427f4b/external/io_bazel_rules_go/go/private/rules/library.bzl", line 38, column 25, in _go_library_impl
                archive = go.archive(go, source)
        File "/usr/local/google/home/shahms/.cache/bazel/_bazel_shahms/f0c8a49cbf1bfaa82de86be744427f4b/external/io_bazel_rules_go/go/private/actions/archive.bzl", line 82, column 28, in emit_archive
                cgo = cgo_configure(
        File "/usr/local/google/home/shahms/.cache/bazel/_bazel_shahms/f0c8a49cbf1bfaa82de86be744427f4b/external/io_bazel_rules_go/go/private/rules/cgo.bzl", line 112, column 31, in cgo_configure
                cc_libs = _cc_libs(d)
        File "/usr/local/google/home/shahms/.cache/bazel/_bazel_shahms/f0c8a49cbf1bfaa82de86be744427f4b/external/io_bazel_rules_go/go/private/rules/cgo.bzl", line 191, column 67, in _cc_libs
                libraries_to_link = as_iterable(target[CcInfo].linking_context.libraries_to_link)
Error: 'LinkingContext' value has no field or method 'libraries_to_link'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions