Compiling DalmatinerDB on FreeBSD 11
Created by: rduffner
Hi,
i tried to compile it.
First, FreeBSD only has Erlang19. Is that a problem? GCC is 4.9.4.
Then, on running gmake:
===> Linking /root/dalmatinerdb/_build/default/lib/k6_bytea/priv/k6_bytea.so
===> Compiling estore
===> Compiling quickrand
===> Compiling uuid
===> Compiling goldrush
===> Compiling lager
===> Compiling jsone
===> Compiling fifo_utils
===> Compiling jam
===> Compiling bear
_build/default/lib/bear/src/bear.erl:none: Warning: this system is not configured for native-code compilation.
===> Compiling folsom
_build/default/lib/folsom/src/folsom_sample_exdec.erl:67: Warning: random:uniform_s/2: the 'random' module is deprecated; use the 'rand' module instead
_build/default/lib/folsom/src/folsom_sample_exdec.erl:76: Warning: random:uniform_s/2: the 'random' module is deprecated; use the 'rand' module instead
_build/default/lib/folsom/src/folsom_sample_uniform.erl:52: Warning: random:uniform_s/2: the 'random' module is deprecated; use the 'rand' module instead
_build/default/lib/folsom/src/folsom_sample_slide_uniform.erl:48: Warning: random:uniform_s/2: the 'random' module is deprecated; use the 'rand' module instead
===> Compiling riak_sysmon
===> Compiling trie
===> Compiling mmath
===> Compiling /root/dalmatinerdb/_build/default/lib/mmath/c_src/bin_nif.c
===> cc: warning: -O4 is equivalent to -O3
In file included from /root/dalmatinerdb/_build/default/lib/mmath/c_src/bin_nif.c:2:
/root/dalmatinerdb/_build/default/lib/mmath/c_src/mmath.h:70:25: error: unknown type name 'int64_t'; did you mean '__int64_t'?
ffloat float_from_int64(int64_t v);
^~~~~~~
__int64_t
/usr/include/x86/_types.h:60:16: note: '__int64_t' declared here
typedef long __int64_t;
^
/root/dalmatinerdb/_build/default/lib/mmath/c_src/bin_nif.c:28:3: error: unknown type name 'int64_t'; did you mean '__int64_t'?
int64_t v;
^~~~~~~
__int64_t
/usr/include/x86/_types.h:60:16: note: '__int64_t' declared here
typedef long __int64_t;
^
/root/dalmatinerdb/_build/default/lib/mmath/c_src/bin_nif.c:29:3: error: unknown type name 'int64_t'; did you mean '__int64_t'?
int64_t v_overlay;
^~~~~~~
__int64_t
/usr/include/x86/_types.h:60:16: note: '__int64_t' declared here
typedef long __int64_t;
^
/root/dalmatinerdb/_build/default/lib/mmath/c_src/bin_nif.c:38:13: error: use of undeclared identifier 'uint8_t'
switch (TYPE(vs[i])) {
^
/root/dalmatinerdb/_build/default/lib/mmath/c_src/mmath.h:45:18: note: expanded from macro 'TYPE'
#define TYPE(v) (uint8_t)((ntohll(v) & TYPE_MASK) >> 56)
^
/root/dalmatinerdb/_build/default/lib/mmath/c_src/bin_nif.c:38:13: warning: implicit declaration of function 'ntohll' is invalid in C99 [-Wimplicit-function-declaration]
/root/dalmatinerdb/_build/default/lib/mmath/c_src/mmath.h:45:28: note: expanded from macro 'TYPE'
#define TYPE(v) (uint8_t)((ntohll(v) & TYPE_MASK) >> 56)
^
/root/dalmatinerdb/_build/default/lib/mmath/c_src/bin_nif.c:128:9: error: use of undeclared identifier 'uint8_t'
if (IS_SET(vs[i])) {
^
/root/dalmatinerdb/_build/default/lib/mmath/c_src/mmath.h:46:20: note: expanded from macro 'IS_SET'
#define IS_SET(v) (TYPE(v) != EMPTY_TYPE)
^
/root/dalmatinerdb/_build/default/lib/mmath/c_src/mmath.h:45:18: note: expanded from macro 'TYPE'
#define TYPE(v) (uint8_t)((ntohll(v) & TYPE_MASK) >> 56)
^
/root/dalmatinerdb/_build/default/lib/mmath/c_src/bin_nif.c:173:11: error: expected ';' after expression
uint32_t count;
^
;
/root/dalmatinerdb/_build/default/lib/mmath/c_src/bin_nif.c:173:3: error: use of undeclared identifier 'uint32_t'
uint32_t count;
^
/root/dalmatinerdb/_build/default/lib/mmath/c_src/bin_nif.c:173:12: error: use of undeclared identifier 'count'
uint32_t count;
^
/root/dalmatinerdb/_build/default/lib/mmath/c_src/bin_nif.c:174:11: error: expected ';' after expression
uint32_t pos;
^
;
/root/dalmatinerdb/_build/default/lib/mmath/c_src/bin_nif.c:174:3: error: use of undeclared identifier 'uint32_t'
uint32_t pos;
^
/root/dalmatinerdb/_build/default/lib/mmath/c_src/bin_nif.c:174:12: error: use of undeclared identifier 'pos'
uint32_t pos;
^
/root/dalmatinerdb/_build/default/lib/mmath/c_src/bin_nif.c:175:11: error: expected ';' after expression
uint32_t target_size;
^
;
/root/dalmatinerdb/_build/default/lib/mmath/c_src/bin_nif.c:175:3: error: use of undeclared identifier 'uint32_t'
uint32_t target_size;
^
/root/dalmatinerdb/_build/default/lib/mmath/c_src/bin_nif.c:175:12: error: use of undeclared identifier 'target_size'
uint32_t target_size;
^
/root/dalmatinerdb/_build/default/lib/mmath/c_src/bin_nif.c:181:19: error: use of undeclared identifier 'count'
GET_BIN(0, bin, count, vs);
^
/root/dalmatinerdb/_build/default/lib/mmath/c_src/bin_nif.c:183:3: error: use of undeclared identifier 'target_size'
target_size = ceil(count * rep_size * sizeof(ffloat));
^
/root/dalmatinerdb/_build/default/lib/mmath/c_src/bin_nif.c:183:22: error: use of undeclared identifier 'count'; did you mean 'round'?
target_size = ceil(count * rep_size * sizeof(ffloat));
^~~~~
round
/usr/include/math.h:312:8: note: 'round' declared here
double round(double);
^
/root/dalmatinerdb/_build/default/lib/mmath/c_src/bin_nif.c:183:28: error: invalid operands to binary expression ('double (*)(double)' and 'ErlNifSInt64' (aka 'long'))
target_size = ceil(count * rep_size * sizeof(ffloat));
~~~~~ ^ ~~~~~~~~
/root/dalmatinerdb/_build/default/lib/mmath/c_src/bin_nif.c:184:55: error: use of undeclared identifier 'target_size'
if (! (target = (ffloat*) enif_make_new_binary(env, target_size, &r)))
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
gmake: *** [fifo.mk:8: compile] Error 1
How can I fix this?