From 1c738402aa76b034fbf676b65bd82d33670d01ff Mon Sep 17 00:00:00 2001 From: anakinxc Date: Sat, 28 Dec 2024 21:34:13 +0800 Subject: [PATCH 1/7] Use seal in bcr --- MODULE.bazel | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MODULE.bazel b/MODULE.bazel index 8a92f32..1ed7f19 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -50,6 +50,7 @@ bazel_dep(name = "libdivide", version = "5.0") bazel_dep(name = "emp-tool", version = "0.2.5") bazel_dep(name = "sparsehash", version = "2.0.4") bazel_dep(name = "sse2neon", version = "1.7.0-20240330-8df2f48") +bazel_dep(name = "seal", version = "4.1.1") # non mododule dependencies non_module_dependencies = use_extension("//bazel:defs.bzl", "non_module_dependencies") @@ -59,7 +60,6 @@ use_repo( "curve25519-donna", "kuku", "perfetto", - "seal", "zstd", ) From be550a5a5381c868f39d22c396d072d9ed925beb Mon Sep 17 00:00:00 2001 From: anakinxc Date: Sat, 28 Dec 2024 22:08:46 +0800 Subject: [PATCH 2/7] Drop more --- MODULE.bazel | 3 +- bazel/microsoft_apsi.BUILD | 2 +- bazel/microsoft_gsl.BUILD | 35 ------ bazel/microsoft_kuku.BUILD | 2 +- bazel/patches/seal.patch | 252 ------------------------------------- bazel/repositories.bzl | 43 ------- bazel/seal.BUILD | 50 -------- bazel/zstd.BUILD | 39 ------ 8 files changed, 4 insertions(+), 422 deletions(-) delete mode 100644 bazel/microsoft_gsl.BUILD delete mode 100644 bazel/patches/seal.patch delete mode 100644 bazel/seal.BUILD delete mode 100644 bazel/zstd.BUILD diff --git a/MODULE.bazel b/MODULE.bazel index 1ed7f19..d29e895 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -51,6 +51,8 @@ bazel_dep(name = "emp-tool", version = "0.2.5") bazel_dep(name = "sparsehash", version = "2.0.4") bazel_dep(name = "sse2neon", version = "1.7.0-20240330-8df2f48") bazel_dep(name = "seal", version = "4.1.1") +bazel_dep(name = "zstd", version = "1.5.6") +bazel_dep(name = "microsoft_gsl", version = "4.0.0") # non mododule dependencies non_module_dependencies = use_extension("//bazel:defs.bzl", "non_module_dependencies") @@ -60,7 +62,6 @@ use_repo( "curve25519-donna", "kuku", "perfetto", - "zstd", ) new_local_repository = use_repo_rule("@bazel_tools//tools/build_defs/repo:local.bzl", "new_local_repository") diff --git a/bazel/microsoft_apsi.BUILD b/bazel/microsoft_apsi.BUILD index 02fd14f..8143a0c 100644 --- a/bazel/microsoft_apsi.BUILD +++ b/bazel/microsoft_apsi.BUILD @@ -35,7 +35,7 @@ cmake( out_static_libs = ["libapsi-0.11.a"], deps = [ "@com_github_log4cplus_log4cplus//:log4cplus", - "@com_github_microsoft_gsl//:Microsoft.GSL", + "@microsoft_gsl//:Microsoft.GSL", "@com_github_open_source_parsers_jsoncpp//:jsoncpp", "@com_github_zeromq_cppzmq//:cppzmq", "@com_google_flatbuffers//:FlatBuffers", diff --git a/bazel/microsoft_gsl.BUILD b/bazel/microsoft_gsl.BUILD deleted file mode 100644 index a30fa6a..0000000 --- a/bazel/microsoft_gsl.BUILD +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright 2022 Ant Group Co., Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake") - -package(default_visibility = ["//visibility:public"]) - -filegroup( - name = "all_srcs", - srcs = glob(["**"]), -) - -cmake( - name = "Microsoft.GSL", - cache_entries = { - "GSL_INSTALL": "ON", - "GSL_STANDALONE_PROJECT": "OFF", - "GSL_TEST": "OFF", - }, - generate_args = ["-GNinja"], - lib_source = ":all_srcs", - out_headers_only = True, - out_include_dir = "include", -) diff --git a/bazel/microsoft_kuku.BUILD b/bazel/microsoft_kuku.BUILD index 1a8f930..c16dbf4 100644 --- a/bazel/microsoft_kuku.BUILD +++ b/bazel/microsoft_kuku.BUILD @@ -33,5 +33,5 @@ cmake( lib_source = "@kuku//:all", out_include_dir = "include/Kuku-2.1", out_static_libs = ["libkuku-2.1.a"], - deps = ["@com_github_microsoft_gsl//:Microsoft.GSL"], + deps = ["@microsoft_gsl//:Microsoft.GSL"], ) diff --git a/bazel/patches/seal.patch b/bazel/patches/seal.patch deleted file mode 100644 index 18f9a87..0000000 --- a/bazel/patches/seal.patch +++ /dev/null @@ -1,252 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 1a7a2bfd..a27539fa 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -223,7 +223,7 @@ if(SEAL_USE_INTEL_HEXL) - message(STATUS "Intel HEXL: download ...") - seal_fetch_thirdparty_content(ExternalIntelHEXL) - else() -- find_package(HEXL 1.2.4) -+ find_package(HEXL 1.2) - if (NOT TARGET HEXL::hexl) - message(FATAL_ERROR "Intel HEXL: not found") - endif() -diff --git a/native/src/seal/context.cpp b/native/src/seal/context.cpp -index 887a1312..932d9774 100644 ---- a/native/src/seal/context.cpp -+++ b/native/src/seal/context.cpp -@@ -477,7 +477,8 @@ namespace seal - // more than one modulus in coeff_modulus. This is equivalent to expanding - // the chain by one step. Otherwise, we set first_parms_id_ to equal - // key_parms_id_. -- if (!context_data_map_.at(key_parms_id_)->qualifiers_.parameters_set() || parms.coeff_modulus().size() == 1) -+ if (!context_data_map_.at(key_parms_id_)->qualifiers_.parameters_set() || parms.coeff_modulus().size() == 1 || -+ !parms.use_special_prime()) - { - first_parms_id_ = key_parms_id_; - } -diff --git a/native/src/seal/encryptionparams.cpp b/native/src/seal/encryptionparams.cpp -index 31e07441..6f8e6b2a 100644 ---- a/native/src/seal/encryptionparams.cpp -+++ b/native/src/seal/encryptionparams.cpp -@@ -23,8 +23,10 @@ namespace seal - uint64_t poly_modulus_degree64 = static_cast(poly_modulus_degree_); - uint64_t coeff_modulus_size64 = static_cast(coeff_modulus_.size()); - uint8_t scheme = static_cast(scheme_); -+ uint8_t use_special_prime_size8 = static_cast(use_special_prime_); - - stream.write(reinterpret_cast(&scheme), sizeof(uint8_t)); -+ stream.write(reinterpret_cast(&use_special_prime_size8), sizeof(uint8_t)); - stream.write(reinterpret_cast(&poly_modulus_degree64), sizeof(uint64_t)); - stream.write(reinterpret_cast(&coeff_modulus_size64), sizeof(uint64_t)); - for (const auto &mod : coeff_modulus_) -@@ -63,6 +65,9 @@ namespace seal - // This constructor will throw if scheme is invalid - EncryptionParameters parms(scheme); - -+ uint8_t use_special_prime_size8; -+ stream.read(reinterpret_cast(&use_special_prime_size8), sizeof(uint8_t)); -+ - // Read the poly_modulus_degree - uint64_t poly_modulus_degree64 = 0; - stream.read(reinterpret_cast(&poly_modulus_degree64), sizeof(uint64_t)); -@@ -98,6 +103,7 @@ namespace seal - // Supposedly everything worked so set the values of member variables - parms.set_poly_modulus_degree(safe_cast(poly_modulus_degree64)); - parms.set_coeff_modulus(coeff_modulus); -+ parms.set_use_special_prime(use_special_prime_size8); - - // Only BFV and BGV uses plain_modulus; set_plain_modulus checks that for - // other schemes it is zero -@@ -128,6 +134,7 @@ namespace seal - size_t total_uint64_count = add_safe( - size_t(1), // scheme - size_t(1), // poly_modulus_degree -+ size_t(1), // use_special_prime - coeff_modulus_size, plain_modulus_.uint64_count()); - - auto param_data(allocate_uint(total_uint64_count, pool_)); -@@ -139,6 +146,7 @@ namespace seal - // Write the poly_modulus_degree. Note that it will always be positive. - *param_data_ptr++ = static_cast(poly_modulus_degree_); - -+ *param_data_ptr++ = static_cast(use_special_prime_); - for (const auto &mod : coeff_modulus_) - { - *param_data_ptr++ = mod.value(); -diff --git a/native/src/seal/encryptionparams.h b/native/src/seal/encryptionparams.h -index 9e1fbe48..8530eeeb 100644 ---- a/native/src/seal/encryptionparams.h -+++ b/native/src/seal/encryptionparams.h -@@ -266,6 +266,11 @@ namespace seal - random_generator_ = std::move(random_generator); - } - -+ inline void set_use_special_prime(bool flag) -+ { -+ use_special_prime_ = flag; -+ } -+ - /** - Returns the encryption scheme type. - */ -@@ -274,6 +279,11 @@ namespace seal - return scheme_; - } - -+ bool use_special_prime() const noexcept -+ { -+ return use_special_prime_; -+ } -+ - /** - Returns the degree of the polynomial modulus parameter. - */ -@@ -360,6 +370,7 @@ namespace seal - std::size_t members_size = Serialization::ComprSizeEstimate( - util::add_safe( - sizeof(scheme_), -+ sizeof(use_special_prime_), - sizeof(std::uint64_t), // poly_modulus_degree_ - sizeof(std::uint64_t), // coeff_modulus_size - coeff_modulus_total_size, -@@ -501,6 +512,8 @@ namespace seal - - Modulus plain_modulus_{}; - -+ bool use_special_prime_ = true; -+ - parms_id_type parms_id_ = parms_id_zero; - }; - } // namespace seal -diff --git a/native/src/seal/evaluator.cpp b/native/src/seal/evaluator.cpp -index dabd3bab..61a96ae9 100644 ---- a/native/src/seal/evaluator.cpp -+++ b/native/src/seal/evaluator.cpp -@@ -2382,6 +2382,7 @@ namespace seal - size_t encrypted_size = encrypted.size(); - // Use key_context_data where permutation tables exist since previous runs. - auto galois_tool = context_.key_context_data()->galois_tool(); -+ bool is_ntt_form = encrypted.is_ntt_form(); - - // Size check - if (!product_fits_in(coeff_count, coeff_modulus_size)) -@@ -2412,7 +2413,7 @@ namespace seal - // DO NOT CHANGE EXECUTION ORDER OF FOLLOWING SECTION - // BEGIN: Apply Galois for each ciphertext - // Execution order is sensitive, since apply_galois is not inplace! -- if (parms.scheme() == scheme_type::bfv) -+ if (not is_ntt_form) - { - // !!! DO NOT CHANGE EXECUTION ORDER!!! - -@@ -2426,7 +2427,7 @@ namespace seal - // Next transform encrypted.data(1) - galois_tool->apply_galois(encrypted_iter[1], coeff_modulus_size, galois_elt, coeff_modulus, temp); - } -- else if (parms.scheme() == scheme_type::ckks || parms.scheme() == scheme_type::bgv) -+ else - { - // !!! DO NOT CHANGE EXECUTION ORDER!!! - -@@ -2440,10 +2441,6 @@ namespace seal - // Next transform encrypted.data(1) - galois_tool->apply_galois_ntt(encrypted_iter[1], coeff_modulus_size, galois_elt, temp); - } -- else -- { -- throw logic_error("scheme not implemented"); -- } - - // Wipe encrypted.data(1) - set_zero_poly(coeff_count, coeff_modulus_size, encrypted.data(1)); -@@ -2530,6 +2527,7 @@ namespace seal - auto &key_context_data = *context_.key_context_data(); - auto &key_parms = key_context_data.parms(); - auto scheme = parms.scheme(); -+ bool is_ntt_form = encrypted.is_ntt_form(); - - // Verify parameters. - if (!is_metadata_valid_for(encrypted, context_) || !is_buffer_valid(encrypted)) -@@ -2559,14 +2557,6 @@ namespace seal - { - throw invalid_argument("pool is uninitialized"); - } -- if (scheme == scheme_type::bfv && encrypted.is_ntt_form()) -- { -- throw invalid_argument("BFV encrypted cannot be in NTT form"); -- } -- if (scheme == scheme_type::ckks && !encrypted.is_ntt_form()) -- { -- throw invalid_argument("CKKS encrypted must be in NTT form"); -- } - if (scheme == scheme_type::bgv && !encrypted.is_ntt_form()) - { - throw invalid_argument("BGV encrypted must be in NTT form"); -@@ -2605,7 +2595,7 @@ namespace seal - set_uint(target_iter, decomp_modulus_size * coeff_count, t_target); - - // In CKKS or BGV, t_target is in NTT form; switch back to normal form -- if (scheme == scheme_type::ckks || scheme == scheme_type::bgv) -+ if (is_ntt_form) - { - inverse_ntt_negacyclic_harvey(t_target, decomp_modulus_size, key_ntt_tables); - } -@@ -2632,7 +2622,7 @@ namespace seal - ConstCoeffIter t_operand; - - // RNS-NTT form exists in input -- if ((scheme == scheme_type::ckks || scheme == scheme_type::bgv) && (I == J)) -+ if (is_ntt_form && (I == J)) - { - t_operand = target_iter[J]; - } -@@ -2789,7 +2779,7 @@ namespace seal - SEAL_ITERATE(t_ntt, coeff_count, [fix](auto &K) { K += fix; }); - - uint64_t qi_lazy = qi << 1; // some multiples of qi -- if (scheme == scheme_type::ckks) -+ if (is_ntt_form) - { - // This ntt_negacyclic_harvey_lazy results in [0, 4*qi). - ntt_negacyclic_harvey_lazy(t_ntt, get<2>(J)); -@@ -2802,7 +2792,7 @@ namespace seal - qi_lazy = qi << 2; - #endif - } -- else if (scheme == scheme_type::bfv) -+ else - { - inverse_ntt_negacyclic_harvey_lazy(get<0, 1>(J), get<2>(J)); - } -diff --git a/native/src/seal/evaluator.h b/native/src/seal/evaluator.h -index 9e3dd576..bb598ddf 100644 ---- a/native/src/seal/evaluator.h -+++ b/native/src/seal/evaluator.h -@@ -1355,10 +1355,12 @@ namespace seal - apply_galois_inplace(encrypted, galois_tool->get_elt_from_step(0), galois_keys, std::move(pool)); - } - -+ public: - void switch_key_inplace( - Ciphertext &encrypted, util::ConstRNSIter target_iter, const KSwitchKeys &kswitch_keys, - std::size_t key_index, MemoryPoolHandle pool = MemoryManager::GetPool()) const; - -+ private: - void multiply_plain_normal(Ciphertext &encrypted, const Plaintext &plain, MemoryPoolHandle pool) const; - - void multiply_plain_ntt(Ciphertext &encrypted_ntt, const Plaintext &plain_ntt) const; -diff --git a/native/src/seal/serializable.h b/native/src/seal/serializable.h -index a940190c..e490b302 100644 ---- a/native/src/seal/serializable.h -+++ b/native/src/seal/serializable.h -@@ -135,6 +135,9 @@ namespace seal - return obj_.save(out, size, compr_mode); - } - -+ const T& obj() const { return obj_; } -+ -+ T& obj() { return obj_; } - private: - Serializable(T &&obj) : obj_(std::move(obj)) - {} diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index 48e8d6a..ceaf30f 100644 --- a/bazel/repositories.bzl +++ b/bazel/repositories.bzl @@ -16,10 +16,7 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") def psi_deps(): - _com_github_facebook_zstd() - _com_github_microsoft_seal() _com_github_microsoft_apsi() - _com_github_microsoft_gsl() _com_github_microsoft_kuku() _com_google_flatbuffers() @@ -31,33 +28,6 @@ def psi_deps(): _com_github_log4cplus_log4cplus() _com_github_open_source_parsers_jsoncpp() -def _com_github_facebook_zstd(): - maybe( - http_archive, - name = "zstd", - build_file = "//bazel:zstd.BUILD", - strip_prefix = "zstd-1.5.5", - sha256 = "98e9c3d949d1b924e28e01eccb7deed865eefebf25c2f21c702e5cd5b63b85e1", - type = ".tar.gz", - urls = [ - "https://github.com/facebook/zstd/archive/refs/tags/v1.5.5.tar.gz", - ], - ) - -def _com_github_microsoft_seal(): - maybe( - http_archive, - name = "seal", - sha256 = "af9bf0f0daccda2a8b7f344f13a5692e0ee6a45fea88478b2b90c35648bf2672", - strip_prefix = "SEAL-4.1.1", - type = "tar.gz", - patch_args = ["-p1"], - patches = ["@psi//bazel/patches:seal.patch"], - urls = [ - "https://github.com/microsoft/SEAL/archive/refs/tags/v4.1.1.tar.gz", - ], - build_file = "@psi//bazel:seal.BUILD", - ) def _com_github_microsoft_apsi(): maybe( @@ -79,19 +49,6 @@ def _com_github_microsoft_apsi(): ], ) -def _com_github_microsoft_gsl(): - maybe( - http_archive, - name = "com_github_microsoft_gsl", - sha256 = "f0e32cb10654fea91ad56bde89170d78cfbf4363ee0b01d8f097de2ba49f6ce9", - strip_prefix = "GSL-4.0.0", - type = "tar.gz", - urls = [ - "https://github.com/microsoft/GSL/archive/refs/tags/v4.0.0.tar.gz", - ], - build_file = "@psi//bazel:microsoft_gsl.BUILD", - ) - def _com_github_microsoft_kuku(): maybe( http_archive, diff --git a/bazel/seal.BUILD b/bazel/seal.BUILD deleted file mode 100644 index 92fc017..0000000 --- a/bazel/seal.BUILD +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright 2022 Ant Group Co., Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake") - -package(default_visibility = ["//visibility:public"]) - -filegroup( - name = "all", - srcs = glob(["**"]), -) - -cmake( - name = "seal", - cache_entries = { - "SEAL_USE_MSGSL": "ON", - "SEAL_BUILD_DEPS": "OFF", - "SEAL_USE_ZLIB": "ON", - "SEAL_USE_INTEL_HEXL": "OFF", - "SEAL_THROW_ON_TRANSPARENT_CIPHERTEXT": "OFF", #NOTE(juhou) required by apsi - "SEAL_USE_ZSTD": "ON", - "CMAKE_INSTALL_LIBDIR": "lib", - # Uncomment to use hexl - # "CpuFeatures_DIR": "$EXT_BUILD_DEPS/cpu_features/lib/cmake/CpuFeatures/", - # "EXT_BUILD_DEPS": "$EXT_BUILD_DEPS", - # "SEAL_USE_INTEL_HEXL": "ON", - }, - generate_args = ["-GNinja"], - lib_source = "@seal//:all", - out_include_dir = "include/SEAL-4.1", - out_static_libs = ["libseal-4.1.a"], - deps = [ - "@zstd", - "@com_github_microsoft_gsl//:Microsoft.GSL", - "@zlib", - # Uncomment to use hexl - # "@com_intel_hexl//:hexl" - ], -) diff --git a/bazel/zstd.BUILD b/bazel/zstd.BUILD deleted file mode 100644 index bf77f9f..0000000 --- a/bazel/zstd.BUILD +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright 2022 Ant Group Co., Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake") - -package(default_visibility = ["//visibility:public"]) - -filegroup( - name = "all", - srcs = glob(["**"]), -) - -cmake( - name = "zstd", - cache_entries = { - "ZSTD_BUILD_PROGRAMS": "OFF", - "ZSTD_BUILD_SHARED": "OFF", - "ZLIB_BUILD_STATIC": "ON", - "ZSTD_BUILD_TESTS": "OFF", - "ZSTD_MULTITHREAD_SUPPORT": "OFF", - "CMAKE_INSTALL_LIBDIR": "lib", - }, - generate_args = ["-GNinja"], - lib_source = "@zstd//:all", - out_include_dir = "include/", - out_static_libs = ["libzstd.a"], - working_directory = "build/cmake", -) From 6201e79c319ce8793eba6e53532d3bcb8483e5ff Mon Sep 17 00:00:00 2001 From: anakinxc Date: Sat, 28 Dec 2024 22:34:03 +0800 Subject: [PATCH 3/7] drop more... --- MODULE.bazel | 1 + bazel/microsoft_apsi.BUILD | 2 +- bazel/repositories.bzl | 14 -------------- 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index d29e895..534d2bd 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -53,6 +53,7 @@ bazel_dep(name = "sse2neon", version = "1.7.0-20240330-8df2f48") bazel_dep(name = "seal", version = "4.1.1") bazel_dep(name = "zstd", version = "1.5.6") bazel_dep(name = "microsoft_gsl", version = "4.0.0") +bazel_dep(name = "log4cplus", version = "2.1.1") # non mododule dependencies non_module_dependencies = use_extension("//bazel:defs.bzl", "non_module_dependencies") diff --git a/bazel/microsoft_apsi.BUILD b/bazel/microsoft_apsi.BUILD index 8143a0c..fd7fa97 100644 --- a/bazel/microsoft_apsi.BUILD +++ b/bazel/microsoft_apsi.BUILD @@ -34,7 +34,7 @@ cmake( out_include_dir = "include/APSI-0.11", out_static_libs = ["libapsi-0.11.a"], deps = [ - "@com_github_log4cplus_log4cplus//:log4cplus", + "@log4cplus//:log4cplus", "@microsoft_gsl//:Microsoft.GSL", "@com_github_open_source_parsers_jsoncpp//:jsoncpp", "@com_github_zeromq_cppzmq//:cppzmq", diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index ceaf30f..203e46a 100644 --- a/bazel/repositories.bzl +++ b/bazel/repositories.bzl @@ -25,7 +25,6 @@ def psi_deps(): _com_github_zeromq_cppzmq() _com_github_zeromq_libzmq() - _com_github_log4cplus_log4cplus() _com_github_open_source_parsers_jsoncpp() @@ -133,19 +132,6 @@ def _com_github_zeromq_libzmq(): ], ) -def _com_github_log4cplus_log4cplus(): - maybe( - http_archive, - name = "com_github_log4cplus_log4cplus", - build_file = "@psi//bazel:log4cplus.BUILD", - strip_prefix = "log4cplus-2.1.1", - sha256 = "42dc435928917fd2f847046c4a0c6086b2af23664d198c7fc1b982c0bfe600c1", - type = ".tar.gz", - urls = [ - "https://github.com/log4cplus/log4cplus/releases/download/REL_2_1_1/log4cplus-2.1.1.tar.gz", - ], - ) - def _com_github_open_source_parsers_jsoncpp(): maybe( http_archive, From e6016fdb694291a82a239db6a5ac057aad801137 Mon Sep 17 00:00:00 2001 From: anakinxc Date: Sat, 28 Dec 2024 22:34:58 +0800 Subject: [PATCH 4/7] Format --- bazel/repositories.bzl | 1 - 1 file changed, 1 deletion(-) diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index 203e46a..9eb2270 100644 --- a/bazel/repositories.bzl +++ b/bazel/repositories.bzl @@ -27,7 +27,6 @@ def psi_deps(): _com_github_zeromq_libzmq() _com_github_open_source_parsers_jsoncpp() - def _com_github_microsoft_apsi(): maybe( http_archive, From e30c34b4d8b02e17112da1775c8115ee20d4981a Mon Sep 17 00:00:00 2001 From: anakinxc Date: Mon, 30 Dec 2024 19:40:00 +0800 Subject: [PATCH 5/7] Upgrade xcode --- .circleci/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/test.yml b/.circleci/test.yml index 8aa4d85..befb87f 100644 --- a/.circleci/test.yml +++ b/.circleci/test.yml @@ -78,7 +78,7 @@ jobs: - build_and_test macos_ut: macos: - xcode: 15.1.0 + xcode: 16.2.0 resource_class: macos.m1.large.gen1 steps: - checkout From 6712f314be506bd43939211c5dbaee384e8fc034 Mon Sep 17 00:00:00 2001 From: anakinxc Date: Mon, 30 Dec 2024 19:48:14 +0800 Subject: [PATCH 6/7] try... --- MODULE.bazel | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MODULE.bazel b/MODULE.bazel index 534d2bd..1acfcad 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -50,10 +50,10 @@ bazel_dep(name = "libdivide", version = "5.0") bazel_dep(name = "emp-tool", version = "0.2.5") bazel_dep(name = "sparsehash", version = "2.0.4") bazel_dep(name = "sse2neon", version = "1.7.0-20240330-8df2f48") -bazel_dep(name = "seal", version = "4.1.1") bazel_dep(name = "zstd", version = "1.5.6") bazel_dep(name = "microsoft_gsl", version = "4.0.0") bazel_dep(name = "log4cplus", version = "2.1.1") +bazel_dep(name = "seal", version = "4.1.1") # non mododule dependencies non_module_dependencies = use_extension("//bazel:defs.bzl", "non_module_dependencies") From d0c3d955694de9f35ddc568a6416a12714792507 Mon Sep 17 00:00:00 2001 From: anakinxc Date: Mon, 30 Dec 2024 20:50:47 +0800 Subject: [PATCH 7/7] Update modules' name --- MODULE.bazel | 2 +- bazel/microsoft_apsi.BUILD | 2 +- bazel/microsoft_kuku.BUILD | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index 1acfcad..8bb094d 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -51,7 +51,7 @@ bazel_dep(name = "emp-tool", version = "0.2.5") bazel_dep(name = "sparsehash", version = "2.0.4") bazel_dep(name = "sse2neon", version = "1.7.0-20240330-8df2f48") bazel_dep(name = "zstd", version = "1.5.6") -bazel_dep(name = "microsoft_gsl", version = "4.0.0") +bazel_dep(name = "gsl", version = "4.0.0") bazel_dep(name = "log4cplus", version = "2.1.1") bazel_dep(name = "seal", version = "4.1.1") diff --git a/bazel/microsoft_apsi.BUILD b/bazel/microsoft_apsi.BUILD index fd7fa97..674072b 100644 --- a/bazel/microsoft_apsi.BUILD +++ b/bazel/microsoft_apsi.BUILD @@ -35,7 +35,7 @@ cmake( out_static_libs = ["libapsi-0.11.a"], deps = [ "@log4cplus//:log4cplus", - "@microsoft_gsl//:Microsoft.GSL", + "@gsl//:Microsoft.GSL", "@com_github_open_source_parsers_jsoncpp//:jsoncpp", "@com_github_zeromq_cppzmq//:cppzmq", "@com_google_flatbuffers//:FlatBuffers", diff --git a/bazel/microsoft_kuku.BUILD b/bazel/microsoft_kuku.BUILD index c16dbf4..ef74950 100644 --- a/bazel/microsoft_kuku.BUILD +++ b/bazel/microsoft_kuku.BUILD @@ -33,5 +33,5 @@ cmake( lib_source = "@kuku//:all", out_include_dir = "include/Kuku-2.1", out_static_libs = ["libkuku-2.1.a"], - deps = ["@microsoft_gsl//:Microsoft.GSL"], + deps = ["@gsl//:Microsoft.GSL"], )