Использование Cmake из Bazel Rules_foreign_cc не может загрузить внешние пакетыC++

Программы на C++. Форум разработчиков
Ответить
Anonymous
 Использование Cmake из Bazel Rules_foreign_cc не может загрузить внешние пакеты

Сообщение Anonymous »

Я работаю над проектом Bazel CPP, и я пытаюсь использовать Cmake для интеграции внешней библиотеки. < /p>
У меня есть следующий файл сборки < /p>

Код: Выделить всё

load("@rules_cc//cc:defs.bzl", "cc_library")
load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake")

cmake(
name = "databento",
build_args = [
"-j16",
],
lib_source = "@databento//:all",
targets = [
"install",
],
visibility = ["//visibility:public"])
< /code>
Это снимок моего файла рабочей области < /p>
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

all_content = """filegroup(
name = "all",
srcs = glob(["**"]),
visibility = ["//visibility:public"]
)
"""
http_archive(
name = "databento",
strip_prefix = "databento-cpp-0.14.1",
build_file_content = all_content,
urls = ["https://github.com/databento/databento-cpp/archive/refs/tags/v0.14.1.tar.gz"],
# build_file = "//library-bazel-builds:databento.BUILD",
)

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "rules_foreign_cc",
# TODO: Get the latest sha256 value from a bazel debug message or the latest
#       release on the releases page: https://github.com/bazelbuild/rules_foreign_cc/releases
#
# sha256 = "...",
strip_prefix = "rules_foreign_cc-51152aac9d6d8b887802a47ec08a1a37ef2c4885",
url = "https://github.com/bazelbuild/rules_foreign_cc/archive/51152aac9d6d8b887802a47ec08a1a37ef2c4885.tar.gz",
)

load("@rules_foreign_cc//foreign_cc:repositories.bzl", "rules_foreign_cc_dependencies")

rules_foreign_cc_dependencies()
< /code>
Cmake отлично работает для создания того же репозитория локально, но когда я пытаюсь использовать иностранные правила Bazel, я получаю это: < /p>
-- Downloading...
dst='/private/var/tmp/_bazel_root/1beb7f234b15119b93696bf5c0611a9f/sandbox/darwin-sandbox/9/execroot/Trading_Core/bazel-out/darwin_arm64-fastbuild/bin/Databento/databento.build_tmpdir/_deps/json-subbuild/json-populate-prefix/src/json.tar.xz'
timeout='none'
inactivity timeout='none'
-- Using src='https://github.com/nlohmann/json/releases/download/v3.11.2/json.tar.xz'
-- Retrying...
-- Using src='https://github.com/nlohmann/json/releases/download/v3.11.2/json.tar.xz'
-- Retry after 5 seconds (attempt #2) ...
-- Using src='https://github.com/nlohmann/json/releases/download/v3.11.2/json.tar.xz'
-- Retry after 5 seconds (attempt #3) ...
-- Using src='https://github.com/nlohmann/json/releases/download/v3.11.2/json.tar.xz'
-- Retry after 15 seconds (attempt #4) ...
-- Using src='https://github.com/nlohmann/json/releases/download/v3.11.2/json.tar.xz'
-- Retry after 60 seconds (attempt #5) ...
-- Using src='https://github.com/nlohmann/json/releases/download/v3.11.2/json.tar.xz'
CMake Error at json-subbuild/json-populate-prefix/src/json-populate-stamp/download-json-populate.cmake:170 (message):
Each download failed!

error: downloading 'https://github.com/nlohmann/json/releases/download/v3.11.2/json.tar.xz' failed
status_code: 7
status_string: "Couldn't connect to server"
log:
--- LOG BEGIN ---
Trying 140.82.112.3:443...

Immediate connect fail for 140.82.112.3: Operation not permitted

Closing connection 0

--- LOG END ---
error: downloading 'https://github.com/nlohmann/json/releases/download/v3.11.2/json.tar.xz' failed
status_code: 7
status_string: "Couldn't connect to server"
log:
--- LOG BEGIN ---
Trying 140.82.112.3:443...

Immediate connect fail for 140.82.112.3: Operation not permitted

Closing connection 0
Есть идеи, почему это происходит?

Подробнее здесь: https://stackoverflow.com/questions/777 ... l-packages
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «C++»