Pulling stacktrace_compat fails when making slim cowboy project

@gumm

ubuntu@MSI:~/nitrogen$ make slim_cowboy PROJECT=ookmakyi
make[1]: Entering directory '/home/ubuntu/nitrogen'
Building rebar2 for your platform..
Cloning into 'rebar'...
remote: Enumerating objects: 8944, done.
remote: Counting objects: 100% (19/19), done.
remote: Compressing objects: 100% (11/11), done.
remote: Total 8944 (delta 8), reused 17 (delta 8), pack-reused 8925
Receiving objects: 100% (8944/8944), 2.79 MiB | 11.87 MiB/s, done.
Resolving deltas: 100% (5459/5459), done.
No beam files found.
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
src/rebar_ct.erl:291:30: Warning: crypto:rand_uniform/2 is deprecated; use rand:uniform/1 instead
%  291|     Random = integer_to_list(crypto:rand_uniform(0, 10000)),
%     |                              ^

Recompile: src/rebar_deps
Recompile: src/rebar_dia_compiler
Recompile: src/rebar_dialyzer
Recompile: src/rebar_edoc
Recompile: src/rebar_erlc_compiler
Recompile: src/rebar_erlydtl_compiler
Recompile: src/rebar_escripter
Recompile: src/rebar_eunit
src/rebar_eunit.erl:282:20: Warning: crypto:rand_uniform/2 is deprecated; use rand:uniform/1 instead
%  282|             Seed = crypto:rand_uniform(1, 65535),
%     |                    ^

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_rand_compat
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
Recompile: src/rmemo
==> 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.
Moving rebar executable into your Nitrogen directory
Cleaning up rebar remnants
./rebar get-deps
==> rel (get-deps)
==> nitrogen (get-deps)
./rebar compile
==> rel (compile)
==> nitrogen (compile)
make[2]: Entering directory '/home/ubuntu/nitrogen'
make[2]: Leaving directory '/home/ubuntu/nitrogen'
********************************************************************************
Creating slim release in ../ookmakyi with cowboy
********************************************************************************
Generating "reltool.config" with merged overlays
...Loading base file: "reltool_base.config"
...Merging Overlay from "reltool_slim.config"
...Writing "reltool.config"
...SUCCESS
make[2]: Entering directory '/home/ubuntu/nitrogen'
Turning "reltool.config" into a slim release
make[3]: Entering directory '/home/ubuntu/nitrogen'
==> rel (generate)
Generating "nitrogen/rebar.config"
make[4]: Entering directory '/home/ubuntu/nitrogen/rel/nitrogen'
Using Erlang in /usr/bin/erl
==> site (get-deps)
==> nitrogen (get-deps)
Pulling cowboy from {git,"https://github.com/ninenines/cowboy",{tag,"2.7.0"}}
Cloning into 'cowboy'...
Pulling simple_bridge from {git,"https://github.com/nitrogen/simple_bridge",
                                {branch,master}}
Cloning into 'simple_bridge'...
Pulling qdate from {git,"https://github.com/choptastic/qdate",{branch,master}}
Cloning into 'qdate'...
Pulling nprocreg from {git,"https://github.com/nitrogen/nprocreg",
                           {branch,master}}
Cloning into 'nprocreg'...
Pulling nitrogen_core from {git,"https://github.com/nitrogen/nitrogen_core",
                                {branch,master}}
Cloning into 'nitrogen_core'...
Pulling sync from {git,"https://github.com/rustyio/sync",{branch,master}}
Cloning into 'sync'...
Pulling nitro_cache from {git,"https://github.com/nitrogen/nitro_cache",
                              {branch,master}}
Cloning into 'nitro_cache'...
==> cowboy (get-deps)
Pulling cowlib from {git,"https://github.com/ninenines/cowlib","2.8.0"}
Cloning into 'cowlib'...
Pulling ranch from {git,"https://github.com/ninenines/ranch","1.7.1"}
Cloning into 'ranch'...
==> cowlib (get-deps)
==> ranch (get-deps)
==> simple_bridge (get-deps)
Pulling stacktrace_compat from {git,"git://github.com/g-andrade/stacktrace_compat",
                                    {tag,"1.0.1"}}
Cloning into 'stacktrace_compat'...
fatal: unable to connect to github.com:
github.com[0: 140.82.113.3]: errno=Connection timed out

ERROR: sh(git clone -n git://github.com/g-andrade/stacktrace_compat stacktrace_compat)
failed with return code 128 and the following output:
Cloning into 'stacktrace_compat'...
fatal: unable to connect to github.com:
github.com[0: 140.82.113.3]: errno=Connection timed out


ERROR: 'get-deps' failed while processing /home/ubuntu/nitrogen/rel/nitrogen/lib/simple_bridge: rebar_abort
make[4]: *** [Makefile:15: get-deps] Error 1
make[4]: Leaving directory '/home/ubuntu/nitrogen/rel/nitrogen'
make[4]: Entering directory '/home/ubuntu/nitrogen/rel/nitrogen'
Generating a default cookie in /etc/vm.args
make[4]: Leaving directory '/home/ubuntu/nitrogen/rel/nitrogen'
make[4]: Entering directory '/home/ubuntu/nitrogen/rel/nitrogen'
make[4]: Leaving directory '/home/ubuntu/nitrogen/rel/nitrogen'
make[3]: Leaving directory '/home/ubuntu/nitrogen'
make[2]: Leaving directory '/home/ubuntu/nitrogen'
make[2]: Entering directory '/home/ubuntu/nitrogen'
make[2]: Leaving directory '/home/ubuntu/nitrogen'
make[2]: Entering directory '/home/ubuntu/nitrogen'
make[2]: Leaving directory '/home/ubuntu/nitrogen'
********************************************************************************
Generated a slim-release Nitrogen project
in ../ookmakyi, configured to run on cowboy.
********************************************************************************
make[1]: Leaving directory '/home/ubuntu/nitrogen'
ubuntu@MSI:~/nitrogen$

It seems stacktrace_compat is failing to pull even though the other dependencies aren’t. Any ideas?

1 Like

Ahh, the dependency is trying to pull it from git:// instead of https:// and github removed git:// support a while ago. I just fixed this in simple_bridge master branch.

Give it a shot and it should work now.

For the sake of working with the newest version of Nitrogen (still beta, and currently under pretty heavy development), try cloning the rebar3 branch.

git clone https://github.com/nitrogen/nitrogen -b rebar3

Then the make commands should work (including the new “hand holding” command make build which will ask you what you want to do, rather than having to remember the options. I just went through this scripts over the weekend on both windows and linux, so they should be quite a bit more reliable than they used to be.

2 Likes