pepper-project / pequin

A system for verifying outsourced computations, and applying SNARKs. Simplified release of the main Pepper codebase.
Other
122 stars 46 forks source link

Docker installation-- docker script seems to have trouble with dependencies. #48

Open danxinnoble opened 5 years ago

danxinnoble commented 5 years ago

I wanted to try installing pequin to run within a docker. It seemed from the readme I should be able to do this just as: $ sudo bash ./build_docker.sh

But, after getting part-way, it breaks down around the point where it is installing the kyotocabinet dependency.

Is it possible to build pequin within a docker? If so, am I doing it the wrong way, or is this a bug?

I'm running on Ubuntu 16.04.5. I'm using Docker version 18.06.1-ce, build e68fc7a.

The error message is below:

if uname -a | egrep -i 'SunOS' > /dev/null ; \ then \ g++ -march=native -m64 -g -O2 -Wall -fPIC -fsigned-char -g0 -O2 -Wno-unused-but-set-variable -Wno-unused-but-set-parameter -shared -Wl,-G,-h,libkyotocabinet.so.16 -o libkyotocabinet.so.16.13.0 \ kcutil.o kcthread.o kcfile.o kccompress.o kccompare.o kcmap.o kcregex.o kcdb.o kcplantdb.o kcprotodb.o kcstashdb.o kccachedb.o kchashdb.o kcdirdb.o kctextdb.o kcpolydb.o kcdbext.o kclangc.o -L. -L/ root/pepper_deps/lib -L/usr/local/lib -Wl,-rpath-link,.:/usr/local/lib:.:/usr/local/lib: -Wl,--as-needed -lz -lstdc++ -lrt -lpthread -lm -lc ; \ else \ g++ -march=native -m64 -g -O2 -Wall -fPIC -fsigned-char -g0 -O2 -Wno-unused-but-set-variable -Wno-unused-but-set-parameter -shared -Wl,-soname,libkyotocabinet.so.16 -o libkyotocabinet.so.16.13.0 \ kcutil.o kcthread.o kcfile.o kccompress.o kccompare.o kcmap.o kcregex.o kcdb.o kcplantdb.o kcprotodb.o kcstashdb.o kccachedb.o kchashdb.o kcdirdb.o kctextdb.o kcpolydb.o kcdbext.o kclangc.o -L. -L/ root/pepper_deps/lib -L/usr/local/lib -Wl,-rpath-link,.:/usr/local/lib:.:/usr/local/lib: -Wl,--as-needed -lz -lstdc++ -lrt -lpthread -lm -lc ; \ fi /usr/bin/ld: kcutil.o: unrecognized relocation (0x2a) in section `.text' /usr/bin/ld: final link failed: Bad value collect2: error: ld returned 1 exit status Makefile:1033: recipe for target 'libkyotocabinet.so.16.13.0' failed make: ** [libkyotocabinet.so.16.13.0] Error 1 The command '/bin/sh -c cd $PEQUIN/thirdparty && ./install_pepper_deps.sh && cd $PEQUIN && ./install_buffet.sh && mv $PEQUIN/thirdparty/libsnark /tmp && rm -rf $PEQUIN/thirdparty/ && mv /tmp /libsnark $PEQUIN/thirdparty/ && rm -rf $PEQUIN/compiler/buffetfsm/llvm $PEQUIN/compiler/buffetfsm/llvm-build' returned a non-zero code: 2

maxhowald commented 5 years ago

I wasn't able to reproduce your error with Docker 18.09.1 on macOS, but I haven't tried it on Ubuntu. The version of kyotocabinet (and other dependencies) we have archived is pretty old, so it's possible that things break with newer compilers.

Building without Docker is supported on Ubuntu 14.04 and 16.04. You can try running the install_debian_ubuntu.sh script or install the apt packages it lists manually, and then run the install_pepper_deps.sh script, which will install some dependencies into a folder in your home directory. INSTALLING.md has more details. Please let us know if you try this and get a similar (or different) error!