ninenines / erlang.mk

A build tool for Erlang that just works.
https://erlang.mk
ISC License
579 stars 238 forks source link

Error: `No Makefile to build dependency` occurrs, executing the `make` command with `-j` option. #931

Closed segachan closed 1 year ago

segachan commented 3 years ago

Same as the title. However, there is no error without -j option.

output in the details:

segachan@my-host-name:~/src/myapp$ docker -v
Docker version 20.10.6, build 370c289
segachan@my-host-name:~/src/myapp$ docker run --interactive --tty --rm --network host myapp:$(git describe)_poky1.7.2 /bin/sh
/usr/src/myapp # uname -a
Linux my-host-name 5.4.0-1049-aws #51-Ubuntu SMP Wed May 12 21:13:52 UTC 2021 ppc GNU/Linux
/usr/src/myapp # more /etc/issue
Poky (Yocto Project Reference Distro) 1.7.2 \n \l

/usr/src/myapp # make -v
GNU Make 4.0
Built for powerpc-poky-linux-gnu
Copyright (C) 1988-2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
/usr/src/myapp # gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/powerpc-unknown-linux-gnu/9.2.0/lto-wrapper
Target: powerpc-unknown-linux-gnu
Configured with: ../configure --disable-bootstrap --prefix=/usr
Thread model: posix
gcc version 9.2.0 (GCC) 
/usr/src/myapp # 
/usr/src/myapp # erl
getsockopt level=1 optname=13 not yet supported
Erlang/OTP 24 [erts-12.0] [source] [smp:2:2] [ds:2:2:10] [async-threads:1]

Eshell V12.0  (abort with ^G)
1> 
User switch command
 --> q
/usr/src/myapp # erl
getsockopt level=1 optname=13 not yet supported
Erlang/OTP 24 [erts-12.0] [source] [smp:2:2] [ds:2:2:10] [async-threads:1]

Eshell V12.0  (abort with ^G)
1> now().
{1623,152303,747126}
2> 
User switch command
 --> q
/usr/src/myapp # 
/usr/src/myapp # 
/usr/src/myapp # more Makefile 
PROJECT = myapp

LOCAL_DEPS = mnesia xmerl
DEPS = cowboy lager jsone gen_icmp procket pkt iso8601
dep_cowboy_commit = 2.8.0

DEP_PLUGINS = cowboy

# To treat json.
dep_jsone = git git://github.com/sile/jsone.git
# To manage Log.
dep_lager = git https://github.com/erlang-lager/lager
# To use icmp ping.
dep_gen_icmp = git git://github.com/msantos/gen_icmp.git
# To use ISO 8601 time format
dep_iso8601 = git https://github.com/erlsci/iso8601.git

include erlang.mk

ERLC_OPTS += +'{parse_transform, lager_transform}'
/usr/src/myapp # 
/usr/src/myapp # make distclean
getsockopt level=1 optname=13 not yet supported
 DEP    cowboy (2.8.0)
getsockopt level=1 optname=13 not yet supported
getsockopt level=1 optname=13 not yet supported
getsockopt level=1 optname=13 not yet supported
 GEN    clean-app
 GEN    coverdata-clean
 GEN    distclean-tmp
 GEN    distclean-kerl
 GEN    distclean-deps
 GEN    distclean-ct
 GEN    distclean-plt
 GEN    distclean-edoc
 GEN    distclean-escript
 GEN    distclean-relx-rel
 GEN    distclean-xref
 GEN    cover-report-clean
/usr/src/myapp # make -j 2
getsockopt level=1 optname=13 not yet supported
 DEP    cowboy (2.8.0)
getsockopt level=1 optname=13 not yet supported
getsockopt level=1 optname=13 not yet supported
getsockopt level=1 optname=13 not yet supported
 DEP    lager ()
 DEP    jsone ()
getsockopt level=1 optname=13 not yet supported
getsockopt level=1 optname=13 not yet supported
getsockopt level=1 optname=13 not yet supported
getsockopt level=1 optname=13 not yet supported
/bin/sh: command: not found
/bin/sh: command: not found
/bin/sh: command: not found
/bin/sh: command: not found
qemu: Unsupported syscall: 357
getsockopt level=1 optname=13 not yet supported
{"init terminating in do_boot",{undef,[{rmemo,start,[],[]},{erl_eval,do_apply,6,[{file,"erl_eval.erl"},{line,685}]},{erl_eval,exprs,5,[{file,"erl_eval.erl"},{line,123}]},{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3,[]}]}}
init terminating in do_boot ({undef,[{rmemo,start,[],[]},{erl_eval,do_apply,6,[{_},{_}]},{erl_eval,exprs,5,[{_},{_}]},{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3,[]}]})

Crash dump is being written to: erl_crash.dump...done
 DEP    gen_icmp ()
getsockopt level=1 optname=13 not yet supported
No beam files found.
Recompile: src/rebar
getsockopt level=1 optname=13 not yet supported
getsockopt level=1 optname=13 not yet supported
/bin/sh: command: not found
/bin/sh: command: not found
Recompile: src/rebar_abnfc_compiler
Recompile: src/rebar_app_utils
Recompile: src/rebar_appups
getsockopt level=1 optname=13 not yet supported
{"init terminating in do_boot",{undef,[{rmemo,start,[],[]},{erl_eval,do_apply,6,[{file,"erl_eval.erl"},{line,685}]},{erl_eval,exprs,5,[{file,"erl_eval.erl"},{line,123}]},{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3,[]}]}}
init terminating in do_boot ({undef,[{rmemo,start,[],[]},{erl_eval,do_apply,6,[{_},{_}]},{erl_eval,exprs,5,[{_},{_}]},{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3,[]}]})

Crash dump is being written to: erl_crash.dump...done
Recompile: src/rebar_asn1_compiler
 DEP    procket (master)
Recompile: src/rebar_base_compiler
Recompile: src/rebar_cleaner
Recompile: src/rebar_config
Recompile: src/rebar_core
getsockopt level=1 optname=13 not yet supported
Recompile: src/rebar_cover_utils
getsockopt level=1 optname=13 not yet supported
/bin/sh: command: not found
/bin/sh: command: not found
qemu: Unsupported syscall: 357
Recompile: src/rebar_ct
getsockopt level=1 optname=13 not yet supported
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
{"init terminating in do_boot",{undef,[{rmemo,start,[],[]},{erl_eval,do_apply,6,[{file,"erl_eval.erl"},{line,685}]},{erl_eval,exprs,5,[{file,"erl_eval.erl"},{line,123}]},{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3,[]}]}}
init terminating in do_boot ({undef,[{rmemo,start,[],[]},{erl_eval,do_apply,6,[{_},{_}]},{erl_eval,exprs,5,[{_},{_}]},{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3,[]}]})

Crash dump is being written to: erl_crash.dump...done
 DEP    pkt (master)
getsockopt level=1 optname=13 not yet supported
Recompile: src/rebar_dia_compiler
Recompile: src/rebar_dialyzer
Recompile: src/rebar_edoc
getsockopt level=1 optname=13 not yet supported
Recompile: src/rebar_erlc_compiler
/bin/sh: command: not found
/bin/sh: command: not found
qemu: Unsupported syscall: 357
getsockopt level=1 optname=13 not yet supported
{"init terminating in do_boot",{undef,[{rmemo,start,[],[]},{erl_eval,do_apply,6,[{file,"erl_eval.erl"},{line,685}]},{erl_eval,exprs,5,[{file,"erl_eval.erl"},{line,123}]},{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3,[]}]}}
init terminating in do_boot ({undef,[{rmemo,start,[],[]},{erl_eval,do_apply,6,[{_},{_}]},{erl_eval,exprs,5,[{_},{_}]},{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3,[]}]})

Crash dump is being written to: erl_crash.dump...Recompile: src/rebar_erlydtl_compiler
done
 DEP    iso8601 ()
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
getsockopt level=1 optname=13 not yet supported
Recompile: src/rebar_getopt
getsockopt level=1 optname=13 not yet supported
/bin/sh: command: not found
/bin/sh: command: not found
qemu: Unsupported syscall: 357
Recompile: src/rebar_lfe_compiler
Recompile: src/rebar_log
getsockopt level=1 optname=13 not yet supported
Recompile: src/rebar_metacmds
Recompile: src/rebar_mustache
{"init terminating in do_boot",{undef,[{rmemo,start,[],[]},{erl_eval,do_apply,6,[{file,"erl_eval.erl"},{line,685}]},{erl_eval,exprs,5,[{file,"erl_eval.erl"},{line,123}]},{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3,[]}]}}
init terminating in do_boot ({undef,[{rmemo,start,[],[]},{erl_eval,do_apply,6,[{_},{_}]},{erl_eval,exprs,5,[{_},{_}]},{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3,[]}]})

Crash dump is being written to: erl_crash.dump...done
 GEN    /usr/src/myapp/.erlang.mk/relx
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.
/usr/src/myapp
qemu: Unsupported syscall: 357
getsockopt level=1 optname=13 not yet supported
make[1]: Entering directory '/usr/src/myapp/deps/cowboy'
 DEP    cowlib (2.9.1)
 DEP    ranch (1.7.1)
getsockopt level=1 optname=13 not yet supported
getsockopt level=1 optname=13 not yet supported
 GEN    rebar.config
make[2]: Entering directory '/usr/src/myapp/deps/cowlib'
 DEPEND cowlib.d
getsockopt level=1 optname=13 not yet supported
 ERLC   cow_base64url.erl cow_cookie.erl cow_date.erl cow_hpack.erl cow_http.erl cow_http2.erl cow_http2_machine.erl cow_http_hd.erl cow_http_struct_hd.erl cow_http_te.erl cow_iolists.erl cow_link.erl cow_mimetypes.erl cow_multipart.erl cow_qs.erl cow_spdy.erl cow_sse.erl cow_uri.erl cow_uri_template.erl cow_ws.erl
 APP    cowlib
getsockopt level=1 optname=13 not yet supported
make[2]: Leaving directory '/usr/src/myapp/deps/cowlib'
make[2]: Entering directory '/usr/src/myapp/deps/ranch'
 DEPEND ranch.d
getsockopt level=1 optname=13 not yet supported
 ERLC   ranch.erl ranch_acceptor.erl ranch_acceptors_sup.erl ranch_app.erl ranch_conns_sup.erl ranch_crc32c.erl ranch_listener_sup.erl ranch_protocol.erl ranch_proxy_header.erl ranch_server.erl ranch_ssl.erl ranch_sup.erl ranch_tcp.erl ranch_transport.erl
src/ranch_ssl.erl:142:7: Warning: ssl:ssl_accept/3 is removed; use ssl_handshake/1,2,3 instead
%  142|         case ssl:ssl_accept(CSocket, Opts, Timeout) of
%     |              ^

 APP    ranch
getsockopt level=1 optname=13 not yet supported
make[2]: Leaving directory '/usr/src/myapp/deps/ranch'
 DEPEND cowboy.d
getsockopt level=1 optname=13 not yet supported
 ERLC   cowboy.erl cowboy_app.erl cowboy_bstr.erl cowboy_children.erl cowboy_clear.erl cowboy_clock.erl cowboy_compress_h.erl cowboy_constraints.erl cowboy_handler.erl cowboy_http.erl cowboy_http2.erl cowboy_loop.erl cowboy_metrics_h.erl cowboy_middleware.erl cowboy_req.erl cowboy_rest.erl cowboy_router.erl cowboy_static.erl cowboy_stream.erl cowboy_stream_h.erl cowboy_sub_protocol.erl cowboy_sup.erl cowboy_tls.erl cowboy_tracer_h.erl cowboy_websocket.erl
 APP    cowboy
getsockopt level=1 optname=13 not yet supported
make[1]: Leaving directory '/usr/src/myapp/deps/cowboy'
Error: No Makefile to build dependency /usr/src/myapp/deps/lager.
erlang.mk:4512: recipe for target 'deps' failed
make: *** [deps] Error 2
/usr/src/myapp # 
/usr/src/myapp # exit
segachan@my-host-name:~/src/myapp$ 

additional info

essen commented 1 year ago

The key is probably in this:

/bin/sh: command: not found
/bin/sh: command: not found
/bin/sh: command: not found
/bin/sh: command: not found

In order to build concurrently some extra software is necessary, like lockf or flock depending on the platform.

Closing, thanks!