Netflix / dynomite

A generic dynamo implementation for different k-v storage engines
Apache License 2.0
4.2k stars 532 forks source link

make Comamnd fails #767

Open mzubairsaleem opened 4 years ago

mzubairsaleem commented 4 years ago

Hi,

While Installing Dynomite On Linux Server Ubuntu: 16.04 x86_64 GNU/Linux

Having This Error.

make[2]: Entering directory '/root/dynomite/src/hashkit' gcc -DHAVE_CONFIG_H -I. -I../.. -I ../../src -I ../../contrib/murmur3 -Wall -Wshadow -Wpointer-arith -Winline -Wunused-function -Wunused-variable -Wunused-value -Wno-unused-parameter -Wno-unused-value -Wno-missing-prototypes -Wno-missing-declarations -Wconversion -Wsign-compare -Wstrict-prototypes -Wredundant-decls -Werror=implicit-function-declaration -g -O2 -MT dyn_crc16.o -MD -MP -MF .deps/dyn_crc16.Tpo -c -o dyn_crc16.o dyn_crc16.c In file included from ../../src/dyn_connection.h:41:0, from ../../src/dyn_core.h:28, from dyn_crc16.c:23: ../../src/dyn_message.h:249:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes] typedef void (*func_init_datastore_t)(); ^ In file included from ../../src/dyn_core.h:30:0, from dyn_crc16.c:23: ../../src/dyn_crypto.h:13:25: fatal error: openssl/bio.h: No such file or directory compilation terminated. Makefile:393: recipe for target 'dyn_crc16.o' failed make[2]: *** [dyn_crc16.o] Error 1 make[2]: Leaving directory '/root/dynomite/src/hashkit' Makefile:689: recipe for target 'install-recursive' failed make[1]: *** [install-recursive] Error 1 make[1]: Leaving directory '/root/dynomite/src' Makefile:483: recipe for target 'install-recursive' failed make: *** [install-recursive] Error 1

m-ueberall commented 4 years ago

fatal error: openssl/bio.h: No such file or directory

@mzubairsaleem: Are you sure you have installed libssl-dev?

mzubairsaleem commented 4 years ago

Yes I did Install but doesn’t work.

m-ueberall commented 4 years ago

Which branch are you on? I successfully compiled branches v0.6/v0.7 on Xenial.

ipapapa commented 4 years ago

Correct, this is a dependent library missing.

rsms commented 4 years ago

I'm seeing the same result on macOS 10.14 with 46c75201bfaca02b656c44bcf39ca68bba3a54c7 — I have openssl@1.1 installed via Homebrew.

$ ./configure --with-openssl=/usr/local/Cellar/openssl@1.1/1.1.1g
$ make
...
In file included from dyn_crc16.c:23:
In file included from ../../src/dyn_core.h:30:
../../src/dyn_crypto.h:13:10: fatal error: 'openssl/bio.h' file not found
#include <openssl/bio.h>
...

Note that I do have openssl/bio.h:

$ ls -l /usr/local/Cellar/openssl@1.1/1.1.1g/include/openssl/bio.h
-rw-r--r--  1 rsms  staff  34907 Apr 21 05:22 /usr/local/Cellar/openssl@1.1/1.1.1g/include/openssl/bio.h

Note: I've also tried running configure without the --with-openssl with the same result. Is it possible that the make setup does not honor the autoconf with flag? I don't see it for -I to gcc: (line from make)

gcc -DHAVE_CONFIG_H -I. -I../..  -I ../../src -I ../../contrib/murmur3  -Wall -Wshadow -Wpointer-arith -Winline -Wunused-function -Wunused-variable -Wunused-value -Wno-unused-parameter -Wno-unused-value -Wno-missing-prototypes -Wno-missing-declarations -Wconversion -Wsign-compare -Wstrict-prototypes -Wredundant-decls -Werror=implicit-function-declaration -g -O2 -MT dyn_crc16.o -MD -MP -MF .deps/dyn_crc16.Tpo -c -o dyn_crc16.o dyn_crc16.c
rsms commented 4 years ago

Here's how I got it to compile on macOS 10.14: (bash, in the dynomite source root directory)

brew install openssl@1.1
OPENSSL_ROOT=$(brew --cellar openssl)/$(brew list --versions openssl | tr ' ' '\n' | tail -1)
./configure "--with-openssl=$OPENSSL_ROOT"
ln -s $OPENSSL_ROOT/include/openssl openssl
LIBRARY_PATH=$LIBRARY_PATH:$OPENSSL_ROOT/lib make

The issue seems to be that the build relies on the compiler's built-in search paths for headers and libraries, ignoring --with arguments to the configure script.

paulolellis commented 3 years ago

Thanks RSMS, you're a saviour! :)

abhinav0101 commented 3 years ago

real life legend right here

ipapapa commented 3 years ago

Since others may have the same problem, why don't you folks open a PR to briefly update the documentation?