Closed entrust-albert closed 1 year ago
The key part of the error message appears to be
CMake Error at CMakeLists.txt:377 (message): Autoconf is not installed.
Could you try adding autoconf
to the apt-get install
command in the Dockerfile and see if that works?
Just looking at that list of installed packages, though, I suspect there may be some other packages missing. I can take a look as well.
Hi, thanks for the response. I tried installing autoconf
as you mentioned, but now I seem to have another issue regarding a file that is not found:
./src/misc/util/utilDouble.h:182:10: warning: unused variable 'ten100' [-Wunused-variable]
182 | xdbl ten100 = Xdbl_FromDouble( 1e100 );
| ^~~~~~
`` Compiling: /src/base/exor/exorUtil.c
src/base/main/mainUtils.c: At top level:
src/base/main/mainUtils.c:25:10: fatal error: readline/readline.h: No such file or directory
25 | #include <readline/readline.h>
| ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:176: src/base/main/mainUtils.o] Error 1
make: *** Waiting for unfinished jobs....
`` Compiling: /src/base/ver/verCore.c
src/base/exor/exorUtil.c: In function 'WriteResultIntoFile':
src/base/exor/exorUtil.c:192:9: warning: argument 4 null where non-null expected [-Wnonnull]
192 | fprintf( pFile, "\n\nCannot open the output file\n" );
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/base/exor/exorUtil.c:192:9: note: in a call to built-in function '__builtin_fwrite'
src/base/abci/abc.c: In function 'Abc_CommandAbc9Cone':
src/base/abci/abc.c:43683:34: warning: '%0*d' directive writing between 1 and 2147483647 bytes into a region of size 999 [-Wformat-overflow=]
43683 | sprintf( Buffer, "%s_%0*d.aig", Extra_FileNameGeneric(pAbc->pGia->pSpec), nDigits, i );
| ^~~~
src/base/abci/abc.c:43683:30: note: directive argument in the range [0, 2147483647]
43683 | sprintf( Buffer, "%s_%0*d.aig", Extra_FileNameGeneric(pAbc->pGia->pSpec), nDigits, i );
| ^~~~~~~~~~~~~
In file included from /usr/include/stdio.h:867,
from ./src/base/abc/abc.h:29,
from src/base/abci/abc.c:21:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: '__builtin___sprintf_chk' output 7 or more bytes (assuming 2147483653) into a destination of size 1000
36 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: Leaving directory '/root/.cache/bazel/_bazel_root/595596dc4dacd40e54f4e8ca596c8a84/sandbox/processwrapper-sandbox/4517/execroot/com_google_fully_homomorphic_encryption/bazel-out/k8-opt-exec-2B5CBBC6/bin/external/abc/abc.build_tmpdir'
_____ END BUILD LOGS _____
rules_foreign_cc: Build wrapper script location: bazel-out/k8-opt-exec-2B5CBBC6/bin/external/abc/abc_foreign_cc/wrapper_build_script.sh
rules_foreign_cc: Build script location: bazel-out/k8-opt-exec-2B5CBBC6/bin/external/abc/abc_foreign_cc/build_script.sh
rules_foreign_cc: Build log location: bazel-out/k8-opt-exec-2B5CBBC6/bin/external/abc/abc_foreign_cc/Make.log
INFO: Elapsed time: 3094.346s, Critical Path: 209.52s
INFO: 4788 processes: 221 internal, 4567 processwrapper-sandbox.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully
The command '/bin/sh -c bazel build --verbose_failures --sandbox_debug ...' returned a non-zero code: 1
I had a similar problem when setting up a new machine (not using Docker though).
It ends up that there is another dependency not listed in the README.md files.
if you look close you see the failure is that it cannot find readline/readline.h
:
src/base/main/mainUtils.c:25:10: fatal error: readline/readline.h: No such file or directory
25 | #include <readline/readline.h>
On my ubuntu machine I fix this with:
sudo apt install libreadline-dev
@j2kun might want to update the README.md files in transpiler directory.
Thanks for the tip, @davidbrucecousins !
Working on this today. Also working on upgrading the docker image so that we don't need to build LLVM from scratch.
Note to self: https://github.com/grailbio/bazel-toolchain/issues/162
I submitted a patch for this issue but it won't be live until after it gets reviewed internally, likely early next week. The issue in https://github.com/google/fully-homomorphic-encryption/issues/30#issuecomment-1322633357 was not fixed yet, but in the mean time the docker container should still build with the way LLVM is currently configured in the workspace file.
The dockerfile you can use until that change is merged:
# To build and run:
#
# docker build -t google-fhe-transpiler -f docker/debian-bullseye.Dockerfile .
# docker run --rm -i -t google-fhe-transpiler bash
FROM debian:bullseye-20220527
RUN apt-get update && apt-get install -y \
gcc \
git \
libtinfo5 \
python \
python3 \
python3-pip \
autoconf \
libreadline-dev \
flex \
bison \
wget
# Install deps required to install LLVM
RUN apt-get install -y \
lsb-release \
software-properties-common \
gnupg
RUN wget -O llvm.sh https://apt.llvm.org/llvm.sh \
&& chmod +x llvm.sh \
# It's critical that this version matches the version specified in
# llvm_toolchain in the WORKSPACE file.
&& ./llvm.sh 13
# Install bazel
RUN wget -O bazel "https://github.com/bazelbuild/bazel/releases/download/5.3.2/bazel-5.3.2-linux-x86_64" \
&& test "973e213b1e9207ccdd3ea4730c0f92cbef769ec112ac2b84980583220d8db845 bazel" = "$(sha256sum bazel)" \
&& chmod +x bazel \
&& mv bazel /bin/bazel
WORKDIR /usr/src/fhe/
COPY . .
RUN bazel build ...
Give it a try and let me know if it doesn't work!
I was never able to get the docker configuration to work, I always built the other way.
On Mon, Nov 28, 2022, 4:01 PM Jeremy Kun @.***> wrote:
Give it a try and let me know if it doesn't work!
— Reply to this email directly, view it on GitHub https://github.com/google/fully-homomorphic-encryption/issues/30#issuecomment-1329756137, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ3E6YPV5F2O6CBS4MCX373WKUMUPANCNFSM6AAAAAAROYN6SQ . You are receiving this because you were mentioned.Message ID: @.***>
Hello, I am trying to build the project using Docker. I am consistently getting an error during build time, which surprises me since Docker is usually very reliable for this kind of building tasks. I added the
--verbose_failures
and--sandbox_debug
flags in the Dockerifle (line 38) for debugging purposes.I get the following error: