{"action":"created","issue":{"url":"https://api.github.com/repos/erlio/vernemq/issues/25","labels_url":"https://api.github.com/repos/erlio/vernemq/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/erlio/vernemq/issues/25/comments","events_url":"https://api.github.com/repos/erlio/vernemq/issues/25/events","html_url":"https://github.com/erlio/vernemq/issues/25","id":95375725,"number":25,"title":"Compiling vernemq fails on Raspberry PI Archlinux","user":{"login":"githubcdr","id":2071694,"avatar_url":"https://avatars.githubusercontent.com/u/2071694?v=3","gravatar_id":"","url":"https://api.github.com/users/githubcdr","html_url":"https://github.com/githubcdr","followers_url":"https://api.github.com/users/githubcdr/followers","following_url":"https://api.github.com/users/githubcdr/following{/other_user}","gists_url":"https://api.github.com/users/githubcdr/gists{/gist_id}","starred_url":"https://api.github.com/users/githubcdr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/githubcdr/subscriptions","organizations_url":"https://api.github.com/users/githubcdr/orgs","repos_url":"https://api.github.com/users/githubcdr/repos","events_url":"https://api.github.com/users/githubcdr/events{/privacy}","received_events_url":"https://api.github.com/users/githubcdr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-16T08:05:01Z","updated_at":"2015-07-20T12:26:18Z","closed_at":null,"body":"Hi,\r\n\r\nI have a problem compiling vernemq on Raspberry, the problem seems related to leveldb;\r\n\r\n```\r\nmake[1]: Entering directory '/tmp/vernemq/_build/default/lib/eleveldb/c_src'\r\ng++ -O3 -finline-functions -Wall -fPIC -I /usr/lib/erlang/erts-7.0/include/ -I /usr/lib/erlang/lib/erl_interface-3.8/include -I leveldb/include  -c -o /tmp/vernemq/_build/default/lib/eleveldb/c_src/eleveldb.o /tmp/vernemq/_build/default/lib/eleveldb/c_src/eleveldb.cc\r\n/tmp/vernemq/_build/default/lib/eleveldb/c_src/eleveldb.cc: In function 'ERL_NIF_TERM parse_init_option(ErlNifEnv*, ERL_NIF_TERM, EleveldbOptions&)':\r\n/tmp/vernemq/_build/default/lib/eleveldb/c_src/eleveldb.cc:244:58: error: invalid conversion from 'size_t* {aka unsigned int*}' to 'long unsigned int*' [-fpermissive]\r\n             if (enif_get_ulong(env, option[1], &memory_sz))\r\n                                                          ^\r\nIn file included from /tmp/vernemq/_build/default/lib/eleveldb/c_src/eleveldb.h:27:0,\r\n                 from /tmp/vernemq/_build/default/lib/eleveldb/c_src/eleveldb.cc:35:\r\n/usr/lib/erlang/erts-7.0/include/erl_nif_api_funcs.h:44:27: note:   initializing argument 3 of 'int enif_get_ulong(ErlNifEnv*, ERL_NIF_TERM, long unsigned int*)'\r\n ERL_NIF_API_FUNC_DECL(int,enif_get_ulong,(ErlNifEnv*, ERL_NIF_TERM term, unsigned long* ip));\r\n                           ^\r\n/usr/lib/erlang/erts-7.0/include/erl_nif.h:246:71: note: in definition of macro 'ERL_NIF_API_FUNC_DECL'\r\n #  define ERL_NIF_API_FUNC_DECL(RET_TYPE, NAME, ARGS) extern RET_TYPE NAME ARGS\r\n                                                                       ^\r\n/tmp/vernemq/_build/default/lib/eleveldb/c_src/eleveldb.cc: In function 'ERL_NIF_TERM parse_open_option(ErlNifEnv*, ERL_NIF_TERM, leveldb::Options&)':\r\n/tmp/vernemq/_build/default/lib/eleveldb/c_src/eleveldb.cc:332:58: error: invalid conversion from 'size_t* {aka unsigned int*}' to 'long unsigned int*' [-fpermissive]\r\n             if (enif_get_ulong(env, option[1], &memory_sz))\r\n                                                          ^\r\nIn file included from /tmp/vernemq/_build/default/lib/eleveldb/c_src/eleveldb.h:27:0,\r\n                 from /tmp/vernemq/_build/default/lib/eleveldb/c_src/eleveldb.cc:35:\r\n/usr/lib/erlang/erts-7.0/include/erl_nif_api_funcs.h:44:27: note:   initializing argument 3 of 'int enif_get_ulong(ErlNifEnv*, ERL_NIF_TERM, long unsigned int*)'\r\n ERL_NIF_API_FUNC_DECL(int,enif_get_ulong,(ErlNifEnv*, ERL_NIF_TERM term, unsigned long* ip));\r\n                           ^\r\n/usr/lib/erlang/erts-7.0/include/erl_nif.h:246:71: note: in definition of macro 'ERL_NIF_API_FUNC_DECL'\r\n #  define ERL_NIF_API_FUNC_DECL(RET_TYPE, NAME, ARGS) extern RET_TYPE NAME ARGS\r\n                                                                       ^\r\n/tmp/vernemq/_build/default/lib/eleveldb/c_src/eleveldb.cc: In function 'ERL_NIF_TERM eleveldb::async_open(ErlNifEnv*, int, const ERL_NIF_TERM*)':\r\n/tmp/vernemq/_build/default/lib/eleveldb/c_src/eleveldb.cc:584:24: warning: integer overflow in expression [-Woverflow]\r\n         if (8*1024*1024*1024L < gCurrentTotalMemory)\r\n                        ^\r\nMakefile:65: recipe for target '/tmp/vernemq/_build/default/lib/eleveldb/c_src/eleveldb.o' failed\r\nmake[1]: *** [/tmp/vernemq/_build/default/lib/eleveldb/c_src/eleveldb.o] Error 1\r\nmake[1]: Leaving directory '/tmp/vernemq/_build/default/lib/eleveldb/c_src'\r\n===> Hook for compile failed!\r\n\r\nMakefile:56: recipe for target 'rel' failed\r\nmake: *** [rel] Error 1\r\n```\r\n\r\nVersions:\r\n\r\n```\r\n[root@alarmpi vernemq]# erl --versionErlang/OTP 18 [erts-7.0] [source] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]Eshell V7.0  (abort with ^G)\r\n````\r\n\r\nIs this code related or am I missing libraries etc?\r\n"},"comment":{"url":"https://api.github.com/repos/erlio/vernemq/issues/comments/122867980","html_url":"https://github.com/erlio/vernemq/issues/25#issuecomment-122867980","issue_url":"https://api.github.com/repos/erlio/vernemq/issues/25","id":122867980,"user":{"login":"dergraf","id":155396,"avatar_url":"https://avatars.githubusercontent.com/u/155396?v=3","gravatar_id":"","url":"https://api.github.com/users/dergraf","html_url":"https://github.com/dergraf","followers_url":"https://api.github.com/users/dergraf/followers","following_url":"https://api.github.com/users/dergraf/following{/other_user}","gists_url":"https://api.github.com/users/dergraf/gists{/gist_id}","starred_url":"https://api.github.com/users/dergraf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dergraf/subscriptions","organizations_url":"https://api.github.com/users/dergraf/orgs","repos_url":"https://api.github.com/users/dergraf/repos","events_url":"https://api.github.com/users/dergraf/events{/privacy}","received_events_url":"https://api.github.com/users/dergraf/received_events","type":"User","site_admin":false},"created_at":"2015-07-20T12:26:18Z","updated_at":"2015-07-20T12:26:18Z","body":"my guess is that it has to do with the PIs 32bit architecture.. but have to dig deeper, and I have currently no PI around to test this out. "}}