mit-pdos / noria

Fast web applications through dynamic, partially-stateful dataflow
Apache License 2.0
4.98k stars 242 forks source link

How to install/setup? #138

Closed CreatCodeBuild closed 4 years ago

CreatCodeBuild commented 4 years ago

I tried to follow the document but was stopped by Zookeeper. How to setup zookeeper? May I have some resource to tutorials to follow?

jonathanGB commented 4 years ago

Once you have installed zookeeper, you should be able to launch it with zkServer start. The default port of zookeeper matches the default port that noria assumes, so it should be good to go from there. Did you have another problem?

CreatCodeBuild commented 4 years ago

Thanks, let me try it.

CreatCodeBuild commented 4 years ago

I am trying to build Noria but get error: failed to run custom build command forjemalloc-sys v0.3.2`. This is the log

root@19f6aa172323:~/noria# cargo build --release --bin noria-server
   Compiling libc v0.2.62
   Compiling cfg-if v0.1.9
   Compiling spin v0.5.2
   Compiling semver-parser v0.7.0
   Compiling either v1.5.2
   Compiling futures v0.1.28
   Compiling log v0.4.8
   Compiling byteorder v1.3.2
   Compiling scopeguard v1.0.0
   Compiling autocfg v0.1.6
   Compiling arrayvec v0.4.11
   Compiling nodrop v0.1.13
   Compiling proc-macro2 v1.0.2
   Compiling unicode-xid v0.2.0
   Compiling syn v1.0.5
   Compiling slab v0.4.2
   Compiling rayon-core v1.6.0
   Compiling rand_core v0.4.2
   Compiling serde v1.0.99
   Compiling fnv v1.0.6
   Compiling proc-macro2 v0.4.30
   Compiling unicode-xid v0.1.0
   Compiling stable_deref_trait v1.1.1
   Compiling smallvec v0.6.10
   Compiling memchr v2.2.1
   Compiling scopeguard v0.3.3
   Compiling syn v0.15.44
   Compiling version_check v0.1.5
   Compiling failure_derive v0.1.5
   Compiling rustc-demangle v0.1.16
   Compiling regex-syntax v0.6.12
   Compiling bitflags v1.1.0
   Compiling glob v0.3.0
   Compiling quick-error v1.2.2
   Compiling unicode-width v0.1.6
   Compiling ansi_term v0.11.0
   Compiling itoa v0.4.4
   Compiling getrandom v0.1.11
   Compiling bindgen v0.49.2
   Compiling termcolor v1.0.5
   Compiling indexmap v1.1.0
   Compiling strsim v0.8.0
   Compiling ryu v1.0.0
   Compiling slog v2.5.2
   Compiling peeking_take_while v0.1.2
   Compiling shlex v0.1.1
   Compiling httparse v1.3.4
   Compiling fs_extra v1.1.0
   Compiling ppv-lite86 v0.2.5
   Compiling try-lock v0.2.2
   Compiling lazycell v1.2.1
   Compiling snowflake v1.3.0
   Compiling fixedbitset v0.1.9
   Compiling ordermap v0.3.5
   Compiling remove_dir_all v0.5.2
   Compiling utf8-ranges v1.0.4
   Compiling nix v0.14.1
   Compiling void v1.0.2
   Compiling timer_heap v0.3.0
   Compiling lazy_static v1.4.0
   Compiling semver v0.9.0
   Compiling itertools v0.8.0
   Compiling rand_pcg v0.1.2
   Compiling rand_chacha v0.1.1
   Compiling rand v0.6.5
   Compiling num-traits v0.2.8
   Compiling num-integer v0.1.41
   Compiling bincode v1.1.4
   Compiling rand_core v0.3.1
   Compiling rand_jitter v0.1.4
   Compiling owning_ref v0.4.0
   Compiling tokio-sync v0.1.6
   Compiling tower-service v0.2.0
   Compiling stream-cancel v0.4.4
   Compiling streamunordered v0.4.1
   Compiling humantime v1.2.0
   Compiling textwrap v0.11.0
   Compiling nom v4.2.3
   Compiling evmap v6.0.1 (https://github.com/jonhoo/rust-evmap?branch=indexmap#41cc7f8c)
   Compiling clang-sys v0.28.1
   Compiling crossbeam-utils v0.6.6
   Compiling thread_local v0.3.6
   Compiling tracing-core v0.1.5
   Compiling c2-chacha v0.2.2
   Compiling rustc_version v0.2.3
   Compiling rand_hc v0.1.0
   Compiling rand_isaac v0.1.1
   Compiling rand_xorshift v0.1.1
   Compiling lock_api v0.1.5
   Compiling lock_api v0.3.1
   Compiling tower-layer v0.1.0
   Compiling tower-discover v0.1.0
   Compiling crossbeam-queue v0.1.2
   Compiling tokio-executor v0.1.8
   Compiling crossbeam-channel v0.3.9
   Compiling want v0.2.0
   Compiling tracing-log v0.1.0
   Compiling fxhash v0.2.1
   Compiling regex-automata v0.1.8
   Compiling quote v1.0.2
   Compiling num_cpus v1.10.1
   Compiling iovec v0.1.2
   Compiling rand_os v0.1.3
   Compiling net2 v0.2.33
   Compiling atty v0.2.13
   Compiling time v0.1.42
   Compiling dirs v1.0.5
   Compiling timekeeper v0.3.2
   Compiling hostname v0.1.5
   Compiling memoffset v0.5.1
   Compiling parking_lot_core v0.4.0
   Compiling hyper v0.12.33
   Compiling parking_lot_core v0.6.2
   Compiling parking_lot v0.9.0
   Compiling tower-load-shed v0.1.0
   Compiling aho-corasick v0.7.6
   Compiling quote v0.6.13
   Compiling tokio-timer v0.2.11
   Compiling tokio-current-thread v0.1.6
   Compiling matchers v0.0.1
   Compiling futures-cpupool v0.1.8
   Compiling bytes v0.4.12
   Compiling mio v0.6.19
   Compiling term v0.5.2
   Compiling rand_core v0.5.1
   Compiling syn v0.14.9
   Compiling tower-load v0.1.0 (https://github.com/tower-rs/tower.git#793e2e8e)
   Compiling tower-limit v0.1.0
   Compiling tower-timeout v0.1.1
   Compiling tower-retry v0.1.0
   Compiling cexpr v0.3.5
   Compiling regex v1.3.1
   Compiling tokio-io v0.1.12
   Compiling http v0.1.18
   Compiling tokio-buf v0.1.1
   Compiling string v0.2.1
   Compiling mio-uds v0.6.7
   Compiling mio-extras v2.0.5
   Compiling rand_chacha v0.2.1
   Compiling synstructure v0.10.2
   Compiling env_logger v0.6.2
   Compiling tokio-codec v0.1.1
   Compiling tower-util v0.1.0
   Compiling bufstream v0.1.4
   Compiling http-body v0.1.0
   Compiling h2 v0.1.26
   Compiling crossbeam-epoch v0.7.2
   Compiling parking_lot v0.7.1
   Compiling rand v0.7.0
   Compiling zookeeper_derive v0.4.0
   Compiling crossbeam-deque v0.7.1
   Compiling tokio-reactor v0.1.9
   Compiling tempfile v3.1.0
   Compiling tokio-threadpool v0.1.15
   Compiling crossbeam v0.7.2
   Compiling tokio-udp v0.1.5
   Compiling tokio-uds v0.2.5
   Compiling tokio-tcp v0.1.3
   Compiling tokio-os-timer v0.1.7
   Compiling zookeeper v0.5.7
   Compiling rayon v1.2.0
   Compiling tokio-fs v0.1.6
   Compiling tokio v0.1.22
   Compiling tokio-io-pool v0.1.6
   Compiling cc v1.0.41
   Compiling backtrace-sys v0.1.31
   Compiling libloading v0.5.2
   Compiling jemalloc-sys v0.3.2
   Compiling serde_derive v1.0.99
   Compiling tracing-attributes v0.1.2
error: failed to run custom build command for `jemalloc-sys v0.3.2`

Caused by:
  process didn't exit successfully: `/root/noria/target/release/build/jemalloc-sys-b864719328547290/build-script-build` (exit code: 101)
--- stdout
TARGET=x86_64-unknown-linux-gnu
HOST=x86_64-unknown-linux-gnu
NUM_JOBS=6
OUT_DIR="/root/noria/target/release/build/jemalloc-sys-14bf0adab7d71d07/out"
BUILD_DIR="/root/noria/target/release/build/jemalloc-sys-14bf0adab7d71d07/out/build"
SRC_DIR="/root/.cargo/registry/src/github.com-1ecc6299db9ec823/jemalloc-sys-0.3.2"
OPT_LEVEL = Some("3")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
CC_x86_64-unknown-linux-gnu = None
CC_x86_64_unknown_linux_gnu = None
HOST_CC = None
CC = None
CFLAGS_x86_64-unknown-linux-gnu = None
CFLAGS_x86_64_unknown_linux_gnu = None
HOST_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("true")
CARGO_CFG_TARGET_FEATURE = Some("fxsr,mmx,sse,sse2")
CC="cc"
CFLAGS="-O3 -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -Wall"
JEMALLOC_REPO_DIR="jemalloc"
JEMALLOC_SRC_DIR="/root/noria/target/release/build/jemalloc-sys-14bf0adab7d71d07/out/jemalloc"
cargo:rustc-cfg=prefixed
--with-jemalloc-prefix=_rjem_
running: "sh" "/root/noria/target/release/build/jemalloc-sys-14bf0adab7d71d07/out/jemalloc/configure" "--disable-cxx" "--with-jemalloc-prefix=_rjem_" "--with-private-namespace=_rjem_" "--host=x86_64-unknown-linux-gnu" "--build=x86_64-unknown-linux-gnu" "--prefix=/root/noria/target/release/build/jemalloc-sys-14bf0adab7d71d07/out"
checking for xsltproc... false
checking for x86_64-unknown-linux-gnu-gcc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking whether compiler is cray... no
checking whether compiler supports -std=gnu11... yes
checking whether compiler supports -Wall... yes
checking whether compiler supports -Wshorten-64-to-32... yes
checking whether compiler supports -Wsign-compare... yes
checking whether compiler supports -Wundef... yes
checking whether compiler supports -Wno-format-zero-length... yes
checking whether compiler supports -pipe... yes
checking whether compiler supports -g3... yes
checking how to run the C preprocessor... cc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether byte ordering is bigendian... no
checking size of void *... 8
checking size of int... 4
checking size of long... 8
checking size of long long... 8
checking size of intmax_t... 8
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking whether pause instruction is compilable... yes
checking number of significant virtual address bits... 48
checking for x86_64-unknown-linux-gnu-ar... no
checking for ar... ar
checking for x86_64-unknown-linux-gnu-nm... no
checking for nm... nm
checking for gawk... no
checking for mawk... mawk
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking whether malloc_usable_size definition can use const argument... no
checking for library containing log... -lm
checking whether __attribute__ syntax is compilable... yes
checking whether compiler supports -fvisibility=hidden... yes
checking whether compiler supports -fvisibility=hidden... no
checking whether compiler supports -Werror... yes
checking whether compiler supports -herror_on_warning... no
checking whether tls_model attribute is compilable... yes
checking whether compiler supports -Werror... yes
checking whether compiler supports -herror_on_warning... no
checking whether alloc_size attribute is compilable... yes
checking whether compiler supports -Werror... yes
checking whether compiler supports -herror_on_warning... no
checking whether format(gnu_printf, ...) attribute is compilable... no
checking whether compiler supports -Werror... yes
checking whether compiler supports -herror_on_warning... no
checking whether format(printf, ...) attribute is compilable... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for x86_64-unknown-linux-gnu-ranlib... no
checking for ranlib... ranlib
checking for ld... /usr/bin/ld
checking for autoconf... false
checking for memalign... yes
checking for valloc... yes
checking whether compiler supports -O3... yes
checking whether compiler supports -O3... no
checking whether compiler supports -funroll-loops... yes
checking configured backtracing method... N/A
checking for sbrk... yes
checking whether utrace(2) is compilable... no
checking whether a program using __builtin_unreachable is compilable... yes
checking whether a program using __builtin_ffsl is compilable... yes
checking LG_PAGE... 12
Missing VERSION file, and unable to generate it; creating bogus VERSION
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for pthread_create in -lpthread... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for dlsym... no
checking for dlsym in -ldl... yes
checking whether pthread_atfork(3) is compilable... yes
checking whether pthread_setname_np(3) is compilable... yes
checking for library containing clock_gettime... none required
checking whether clock_gettime(CLOCK_MONOTONIC_COARSE, ...) is compilable... yes
checking whether clock_gettime(CLOCK_MONOTONIC, ...) is compilable... yes
checking whether mach_absolute_time() is compilable... no
checking whether compiler supports -Werror... yes
checking whether syscall(2) is compilable... yes
checking for secure_getenv... yes
checking for sched_getcpu... yes
checking for sched_setaffinity... yes
checking for issetugid... no
checking for _malloc_thread_cleanup... no
checking for _pthread_mutex_init_calloc_cb... no
checking for TLS... yes
checking whether C11 atomics is compilable... yes
checking whether GCC __atomic atomics is compilable... yes
checking whether GCC __sync atomics is compilable... yes
checking whether Darwin OSAtomic*() is compilable... no
checking whether madvise(2) is compilable... yes
checking whether madvise(..., MADV_FREE) is compilable... yes
checking whether madvise(..., MADV_DONTNEED) is compilable... yes
checking whether madvise(..., MADV_DO[NT]DUMP) is compilable... yes
checking whether madvise(..., MADV_[NO]HUGEPAGE) is compilable... yes
checking whether to force 32-bit __sync_{add,sub}_and_fetch()... no
checking whether to force 64-bit __sync_{add,sub}_and_fetch()... no
checking for __builtin_clz... yes
checking whether Darwin os_unfair_lock_*() is compilable... no
checking whether Darwin OSSpin*() is compilable... no
checking whether glibc malloc hook is compilable... yes
checking whether glibc memalign hook is compilable... yes
checking whether pthreads adaptive mutexes is compilable... yes
checking whether compiler supports -D_GNU_SOURCE... yes
checking whether compiler supports -Werror... yes
checking whether compiler supports -herror_on_warning... no
checking whether strerror_r returns char with gnu source is compilable... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating jemalloc.pc
config.status: creating doc/html.xsl
config.status: creating doc/manpages.xsl
config.status: creating doc/jemalloc.xml
config.status: creating include/jemalloc/jemalloc_macros.h
config.status: creating include/jemalloc/jemalloc_protos.h
config.status: creating include/jemalloc/jemalloc_typedefs.h
config.status: creating include/jemalloc/internal/jemalloc_preamble.h
config.status: creating test/test.sh
config.status: creating test/include/test/jemalloc_test.h
config.status: creating config.stamp
config.status: creating bin/jemalloc-config
config.status: creating bin/jemalloc.sh
config.status: creating bin/jeprof
config.status: creating include/jemalloc/jemalloc_defs.h
config.status: creating include/jemalloc/internal/jemalloc_internal_defs.h
config.status: creating test/include/test/jemalloc_test_defs.h
config.status: executing include/jemalloc/internal/public_symbols.txt commands
config.status: executing include/jemalloc/internal/private_symbols.awk commands
config.status: executing include/jemalloc/internal/private_symbols_jet.awk commands
config.status: executing include/jemalloc/internal/public_namespace.h commands
config.status: executing include/jemalloc/internal/public_unnamespace.h commands
config.status: executing include/jemalloc/internal/size_classes.h commands
config.status: executing include/jemalloc/jemalloc_protos_jet.h commands
config.status: executing include/jemalloc/jemalloc_rename.h commands
config.status: executing include/jemalloc/jemalloc_mangle.h commands
config.status: executing include/jemalloc/jemalloc_mangle_jet.h commands
config.status: executing include/jemalloc/jemalloc.h commands
===============================================================================
jemalloc version   : 0.0.0-0-g0000000000000000000000000000000000000000
library revision   : 2

CONFIG             : --disable-cxx --with-jemalloc-prefix=_rjem_ --with-private-namespace=_rjem_ --host=x86_64-unknown-linux-gnu --build=x86_64-unknown-linux-gnu --prefix=/root/noria/target/release/build/jemalloc-sys-14bf0adab7d71d07/out build_alias=x86_64-unknown-linux-gnu host_alias=x86_64-unknown-linux-gnu CC=cc 'CFLAGS=-O3 -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -Wall' 'LDFLAGS=-O3 -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -Wall' 'CPPFLAGS=-O3 -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -Wall'
CC                 : cc
CONFIGURE_CFLAGS   : -std=gnu11 -Wall -Wshorten-64-to-32 -Wsign-compare -Wundef -Wno-format-zero-length -pipe -g3 -fvisibility=hidden -O3 -funroll-loops
SPECIFIED_CFLAGS   : -O3 -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -Wall
EXTRA_CFLAGS       : 
CPPFLAGS           : -O3 -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -Wall -D_GNU_SOURCE -D_REENTRANT
CXX                : 
CONFIGURE_CXXFLAGS : 
SPECIFIED_CXXFLAGS : 
EXTRA_CXXFLAGS     : 
LDFLAGS            : -O3 -ffunction-sections -fdata-sections -fPIC -g -fno-omit-frame-pointer -m64 -Wall
EXTRA_LDFLAGS      : 
DSO_LDFLAGS        : -shared -Wl,-soname,$(@F)
LIBS               : -lm  -lpthread -ldl
RPATH_EXTRA        : 

XSLTPROC           : false
XSLROOT            : 

PREFIX             : /root/noria/target/release/build/jemalloc-sys-14bf0adab7d71d07/out
BINDIR             : /root/noria/target/release/build/jemalloc-sys-14bf0adab7d71d07/out/bin
DATADIR            : /root/noria/target/release/build/jemalloc-sys-14bf0adab7d71d07/out/share
INCLUDEDIR         : /root/noria/target/release/build/jemalloc-sys-14bf0adab7d71d07/out/include
LIBDIR             : /root/noria/target/release/build/jemalloc-sys-14bf0adab7d71d07/out/lib
MANDIR             : /root/noria/target/release/build/jemalloc-sys-14bf0adab7d71d07/out/share/man

srcroot            : /root/noria/target/release/build/jemalloc-sys-14bf0adab7d71d07/out/jemalloc/
abs_srcroot        : /root/noria/target/release/build/jemalloc-sys-14bf0adab7d71d07/out/jemalloc/
objroot            : 
abs_objroot        : /root/noria/target/release/build/jemalloc-sys-14bf0adab7d71d07/out/build/

JEMALLOC_PREFIX    : _rjem_
JEMALLOC_PRIVATE_NAMESPACE
                   : _rjem_je_
install_suffix     : 
malloc_conf        : 
autogen            : 0
debug              : 0
stats              : 1
prof               : 0
prof-libunwind     : 0
prof-libgcc        : 0
prof-gcc           : 0
fill               : 1
utrace             : 0
xmalloc            : 0
log                : 0
lazy_lock          : 0
cache-oblivious    : 1
cxx                : 0
===============================================================================
running: "make" "srcroot=../jemalloc/" "-j" "6"

--- stderr
thread 'main' panicked at 'failed to execute command: No such file or directory (os error 2)', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/jemalloc-sys-0.3.2/build.rs:389:19
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

warning: build failed, waiting for other jobs to finish...
error: build failed

I am building Noria in a docker container because I am trying to build a Noria docker image.

root@19f6aa172323:~/noria# uname -a
Linux 19f6aa172323 4.9.125-linuxkit #1 SMP Fri Sep 7 08:20:28 UTC 2018 x86_64 GNU/Linux

The base image I uses is https://hub.docker.com/_/zookeeper
https://github.com/31z4/zookeeper-docker/blob/5a82d0b90d055f39d50e0a64ae2e00da15f9b8b1/3.5.5/Dockerfile

CreatCodeBuild commented 4 years ago

I am not a Rust developer and this is my first hand on Rust experience. Not sure if this question is totally stupid.

jonhoo commented 4 years ago

It's hard to say, but my guess is that you are missing some build tools. The command output suggests that you may be missing the make tool.

CreatCodeBuild commented 4 years ago

successfully built. Thanks! make wasn't installed