Skip to content

ModuleNotFoundError: No module named 'headermap_tool' #236

@Tilak1028-st

Description

@Tilak1028-st

I'm getting this error:
ModuleNotFoundError: No module named 'headermap_tool'

while running this command:
bazel build //Vendor/BigInt:BigInt

Here's my BUILD file:

load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
load(
  "//Vendor/rules_pods/BazelExtensions:extensions.bzl",
  "acknowledged_target",
  "gen_module_map",
  "gen_includes",
  "headermap",
  "umbrella_header"
)

# Config settings for different Apple platforms and release mode
config_setting(
  name = "release",
  values = {
    "compilation_mode": "opt",
  }
)

config_setting(
  name = "osxCase",
  values = {
    "apple_platform_type": "macos",
  }
)

config_setting(
  name = "tvosCase",
  values = {
    "apple_platform_type": "tvos",
  }
)

config_setting(
  name = "watchosCase",
  values = {
    "apple_platform_type": "watchos",
  }
)

# Filegroup for BigInt headers
filegroup(
  name = "BigInt_package_hdrs",
  srcs = [
    "BigInt_direct_hdrs",
  ],
  visibility = [
    "//visibility:public",
  ],
)

filegroup(
  name = "BigInt_direct_hdrs",
  srcs = glob(
    [
      "pod_support/Headers/Public/**/*",
    ]
  ),
  visibility = [
    "//visibility:public",
  ],
)

filegroup(
  name = "BigInt_public_hdrs",
  srcs = [],
  visibility = [
    "//visibility:public",
  ],
)

filegroup(
  name = "BigInt_hdrs",
  srcs = glob(
    [
      "pod_support/Headers/Public/**/*",
    ]
  ),
  visibility = [
    "//visibility:public",
  ],
)

# Headermap for BigInt
headermap(
  name = "BigInt_hmap",
  namespace = "BigInt",
  hdrs = [
    "BigInt_package_hdrs",
    ":BigInt_hdrs",
  ],
  deps = [],
  visibility = [
    "//visibility:public",
  ],
)

# Swift library for BigInt
swift_library(
  name = "BigInt",
  srcs = glob([
    "BigInt-5.4.1/Sources/**/*.swift",  # Path to your Swift source files
  ]),
  module_name = "BigInt",  # Define the module name
  copts = select({
    "//conditions:default": [
      "-DDEBUG=1",
      "-DPOD_CONFIGURATION_DEBUG=1",
    ],
    ":release": [
      "-DPOD_CONFIGURATION_RELEASE=1",
      "-DNS_BLOCK_ASSERTIONS=1",
    ],
  }) + [
    "-Xcc", "-fmodules",  # Enable modules
    "-Xcc", "-fmodule-name=BigInt",  # Set the module name
  ],
  deps = [
    ":BigInt_hmap",  # Include the headermap dependency
  ],
 
  visibility = [
    "//visibility:public",
  ],
)

# Acknowledged target for BigInt
acknowledged_target(
  name = "BigInt_acknowledgement",
  deps = [],
  value = "//Vendor/BigInt/pod_support_buildable:acknowledgement_fragment",
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions