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

ModuleNotFoundError: No module named 'headermap_tool' #236

Open
Tilak1028-st opened this issue Oct 22, 2024 · 0 comments
Open

ModuleNotFoundError: No module named 'headermap_tool' #236

Tilak1028-st opened this issue Oct 22, 2024 · 0 comments

Comments

@Tilak1028-st
Copy link

Tilak1028-st commented Oct 22, 2024

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",
)

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

No branches or pull requests

1 participant