Skip to content

Commit

Permalink
fix undefined symbol: s_mp_rand_source
Browse files Browse the repository at this point in the history
  • Loading branch information
dterazhao committed Nov 15, 2024
1 parent 9c41713 commit f5d7f4c
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 231 deletions.
49 changes: 1 addition & 48 deletions native/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@
<!-- additional link paths in case of a full native build -->
<linkPath>${native.lib.src.dir}</linkPath>
<linkPath>${native.lib.src.dir}/heu</linkPath>
<linkPath>${native.lib.external.dir}/com_github_libtom_libtommath/libtommath/lib</linkPath>
<!--<linkPath>${native.lib.external.dir}/com_dtera_heu</linkPath>
<linkPath>${native.lib.external.dir}/com_github_blake3team_blake3</linkPath>
<linkPath>${native.lib.external.dir}/com_github_fmtlib_fmt</linkPath>
Expand All @@ -191,54 +192,6 @@
<linkPath>${native.lib.external.dir}/org_interconnection</linkPath>
<linkPath>${native.lib.external.dir}/yacl</linkPath>
<linkPath>${native.lib.external.dir}/zlib</linkPath>-->
<!--<linkPath>${native.lib.external.dir}/com_dtera_heu/heu/library/algorithms/dgk</linkPath>
<linkPath>${native.lib.external.dir}/com_dtera_heu/heu/library/algorithms/dj</linkPath>
<linkPath>${native.lib.external.dir}/com_dtera_heu/heu/library/algorithms/elgamal</linkPath>
<linkPath>${native.lib.external.dir}/com_dtera_heu/heu/library/algorithms/elgamal/utils
</linkPath>
<linkPath>${native.lib.external.dir}/com_dtera_heu/heu/library/algorithms/mock</linkPath>
<linkPath>${native.lib.external.dir}/com_dtera_heu/heu/library/algorithms/ou</linkPath>
<linkPath>${native.lib.external.dir}/com_dtera_heu/heu/library/algorithms/paillier_float
</linkPath>
<linkPath>${native.lib.external.dir}/com_dtera_heu/heu/library/algorithms/paillier_ic</linkPath>
<linkPath>${native.lib.external.dir}/com_dtera_heu/heu/library/algorithms/paillier_zahlen
</linkPath>
<linkPath>${native.lib.external.dir}/com_dtera_heu/heu/library/phe</linkPath>
<linkPath>${native.lib.external.dir}/com_dtera_heu/heu/library/phe/base</linkPath>
<linkPath>${native.lib.external.dir}/com_dtera_heu/heu/library/phe/encoding</linkPath>
<linkPath>${native.lib.external.dir}/com_github_blake3team_blake3</linkPath>
<linkPath>${native.lib.external.dir}/com_github_gabime_spdlog/spdlog/lib</linkPath>
<linkPath>${native.lib.external.dir}/com_github_gflags_gflags</linkPath>
<linkPath>${native.lib.external.dir}/com_github_google_benchmark</linkPath>
<linkPath>${native.lib.external.dir}/com_github_herumi_mcl/mcl-cmake/lib</linkPath>
<linkPath>${native.lib.external.dir}/com_github_libsodium</linkPath>
<linkPath>${native.lib.external.dir}/com_github_libtom_libtommath/libtommath/lib</linkPath>
<linkPath>${native.lib.external.dir}/com_github_microsoft_FourQlib/FourQlib/lib</linkPath>
<linkPath>${native.lib.external.dir}/com_github_openssl_openssl/openssl/lib</linkPath>
<linkPath>${native.lib.external.dir}/com_google_absl/absl/base</linkPath>
<linkPath>${native.lib.external.dir}/com_google_absl/absl/debugging</linkPath>
<linkPath>${native.lib.external.dir}/com_google_absl/absl/numeric</linkPath>
<linkPath>${native.lib.external.dir}/com_google_absl/absl/strings</linkPath>
<linkPath>${native.lib.external.dir}/com_google_absl/absl/types</linkPath>
<linkPath>${native.lib.external.dir}/com_google_googletest</linkPath>
<linkPath>${native.lib.external.dir}/com_google_protobuf</linkPath>
<linkPath>${native.lib.external.dir}/gmp/gmp/lib</linkPath>
<linkPath>${native.lib.external.dir}/org_interconnection/interconnection/runtime</linkPath>
<linkPath>${native.lib.external.dir}/yacl/yacl</linkPath>
<linkPath>${native.lib.external.dir}/yacl/yacl/base</linkPath>
<linkPath>${native.lib.external.dir}/yacl/yacl/crypto</linkPath>
<linkPath>${native.lib.external.dir}/yacl/yacl/crypto/ecc</linkPath>
<linkPath>${native.lib.external.dir}/yacl/yacl/crypto/ecc/FourQlib</linkPath>
<linkPath>${native.lib.external.dir}/yacl/yacl/crypto/ecc/libsodium</linkPath>
<linkPath>${native.lib.external.dir}/yacl/yacl/crypto/ecc/mcl</linkPath>
<linkPath>${native.lib.external.dir}/yacl/yacl/crypto/ecc/openssl</linkPath>
<linkPath>${native.lib.external.dir}/yacl/yacl/crypto/ecc/toy</linkPath>
<linkPath>${native.lib.external.dir}/yacl/yacl/crypto/hash</linkPath>
<linkPath>${native.lib.external.dir}/yacl/yacl/math/mpint</linkPath>
<linkPath>${native.lib.external.dir}/yacl/yacl/utils</linkPath>
<linkPath>${native.lib.external.dir}/yacl/yacl/utils/spi</linkPath>
<linkPath>${native.lib.external.dir}/yacl/yacl/utils/spi/argument</linkPath>
<linkPath>${native.lib.external.dir}/zlib</linkPath>-->
</linkPaths>
<resourcePaths>
<resourcePath>${project.basedir}/../</resourcePath>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
package cn.cstn.algorithm.javacpp.heu;

import cn.cstn.algorithm.javacpp.preset.heu;
import org.bytedeco.javacpp.Loader;
import org.bytedeco.javacpp.Pointer;
import org.bytedeco.javacpp.annotation.Namespace;
import org.bytedeco.javacpp.annotation.Properties;
import org.bytedeco.javacpp.annotation.Platform;

@SuppressWarnings("unused")
@Properties(inherit = heu.class)
@Platform(
value = {"linux", "macosx", "windows"},
compiler = "cpp17",
include = {
"heu/library/phe/base/serializable_types.h",
},
define = {"MSGPACK_NO_BOOST", "SPDLOG_FMT_EXTERNAL", "SPDLOG_NO_TLS"}
)
@Namespace("heu::lib::phe")
public class Ciphertext extends Pointer {
static {
Expand Down
13 changes: 10 additions & 3 deletions native/src/main/java/cn/cstn/algorithm/javacpp/heu/PheKit.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
package cn.cstn.algorithm.javacpp.heu;

import cn.cstn.algorithm.javacpp.preset.heu;
import org.bytedeco.javacpp.Loader;
import org.bytedeco.javacpp.Pointer;
import org.bytedeco.javacpp.annotation.ByRef;
import org.bytedeco.javacpp.annotation.Const;
import org.bytedeco.javacpp.annotation.Properties;
import org.bytedeco.javacpp.annotation.Platform;

@SuppressWarnings("unused")
@Properties(inherit = heu.class)
@Platform(
value = {"linux", "macosx", "windows"},
compiler = "cpp17",
include = {
"heu/phe_kit.h",
},
link = {"phe_kit_all", "tommath"},
define = {"MSGPACK_NO_BOOST", "SPDLOG_FMT_EXTERNAL", "SPDLOG_NO_TLS"}
)
public class PheKit extends Pointer {
static {
Loader.load();
Expand Down
177 changes: 0 additions & 177 deletions native/src/main/java/cn/cstn/algorithm/javacpp/preset/heu.java

This file was deleted.

0 comments on commit f5d7f4c

Please sign in to comment.