Closed strongbull1 closed 8 years ago
Hi
Could you give more info?
i.e. what's your otp version?
What does echo $MAKEFLAGS
give you?
I think I've seen concurrent settings like -j?
caused some race condition.
requires otp 18 by the way.
I just installed erlang before running the make command
sudo apt-get install erlang erlang-doc
Are the any additional steps which need to be executed ?
From: Zaiming Shi [mailto:notifications@github.com] Sent: 03 June, 2016 9:38 PM To: klarna/kastle Cc: sukhdeepsinghkohli; Author Subject: Re: [klarna/kastle] Unable to compile (#2)
requires otp 18 by the way.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/klarna/kastle/issues/2#issuecomment-223735962 , or mute the thread https://github.com/notifications/unsubscribe/ASat8j_fQ1kPSKcd7amxNmRcwPoa9D3Lks5qIQE5gaJpZM4It9Up . https://github.com/notifications/beacon/ASat8rr4FyQnCuZOeDp0L7X8JlnPiBiaks5qIQE5gaJpZM4It9Up.gif
instructions here: https://www.erlang-solutions.com/resources/download.html install the latest: 18.3
@sukhdeepsinghkohli did it work?
Nope, it still doesn't work
dev@ubuntu:~/sukhi/kastle$ sudo dpkg -i esl-erlang_18.3-1~ubuntu~trusty_amd64.deb
[sudo] password for dev:
dpkg: considering removing erlang-base in favour of esl-erlang ...
dpkg: no, cannot proceed with removal of erlang-base (--auto-deconfigure will help):
erlang-crypto depends on erlang-base (= 1:18.2) | erlang-base-hipe (= 1:18.2)
erlang-base is to be removed.
dpkg: regarding esl-erlang_18.3-1~ubuntu~trusty_amd64.deb containing esl-erlang:
esl-erlang conflicts with erlang-base
erlang-base (version 1:18.2) is present and installed.
dpkg: error processing archive esl-erlang_18.3-1~ubuntu~trusty_amd64.deb (--install):
conflicting packages - not installing esl-erlang
Errors were encountered while processing:
esl-erlang_18.3-1~ubuntu~trusty_amd64.deb
It seems you have Erlang 18.2 installed already.
could you check your Erlang run time version by executing erl
.
as an example, mine is like below:
> erl
Erlang/OTP 18 [erts-7.0.3] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]
Eshell V7.0.3 (abort with ^G)
If it's Erlang/OTP 18 in your machine, go to kastle directory and run export MAKEFLAGS=""; make deps && make
and see what happens.
Thanks for quick response
Still same thing
dev@ubuntu:~/sukhi/kastle$ erl
Erlang/OTP 18 [erts-7.2] [source] [64-bit] [async-threads:10] [kernel-poll:false]
Eshell V7.2 (abort with ^G)
1>
BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded
(v)ersion (k)ill (D)b-tables (d)istribution
^Cdev@ubuntu:~/sukhi/kastle$ export MAKEFLAGS=""; make deps && make
for dep in ; do \
mkdir -p $dep/ebin; \
done
make[1]: Entering directory `/home/dev/sukhi/kastle/deps/brod'
for dep in ; do \
mkdir -p $dep/ebin; \
done
make[2]: Entering directory `/home/dev/sukhi/kastle/deps/supervisor3'
for dep in ; do \
mkdir -p $dep/ebin; \
done
make[2]: Leaving directory `/home/dev/sukhi/kastle/deps/supervisor3'
make[2]: Entering directory `/home/dev/sukhi/kastle/deps/kafka_protocol'
for dep in ; do \
mkdir -p $dep/ebin; \
done
make[2]: Leaving directory `/home/dev/sukhi/kastle/deps/kafka_protocol'
make[1]: Leaving directory `/home/dev/sukhi/kastle/deps/brod'
make[1]: Entering directory `/home/dev/sukhi/kastle/deps/cowboy'
for dep in ; do \
mkdir -p $dep/ebin; \
done
make[2]: Entering directory `/home/dev/sukhi/kastle/deps/cowlib'
for dep in ; do \
mkdir -p $dep/ebin; \
done
make[2]: Leaving directory `/home/dev/sukhi/kastle/deps/cowlib'
make[2]: Entering directory `/home/dev/sukhi/kastle/deps/ranch'
for dep in ; do \
mkdir -p $dep/ebin; \
done
make[2]: Leaving directory `/home/dev/sukhi/kastle/deps/ranch'
make[1]: Leaving directory `/home/dev/sukhi/kastle/deps/cowboy'
Error: No Makefile to build dependency /home/dev/sukhi/kastle/deps/lager.
make: *** [deps] Error 2
dev@ubuntu:~/sukhi/kastle$
hmm odd.
I can reproduce the same error if I delete the file deps/lager/Makefile
but I have no idea how and why it could have ended up in such state.
I can make it work again by rm -rf deps/lager/
then run make
again. Could you try this ?
corrected typo in last comment: it should belager
not larger
:)
Lager beer :) Sure ...
No Luck still
dev@ubuntu:~/sukhi/kastle$ rm -rf deps/lager/
dev@ubuntu:~/sukhi/kastle$ make
DEP lager
{"init terminating in do_boot",{undef,[{rebar_utils,wordsize,[],[]},{erl_eval,do_apply,6,[{file,"erl_eval.erl"},{line,669}]},{erl_eval,expr,5,[{file,"erl_eval.erl"},{line,228}]},{erl_eval,expr,5,[{file,"erl_eval.erl"},{line,229}]},{erl_eval,expr_list,6,[{file,"erl_eval.erl"},{line,877}]},{erl_eval,expr,5,[{file,"erl_eval.erl"},{line,422}]},{erl_eval,exprs,5,[{file,"erl_eval.erl"},{line,122}]},{init,start_it,1,[]}]}}
Crash dump is being written to: erl_crash.dump...done
init terminating in do_boot ()
for dep in ; do \
mkdir -p $dep/ebin; \
done
make[1]: Entering directory `/home/dev/sukhi/kastle/deps/brod'
for dep in ; do \
mkdir -p $dep/ebin; \
done
make[2]: Entering directory `/home/dev/sukhi/kastle/deps/supervisor3'
for dep in ; do \
mkdir -p $dep/ebin; \
done
make[2]: Leaving directory `/home/dev/sukhi/kastle/deps/supervisor3'
make[2]: Entering directory `/home/dev/sukhi/kastle/deps/kafka_protocol'
for dep in ; do \
mkdir -p $dep/ebin; \
done
make[2]: Leaving directory `/home/dev/sukhi/kastle/deps/kafka_protocol'
make[1]: Leaving directory `/home/dev/sukhi/kastle/deps/brod'
make[1]: Entering directory `/home/dev/sukhi/kastle/deps/cowboy'
for dep in ; do \
mkdir -p $dep/ebin; \
done
make[2]: Entering directory `/home/dev/sukhi/kastle/deps/cowlib'
for dep in ; do \
mkdir -p $dep/ebin; \
done
make[2]: Leaving directory `/home/dev/sukhi/kastle/deps/cowlib'
make[2]: Entering directory `/home/dev/sukhi/kastle/deps/ranch'
for dep in ; do \
mkdir -p $dep/ebin; \
done
make[2]: Leaving directory `/home/dev/sukhi/kastle/deps/ranch'
make[1]: Leaving directory `/home/dev/sukhi/kastle/deps/cowboy'
make[1]: Entering directory `/home/dev/sukhi/kastle/deps/lager'
make[1]: *** No targets. Stop.
make[1]: Leaving directory `/home/dev/sukhi/kastle/deps/lager'
make: *** [deps] Error 2
dev@ubuntu:~/sukhi/kastle$
@sukhdeepsinghkohli try rm -rf .erlang.mk/rebar
, or with a fresh clone.
Thanks Id...nope still unable to compile
dev@ubuntu:~/sukhi/kastle$ rm -rf .erlang.mk/rebar
dev@ubuntu:~/sukhi/kastle$ rm -rf deps/lager/
dev@ubuntu:~/sukhi/kastle$ make
DEP lager
make[1]: Entering directory `/home/dev/sukhi/kastle/.erlang.mk/rebar'
./bootstrap
Recompile: src/rebar
Recompile: src/rebar_abnfc_compiler
Recompile: src/rebar_app_utils
Recompile: src/rebar_appups
Recompile: src/rebar_asn1_compiler
Recompile: src/rebar_base_compiler
Recompile: src/rebar_cleaner
Recompile: src/rebar_config
Recompile: src/rebar_core
Recompile: src/rebar_cover_utils
Recompile: src/rebar_ct
Recompile: src/rebar_deps
Recompile: src/rebar_dia_compiler
Recompile: src/rebar_edoc
Recompile: src/rebar_erlc_compiler
Recompile: src/rebar_erlydtl_compiler
Recompile: src/rebar_escripter
Recompile: src/rebar_eunit
Recompile: src/rebar_file_utils
Recompile: src/rebar_getopt
Recompile: src/rebar_lfe_compiler
Recompile: src/rebar_log
Recompile: src/rebar_metacmds
Recompile: src/rebar_mustache
Recompile: src/rebar_neotoma_compiler
Recompile: src/rebar_otp_app
Recompile: src/rebar_otp_appup
Recompile: src/rebar_port_compiler
Recompile: src/rebar_proto_compiler
Recompile: src/rebar_proto_gpb_compiler
Recompile: src/rebar_protobuffs_compiler
Recompile: src/rebar_qc
Recompile: src/rebar_rel_utils
Recompile: src/rebar_reltool
Recompile: src/rebar_require_vsn
Recompile: src/rebar_shell
Recompile: src/rebar_subdirs
Recompile: src/rebar_templater
Recompile: src/rebar_upgrade
Recompile: src/rebar_utils
Recompile: src/rebar_xref
==> rebar (compile)
==> rebar (escriptize)
Congratulations! You now have a self-contained script called "rebar" in
your current working directory. Place this script anywhere in your path
and you can use rebar to build OTP-compliant apps.
make[1]: Leaving directory `/home/dev/sukhi/kastle/.erlang.mk/rebar'
/home/dev/sukhi/kastle
for dep in ; do \
mkdir -p $dep/ebin; \
done
make[1]: Entering directory `/home/dev/sukhi/kastle/deps/brod'
for dep in ; do \
mkdir -p $dep/ebin; \
done
make[2]: Entering directory `/home/dev/sukhi/kastle/deps/supervisor3'
for dep in ; do \
mkdir -p $dep/ebin; \
done
make[2]: Leaving directory `/home/dev/sukhi/kastle/deps/supervisor3'
make[2]: Entering directory `/home/dev/sukhi/kastle/deps/kafka_protocol'
for dep in ; do \
mkdir -p $dep/ebin; \
done
make[2]: Leaving directory `/home/dev/sukhi/kastle/deps/kafka_protocol'
make[1]: Leaving directory `/home/dev/sukhi/kastle/deps/brod'
make[1]: Entering directory `/home/dev/sukhi/kastle/deps/cowboy'
for dep in ; do \
mkdir -p $dep/ebin; \
done
make[2]: Entering directory `/home/dev/sukhi/kastle/deps/cowlib'
for dep in ; do \
mkdir -p $dep/ebin; \
done
make[2]: Leaving directory `/home/dev/sukhi/kastle/deps/cowlib'
make[2]: Entering directory `/home/dev/sukhi/kastle/deps/ranch'
for dep in ; do \
mkdir -p $dep/ebin; \
done
make[2]: Leaving directory `/home/dev/sukhi/kastle/deps/ranch'
make[1]: Leaving directory `/home/dev/sukhi/kastle/deps/cowboy'
make[1]: Entering directory `/home/dev/sukhi/kastle/deps/lager'
DEP goldrush
for dep in ; do \
mkdir -p $dep/ebin; \
done
make[2]: Entering directory `/home/dev/sukhi/kastle/deps/goldrush'
for dep in ; do \
mkdir -p $dep/ebin; \
done
DEPEND goldrush.d
ERLC glc.erl glc_code.erl glc_lib.erl glc_ops.erl gr_app.erl gr_context.erl gr_counter.erl gr_counter_sup.erl gr_manager.erl gr_manager_sup.erl gr_param.erl gr_param_sup.erl gr_sup.erl gre.erl
APP goldrush.app.src
make[2]: Leaving directory `/home/dev/sukhi/kastle/deps/goldrush'
DEPEND lager.d
ERLC error_logger_lager_h.erl lager.erl lager_app.erl lager_backend_throttle.erl lager_common_test_backend.erl lager_config.erl lager_console_backend.erl lager_crash_log.erl lager_default_formatter.erl lager_file_backend.erl lager_format.erl lager_handler_watcher.erl lager_handler_watcher_sup.erl lager_manager_killer.erl lager_msg.erl lager_stdlib.erl lager_sup.erl lager_transform.erl lager_trunc_io.erl lager_util.erl
APP lager.app.src
make[1]: Leaving directory `/home/dev/sukhi/kastle/deps/lager'
Error: No Makefile to build dependency /home/dev/sukhi/kastle/deps/jiffy.
make: *** [deps] Error 2
dev@ubuntu:~/sukhi/kastle$
Passed lager :)
I think the problem here is that you first tried to build with one version of erlang, and then with another one.
Could you try to build a fresh kastle clone?
git clone https://github.com/klarna/kastle.git kastle-try2
cd kastle-try2
make deps && make
dev@ubuntu:~/sukhi$ git clone https://github.com/klarna/kastle.git kastle-try2
Cloning into 'kastle-try2'...
remote: Counting objects: 564, done.
remote: Compressing objects: 100% (7/7), done.
Receiving objects: 100% (564/564), 304.19 KiB | 0 bytes/s, done.
remote: Total 564 (delta 0), reused 0 (delta 0), pack-reused 557
Resolving deltas: 100% (322/322), done.
Checking connectivity... done.
dev@ubuntu:~/sukhi$ cd kastle-try2
dev@ubuntu:~/sukhi/kastle-try2$ make deps && make
DEP brod
DEP cowboy
DEP lager
make[1]: Entering directory `/home/dev/sukhi/kastle-try2/.erlang.mk/rebar'
./bootstrap
Recompile: src/rebar
Recompile: src/rebar_abnfc_compiler
Recompile: src/rebar_app_utils
Recompile: src/rebar_appups
Recompile: src/rebar_asn1_compiler
Recompile: src/rebar_base_compiler
Recompile: src/rebar_cleaner
Recompile: src/rebar_config
Recompile: src/rebar_core
Recompile: src/rebar_cover_utils
Recompile: src/rebar_ct
Recompile: src/rebar_deps
Recompile: src/rebar_dia_compiler
Recompile: src/rebar_edoc
Recompile: src/rebar_erlc_compiler
Recompile: src/rebar_erlydtl_compiler
Recompile: src/rebar_escripter
Recompile: src/rebar_eunit
Recompile: src/rebar_file_utils
Recompile: src/rebar_getopt
Recompile: src/rebar_lfe_compiler
Recompile: src/rebar_log
Recompile: src/rebar_metacmds
Recompile: src/rebar_mustache
Recompile: src/rebar_neotoma_compiler
Recompile: src/rebar_otp_app
Recompile: src/rebar_otp_appup
Recompile: src/rebar_port_compiler
Recompile: src/rebar_proto_compiler
Recompile: src/rebar_proto_gpb_compiler
Recompile: src/rebar_protobuffs_compiler
Recompile: src/rebar_qc
Recompile: src/rebar_rel_utils
Recompile: src/rebar_reltool
Recompile: src/rebar_require_vsn
Recompile: src/rebar_shell
Recompile: src/rebar_subdirs
Recompile: src/rebar_templater
Recompile: src/rebar_upgrade
Recompile: src/rebar_utils
Recompile: src/rebar_xref
==> rebar (compile)
==> rebar (escriptize)
Congratulations! You now have a self-contained script called "rebar" in
your current working directory. Place this script anywhere in your path
and you can use rebar to build OTP-compliant apps.
make[1]: Leaving directory `/home/dev/sukhi/kastle-try2/.erlang.mk/rebar'
/home/dev/sukhi/kastle-try2
DEP jiffy
DEP jesse
for dep in ; do \
mkdir -p $dep/ebin; \
done
make[1]: Entering directory `/home/dev/sukhi/kastle-try2/deps/brod'
DEP supervisor3
DEP kafka_protocol
for dep in ; do \
mkdir -p $dep/ebin; \
done
make[2]: Entering directory `/home/dev/sukhi/kastle-try2/deps/supervisor3'
for dep in ; do \
mkdir -p $dep/ebin; \
done
DEPEND supervisor3.d
ERLC supervisor3.erl
APP supervisor3.app.src
make[2]: Leaving directory `/home/dev/sukhi/kastle-try2/deps/supervisor3'
make[2]: Entering directory `/home/dev/sukhi/kastle-try2/deps/kafka_protocol'
priv/kpro_gen.escript
for dep in ; do \
mkdir -p $dep/ebin; \
done
DEPEND kafka_protocol.d
ERLC kpro.erl kpro_ErrorCode.erl kpro_structs.erl
APP kafka_protocol.app.src
make[2]: Leaving directory `/home/dev/sukhi/kastle-try2/deps/kafka_protocol'
DEPEND brod.d
ERLC brod.erl brod_client.erl brod_consumer.erl brod_consumers_sup.erl brod_group_controller.erl brod_group_subscriber.erl brod_kafka_requests.erl brod_producer.erl brod_producer_buffer.erl brod_producers_sup.erl brod_sock.erl brod_sup.erl brod_topic_subscriber.erl brod_utils.erl
APP brod.app.src
make[1]: Leaving directory `/home/dev/sukhi/kastle-try2/deps/brod'
make[1]: Entering directory `/home/dev/sukhi/kastle-try2/deps/cowboy'
DEP cowlib
DEP ranch
for dep in ; do \
mkdir -p $dep/ebin; \
done
make[2]: Entering directory `/home/dev/sukhi/kastle-try2/deps/cowlib'
for dep in ; do \
mkdir -p $dep/ebin; \
done
DEPEND cowlib.d
ERLC cow_cookie.erl cow_date.erl cow_http.erl cow_http_hd.erl cow_http_te.erl cow_mimetypes.erl cow_multipart.erl cow_qs.erl cow_spdy.erl
APP cowlib.app.src
make[2]: Leaving directory `/home/dev/sukhi/kastle-try2/deps/cowlib'
make[2]: Entering directory `/home/dev/sukhi/kastle-try2/deps/ranch'
for dep in ; do \
mkdir -p $dep/ebin; \
done
DEPEND ranch.d
ERLC ranch.erl ranch_acceptor.erl ranch_acceptors_sup.erl ranch_app.erl ranch_conns_sup.erl ranch_listener_sup.erl ranch_protocol.erl ranch_server.erl ranch_ssl.erl ranch_sup.erl ranch_tcp.erl ranch_transport.erl
APP ranch.app.src
make[2]: Leaving directory `/home/dev/sukhi/kastle-try2/deps/ranch'
DEPEND cowboy.d
ERLC cowboy.erl cowboy_app.erl cowboy_bstr.erl cowboy_clock.erl cowboy_handler.erl cowboy_http.erl cowboy_http_handler.erl cowboy_loop_handler.erl cowboy_middleware.erl cowboy_protocol.erl cowboy_req.erl cowboy_rest.erl cowboy_router.erl cowboy_spdy.erl cowboy_static.erl cowboy_sub_protocol.erl cowboy_sup.erl cowboy_websocket.erl cowboy_websocket_handler.erl
APP cowboy.app.src
make[1]: Leaving directory `/home/dev/sukhi/kastle-try2/deps/cowboy'
make[1]: Entering directory `/home/dev/sukhi/kastle-try2/deps/lager'
DEP goldrush
for dep in ; do \
mkdir -p $dep/ebin; \
done
make[2]: Entering directory `/home/dev/sukhi/kastle-try2/deps/goldrush'
for dep in ; do \
mkdir -p $dep/ebin; \
done
DEPEND goldrush.d
ERLC glc.erl glc_code.erl glc_lib.erl glc_ops.erl gr_app.erl gr_context.erl gr_counter.erl gr_counter_sup.erl gr_manager.erl gr_manager_sup.erl gr_param.erl gr_param_sup.erl gr_sup.erl gre.erl
APP goldrush.app.src
make[2]: Leaving directory `/home/dev/sukhi/kastle-try2/deps/goldrush'
DEPEND lager.d
ERLC error_logger_lager_h.erl lager.erl lager_app.erl lager_backend_throttle.erl lager_common_test_backend.erl lager_config.erl lager_console_backend.erl lager_crash_log.erl lager_default_formatter.erl lager_file_backend.erl lager_format.erl lager_handler_watcher.erl lager_handler_watcher_sup.erl lager_manager_killer.erl lager_msg.erl lager_stdlib.erl lager_sup.erl lager_transform.erl lager_trunc_io.erl lager_util.erl
APP lager.app.src
make[1]: Leaving directory `/home/dev/sukhi/kastle-try2/deps/lager'
make[1]: Entering directory `/home/dev/sukhi/kastle-try2/deps/jiffy'
for dep in ; do \
mkdir -p $dep/ebin; \
done
make -f c_src/Makefile.erlang.mk
make[2]: Entering directory `/home/dev/sukhi/kastle-try2/deps/jiffy'
cc -c -o c_src/decoder.o c_src/decoder.c -Ic_src/ -g -Wall -O3 -fno-strict-aliasing -finline-functions -Wall -fPIC -I "/usr/lib/erlang/erts-7.2/include" -I "/usr/lib/erlang/lib/erl_interface-3.8.1/include" -fPIC
/bin/sh: 1: cc: not found
make[2]: *** [c_src/decoder.o] Error 127
make[2]: Leaving directory `/home/dev/sukhi/kastle-try2/deps/jiffy'
make[1]: *** [pre-app] Error 2
make[1]: Leaving directory `/home/dev/sukhi/kastle-try2/deps/jiffy'
make: *** [deps] Error 2
dev@ubuntu:~/sukhi/kastle-try2$
All right, that's simple.
sudo apt-get install gcc
Need to update readme.
Finally
Another missing piece
aptitude show g++ | grep State:
If this shows not installed, then
sudo apt-get install g++
===> Starting relx build process ...
===> Resolving OTP Applications from directories:
/home/dev/sukhi/kastle-try3/ebin
/home/dev/sukhi/kastle-try3/deps
/usr/lib/erlang/lib
/home/dev/sukhi/kastle-try3/apps
===> Resolved kastle-1.2.0
===> Including Erts from /usr/lib/erlang
===> release successfully created!
\o/
Thanks for your time and sorry for the inconvenience!
We will probably just move to jsx and g++ won't be needed, will discuss tomorrow.
Thanks guys...after the compilation...rest of the setup was pretty straight forward. All set and running...
Maybe you can add the findings from this topic to Readme/Installation
Glad to see it's working. We'll consider make it more clear in the readme about dependencies. Closing this issue.
Thanks guys, this is exactly the thing I am looking for however, when I compile it, it gives me the below error