Fix up : Configurable attribute "copts" doesn't match this configuration

ERROR: /home/lenger/.cache/bazel/_bazel_lenger/e744db622218e02ee1e2cbf3b8750f17/external/nsync/BUILD:402:13: Configurable attribute "copts" doesn't match this configuration (would a default condition help?).
Conditions checked:
 @nsync//:android_arm
 @nsync//:android_arm64
 @nsync//:android_armeabi
 @nsync//:android_x86_32
 @nsync//:android_x86_64
 @nsync//:clang_macos_x86_64
 @nsync//:gcc_linux_aarch64
 @nsync//:gcc_linux_ppc64
 @nsync//:gcc_linux_x86_64_1
 @nsync//:gcc_linux_x86_64_2
 @nsync//:ios_x86_64
 @nsync//:msvc_windows_x86_64.

Solution:
vim /home/lenger/.cache/bazel/_bazel_lenger/e744db622218e02ee1e2cbf3b8750f17/external/nsync/BUILD


Add a default conditions there as marked as red line below:

NSYNC_OPTS_GENERIC = select({
    # Select the CPU architecture include directory.
    # This select() has no real effect in the C++11 build, but satisfies a
    # #include that would otherwise need a #if.
    ":gcc_linux_x86_64_1": ["-I" + pkg_path_name() + "/platform/x86_64"],
    ":gcc_linux_x86_64_2": ["-I" + pkg_path_name() + "/platform/x86_64"],
    ":gcc_linux_aarch64": ["-I" + pkg_path_name() + "/platform/aarch64"],
    ":gcc_linux_ppc64": ["-I" + pkg_path_name() + "/platform/ppc64"],
    ":clang_macos_x86_64": ["-I" + pkg_path_name() + "/platform/x86_64"],
    ":ios_x86_64": ["-I" + pkg_path_name() + "/platform/x86_64"],
    ":android_x86_32": ["-I" + pkg_path_name() + "/platform/x86_32"],
    ":android_x86_64": ["-I" + pkg_path_name() + "/platform/x86_64"],
    ":android_armeabi": ["-I" + pkg_path_name() + "/platform/arm"],
    ":android_arm": ["-I" + pkg_path_name() + "/platform/arm"],
    ":android_arm64": ["-I" + pkg_path_name() + "/platform/aarch64"],
    ":msvc_windows_x86_64": ["-I" + pkg_path_name() + "/platform/x86_64"],
    "//conditions:default": [],
}) + [
    "-I" + pkg_path_name() + "/public",
    "-I" + pkg_path_name() + "/internal",
    "-I" + pkg_path_name() + "/platform/posix",
] + select({
    ":msvc_windows_x86_64": [
    ],
    "//conditions:default": [
        "-D_POSIX_C_SOURCE=200809L",
        "-pthread",
    ],
})

No comments:

Post a Comment

fixed: embedded-redis: Unable to run on macOS Sonoma

Issue you might see below error while trying to run embedded-redis for your testing on your macOS after you upgrade to Sonoma. java.la...