silviucpp/erlcass

Not able to build erlclass using rebar

Closed this issue · 3 comments

Hello,
I am not able to build this dependency while using rebar.
I have following error:

Compiling` ${project_root}/deps/erlcass/c_src/nif_cass_statement.cc
In file included from deps/cpp-driver/src/buffer.hpp:20:0,
                 from deps/cpp-driver/src/abstract_data.hpp:20,
                 from deps/cpp-driver/src/statement.hpp:20,
                 from deps/cpp-driver/src/execute_request.hpp:23,
                 from 
${project_root}/deps/erlcass/c_src/nif_cass_statement.cc:15:
deps/cpp-driver/src/ref_counted.hpp:25:16: fatal error: uv.h: No such file or directory
 #include <uv.h>
                ^
compilation terminated.

I have same issue on master branch and tags v2.3 and v2.2
I am using E16B03.

Regards,
Szymon

I have installed libuv0.10-dev on my Ubuntu 15.04 system. Error mentioned above is gone but now I have other ones.

==> erlcass (compile)
Compiled src/erlcass_time.erl
Compiled src/erlcass_sup.erl
Compiled src/erlcass_prep_utils.erl
Compiled src/erlcass_nif.erl
Compiled src/erlcass_log.erl
Compiled src/erlcass_uuid.erl
Compiled src/erlcass_app.erl
Compiled src/erlcass.erl
Compiling c_src/data_conversion.cc
Compiling c_src/erlcass.cc
Compiling c_src/metadata.cc
Compiling c_src/nif_cass_cluster.cc
Compiling c_src/nif_cass_prepared.cc
Compiling c_src/nif_cass_session.cc
Compiling c_src/nif_cass_statement.cc
Compiling c_src/nif_cass_uuid.cc
Compiling c_src/nif_collection.cc
Compiling c_src/nif_date_time.cc
Compiling c_src/nif_tuple.cc
Compiling c_src/nif_utils.cc
Compiling c_src/uuid_serialization.cc
/usr/bin/ld: cannot find -lcassandra_static
collect2: error: ld returned 1 exit status
ERROR: cc c_src/data_conversion.o c_src/erlcass.o c_src/metadata.o c_src/nif_cass_cluster.o c_src/nif_cass_prepared.o c_src/nif_cass_session.o c_src/nif_cass_statement.o c_src/nif_cass_uuid.o c_src/nif_collection.o c_src/nif_date_time.o c_src/nif_tuple.o c_src/nif_utils.o c_src/uuid_serialization.o  -L/usr/local/lib/ -Ldeps/cpp-driver/build -lcassandra_static -luv -lstdc++ -lssl -lcrypto -shared  -L/usr/lib/erlang/lib/erl_interface-3.7.15/lib -lerl_interface -lei -o priv/erlcass_nif.so failed with error: 1 and output:
/usr/bin/ld: cannot find -lcassandra_static
collect2: error: ld returned 1 exit status

You followed the getting started instructions for ubuntu ?

Before doing rebar get-deps:

sudo apt-add-repository ppa:linuxjedi/ppa
sudo apt-get update
sudo apt-get install g++ make cmake libuv-dev libssl-dev

And then delete all deps (if you already did rebar get-deps) and do again rebar get-deps

Silviu

Hello,
I was about to write that I followed those instructions and everything is working.
Sorry for wasting your time.
Szymon