kste / cryptosmt

An easy to use tool for cryptanalysis of symmetric primitives based on SMT/SAT solvers.
MIT License
89 stars 36 forks source link

"docker build -t cryptosmt ."cannot be executed #15

Closed Ririkosann closed 2 years ago

Ririkosann commented 2 years ago

My name is Riko and I am a graduate student in Japan. I'm planning to use this tool for my research. When I built the dockerfile on wsl2 kali linux, I got the following error. Is there a solution to this problem?

┌──(xxx㉿LAPTOP-Q28HUGQ8)-[/mnt/c/users/xxxx/desktop/cryptosmt-master/cryptosmt-master/docker] [+] Building 2.6s (10/27) => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 38B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [internal] load metadata for docker.io/library/debian:latest 2.0s => [ 1/24] FROM docker.io/library/debian:latest@sha256:2906804d2a64e8a13a434a1a127fe3f6a28bf7cf3696be4223b06276f 0.0s => CACHED [ 2/24] RUN apt-get update && apt-get install -y git build-essential cmake wget curl 0.0s => CACHED [ 3/24] WORKDIR /home/tools/ 0.0s => CACHED [ 4/24] RUN git clone https://github.com/niklasso/minisat && git clone https://github.com/msoos/cr 0.0s => CACHED [ 5/24] WORKDIR /home/tools/minisat 0.0s => CACHED [ 6/24] RUN apt-get install -y zlib1g-dev 0.0s => ERROR [ 7/24] RUN make && make install 0.6s

[ 7/24] RUN make && make install:

10 0.412 Compiling: build/release/minisat/simp/Main.o

10 0.447 In file included from minisat/simp/Main.cc:26:

10 0.447 ./minisat/utils/Options.h:285:29: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]

10 0.447 285 | fprintf(stderr, "%4"PRIi64, range.begin);

10 0.447 | ^

10 0.447 ./minisat/utils/Options.h:291:29: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]

10 0.447 291 | fprintf(stderr, "%4"PRIi64, range.end);

10 0.447 | ^

10 0.447 ./minisat/utils/Options.h:293:25: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]

10 0.447 293 | fprintf(stderr, "] (default: %"PRIi64")\n", value);

10 0.447 | ^

10 0.503 In file included from ./minisat/core/Dimacs.h:27,

10 0.503 from minisat/simp/Main.cc:27:

10 0.503 ./minisat/core/SolverTypes.h:55:16: error: friend declaration of 'Minisat::Lit mkLit(Minisat::Var, bool)' specifies default arguments and isn't a definition [-fpermissive]

10 0.503 55 | friend Lit mkLit(Var var, bool sign = false);

10 0.503 | ^~~~~

10 0.503 ./minisat/core/SolverTypes.h:63:14: error: friend declaration of 'Minisat::Lit Minisat::mkLit(Minisat::Var, bool)' specifies default arguments and isn't the only declaration [-fpermissive]

10 0.503 63 | inline Lit mkLit (Var var, bool sign) { Lit p; p.x = var + var + (int)sign; return p; }

10 0.503 | ^~~~~

10 0.503 ./minisat/core/SolverTypes.h:55:16: note: previous declaration of 'Minisat::Lit Minisat::mkLit(Minisat::Var, bool)'

10 0.503 55 | friend Lit mkLit(Var var, bool sign = false);

10 0.503 | ^~~~~

10 0.542 make: *** [Makefile:129: build/release/minisat/simp/Main.o] Error 1


executor failed running [/bin/sh -c make && make install]: exit code: 2

nivi1501 commented 2 years ago

I am facing the same issue. Did you find any fix for this error?

janoglezcampos commented 2 years ago

Hello, I found the problem is with the repo niklasso/minisat, wich is no updated and doesnt build with modern compilers, changing the repo on the Dockerfile to an updated fork fix the problem. I choose agurfinkel/minisat, since it only does modifications to fix the compiler.

janoglezcampos commented 2 years ago

So: open docker/Dockerfile, find niklasso and replace it with agurfinkel or any other user who forked and fixed the compilation errors on minisat @kste could you please fix it with a commit, I think forking editing... is not worth for a word change

kste commented 2 years ago

I pulled in the updated minisat repo now, which should fix this issue. Let me know if you still have build issues!