Open HaroldGin931 opened 1 week ago
Hey thanks @HaroldGin931 for providing the dockerfile, I added
line ENV DEBIAN_FRONTEND noninteractive
otherwise it would stuck on asking the geographic area.
I can build the image, but unfortunately it gives me linking error when I try to build openfhe-rs/crate_usage
:
CXX include path:
/openfhe-rs/crate_usage/target/debug/build/openfhe-54143b84db2888a8/out/cxxbridge/include
/openfhe-rs/crate_usage/target/debug/build/openfhe-54143b84db2888a8/out/cxxbridge/crate
error occurred: Command "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-m64" "-I" "/openfhe-rs/crate_usage/target/debug/build/openfhe-54143b84db2888a8/out/cxxbridge/include" "-I" "/openfhe-rs/crate_usage/target/debug/build/openfhe-54143b84db2888a8/out/cxxbridge/crate" "-I" "/usr/local/include/openfhe" "-I" "/usr/local/include/openfhe/third-party/include" "-I" "/usr/local/include/openfhe/core" "-I" "/usr/local/include/openfhe/pke" "-I" "/usr/local/include/openfhe/binfhe" "-I" "./openfhe-development/install/include" "-I" "./openfhe-development/install/include/openfhe" "-I" "./openfhe-development/install/include/openfhe/third-party/include" "-I" "./openfhe-development/install/include/openfhe/core" "-I" "./openfhe-development/install/include/openfhe/pke" "-I" "./openfhe-development/install/include/openfhe/binfhe" "-Wall" "-Wextra" "-std=c++17" "-Wall" "-Werror" "-O3" "-fopenmp" "-Wno-parentheses" "-Wno-unused-parameter" "-Wno-missing-field-initializers" "-Wno-unused-function" "-o" "/openfhe-rs/crate_usage/target/debug/build/openfhe-54143b84db2888a8/out/75f31f28ec7a553a-lib.rs.o" "-c" "/openfhe-rs/crate_usage/target/debug/build/openfhe-54143b84db2888a8/out/cxxbridge/sources/openfhe/src/lib.rs.cc" with args c++ did not execute successfully (status code exit status: 1).
Do you know what might be the problem? Thanks in advance!
@JacomoJ
I am not sure about your issue, can you provide me the setting of your docker engine and you laptops' chip arch? If using an M1 Mac, ensure Rosetta 2 is enabled to support x86_64 emulation Here is how I use this docker file, I hope it will help you.
docker build -t openfhe-rs -f .devcontainer/Dockerfile .
docker run -it --rm --platform linux/amd64 -v $(pwd):/workspace -w /workspace openfhe-rs bash
The repo which commitment is"445bc396d77fc838e1c599b1fc4d2badd71fa931" is working well on my M1 chip, you can find it in the commit history.
@HaroldGin931 Thanks for the tips, unfortunately it does not work. I have an M1 Pro chip, and the docker has been configured with the following:
{
"builder": {
"gc": {
"defaultKeepStorage": "20GB",
"enabled": true
}
},
"experimental": false
}
I tried to use the same commit with the same commands, still the crate crate_usage
won't compile.
Btw, I saw that you are doing some cool stuff, if you want you can add me on discord by searching jacomoj and we can have some discussions about crypto.
Hey, I am trying to deploy this project on my Mac. Because the chip architecture is different, I can not build this project on my laptop. So I write a dockerfile to simulate the X86 env and now it works well, hope this can help you guys.