Closed lin7sh closed 4 years ago
Are you using the versions from hex.pm?
@nextl00p I don't quite understand your question. But in my reber.config the rebar3_grisp plugin is sylane/fix-otp-22-patches branch which I think compatible with the OTP version I'm using which is 22.
I just merged @sylane 's fix.
Please try to use current master of both rebar3_grisp and grisp_tools. I think you forgot to include the latter as well.
I usually place it as symlinks pointing to local repo workspaces in the _checkouts
directory.
@nextl00p ok I'll try it. Indeed I don't use grisp_tools, I'll have a look as well, thanks
@mko-io A bit late to the party, but I added some development instructions to the README to clarify things: https://github.com/grisp/rebar3_grisp#development
@mko-io is this issue resolved?
@nextl00p Sorry for not updating this issue, I'll give it a try tomorrow and report back
I'm using the master branch of grisp/otp, good thing is that there's no error is time, but the erl-xcomp-22.conf not found
. Here's my rebar.conf and the full log
{deps, [grisp]}.
{erl_opts, [debug_info]}.
{grisp, [
{otp, [
{version, "22.0"}
]},
{build, [
{toolchain, [
{directory, "/usr/home/mko_io/mcu/grisp-software/rtems-install/rtems/5"}
]}
]},
{deploy, [
{destination, "foo.bin"}
]}
]}.
{shell, [{apps, []}]}.
{relx, [
{release, {foo, "0.1.0"}, [foo]}
]}.
mko_io@j4:$ DEBUG=1 rebar3 grisp build
===> Load global config file /home/mko_io/.config/rebar3/rebar.config
===> 22.0.7 satisfies the requirement for minimum OTP version 18
===> Compiling grisp_tools
===> run_hooks("/usr/home/mko_io/mcu/foo/_checkouts/grisp_tools", pre_hooks, compile) -> no hooks defined
===> run_hooks("/usr/home/mko_io/mcu/foo/_checkouts/grisp_tools", pre_hooks, erlc_compile) -> no hooks defined
===> erlopts [debug_info]
===> files to compile ["/usr/home/mko_io/mcu/foo/_checkouts/grisp_tools/src/grisp_tools_template.erl",
"/usr/home/mko_io/mcu/foo/_checkouts/grisp_tools/src/grisp_tools_handler.erl",
"/usr/home/mko_io/mcu/foo/_checkouts/grisp_tools/src/grisp_tools_util.erl",
"/usr/home/mko_io/mcu/foo/_checkouts/grisp_tools/src/grisp_tools.erl",
"/usr/home/mko_io/mcu/foo/_checkouts/grisp_tools/src/grisp_tools_deploy.erl"]
===> run_hooks("/usr/home/mko_io/mcu/foo/_checkouts/grisp_tools", post_hooks, erlc_compile) -> no hooks defined
===> run_hooks("/usr/home/mko_io/mcu/foo/_checkouts/grisp_tools", pre_hooks, app_compile) -> no hooks defined
===> run_hooks("/usr/home/mko_io/mcu/foo/_checkouts/grisp_tools", post_hooks, app_compile) -> no hooks defined
===> run_hooks("/usr/home/mko_io/mcu/foo/_checkouts/grisp_tools", post_hooks, compile) -> no hooks defined
===> Compiling rebar3_grisp
===> run_hooks("/usr/home/mko_io/mcu/foo/_checkouts/rebar3_grisp", pre_hooks, compile) -> no hooks defined
===> run_hooks("/usr/home/mko_io/mcu/foo/_checkouts/rebar3_grisp", pre_hooks, erlc_compile) -> no hooks defined
===> erlopts [debug_info]
===> files to compile ["/usr/home/mko_io/mcu/foo/_checkouts/rebar3_grisp/src/rebar3_grisp_build.erl",
"/usr/home/mko_io/mcu/foo/_checkouts/rebar3_grisp/src/rebar3_grisp.erl",
"/usr/home/mko_io/mcu/foo/_checkouts/rebar3_grisp/src/rebar3_grisp_version.erl",
"/usr/home/mko_io/mcu/foo/_checkouts/rebar3_grisp/src/rebar3_grisp_deploy.erl",
"/usr/home/mko_io/mcu/foo/_checkouts/rebar3_grisp/src/rebar3_grisp_util.erl"]
===> run_hooks("/usr/home/mko_io/mcu/foo/_checkouts/rebar3_grisp", post_hooks, erlc_compile) -> no hooks defined
===> run_hooks("/usr/home/mko_io/mcu/foo/_checkouts/rebar3_grisp", pre_hooks, app_compile) -> no hooks defined
===> run_hooks("/usr/home/mko_io/mcu/foo/_checkouts/rebar3_grisp", post_hooks, app_compile) -> no hooks defined
===> run_hooks("/usr/home/mko_io/mcu/foo/_checkouts/rebar3_grisp", post_hooks, compile) -> no hooks defined
===> Expanded command sequence to be run: []
===> Provider: {default,do}
===> Expanded command sequence to be run: [{default,app_discovery},
{default,install_deps},
{grisp,build}]
===> Provider: {default,app_discovery}
===> Evaluating config script "/usr/home/mko_io/mcu/foo/_build/default/lib/grisp/rebar.config.script"
===> Provider: {default,install_deps}
===> Verifying dependencies...
===> Provider: {grisp,build}
===> Checking out Erlang/OTP 22.0
* Using existing checkout
===> sh info:
cwd: "/usr/home/mko_io/mcu/foo"
cmd: git checkout grisp/OTP-22.0
===> opts: [{cd,"/usr/home/mko_io/mcu/foo/_grisp/otp/22.0/build"},
abort_on_error]
===> Port Cmd: git checkout grisp/OTP-22.0
Port Opts: [{cd,"/usr/home/mko_io/mcu/foo/_grisp/otp/22.0/build"},
exit_status,
{line,16384},
use_stdio,stderr_to_stdout,hide,eof]
* Copying C code...
===> Apps [{mapz,"/usr/home/mko_io/mcu/foo/_build/default/lib/mapz"},
{grisp,"/usr/home/mko_io/mcu/foo/_build/default/lib/grisp"},
{foo,"/usr/home/mko_io/mcu/foo"}], Board "grisp_base"
===> Detected the following C files:
SystemFiles #{"erts/emulator/sys/unix/erl_main.c" =>
"/usr/home/mko_io/mcu/foo/_build/default/lib/grisp/grisp/grisp_base/sys/erl_main.c"}
, DriverFiles #{"erts/emulator/drivers/unix/grisp_gpio_drv.c" =>
"/usr/home/mko_io/mcu/foo/_build/default/lib/grisp/grisp/grisp_base/drivers/grisp_gpio_drv.c",
"erts/emulator/drivers/unix/grisp_i2c_drv.c" =>
"/usr/home/mko_io/mcu/foo/_build/default/lib/grisp/grisp/grisp_base/drivers/grisp_i2c_drv.c",
"erts/emulator/drivers/unix/grisp_spi_drv.c" =>
"/usr/home/mko_io/mcu/foo/_build/default/lib/grisp/grisp/grisp_base/drivers/grisp_spi_drv.c",
"erts/emulator/drivers/unix/grisp_termios_drv.c" =>
"/usr/home/mko_io/mcu/foo/_build/default/lib/grisp/grisp/grisp_base/drivers/grisp_termios_drv.c"}
, NIFFiles #{}
===> GRiSP - Copy "/usr/home/mko_io/mcu/foo/_build/default/lib/grisp/grisp/grisp_base/drivers/grisp_gpio_drv.c" -> "/usr/home/mko_io/mcu/foo/_grisp/otp/22.0/build/erts/emulator/drivers/unix/grisp_gpio_drv.c"
===> GRiSP - Copy "/usr/home/mko_io/mcu/foo/_build/default/lib/grisp/grisp/grisp_base/drivers/grisp_i2c_drv.c" -> "/usr/home/mko_io/mcu/foo/_grisp/otp/22.0/build/erts/emulator/drivers/unix/grisp_i2c_drv.c"
===> GRiSP - Copy "/usr/home/mko_io/mcu/foo/_build/default/lib/grisp/grisp/grisp_base/drivers/grisp_spi_drv.c" -> "/usr/home/mko_io/mcu/foo/_grisp/otp/22.0/build/erts/emulator/drivers/unix/grisp_spi_drv.c"
===> GRiSP - Copy "/usr/home/mko_io/mcu/foo/_build/default/lib/grisp/grisp/grisp_base/drivers/grisp_termios_drv.c" -> "/usr/home/mko_io/mcu/foo/_grisp/otp/22.0/build/erts/emulator/drivers/unix/grisp_termios_drv.c"
===> GRiSP - Copy "/usr/home/mko_io/mcu/foo/_build/default/lib/grisp/grisp/grisp_base/sys/erl_main.c" -> "/usr/home/mko_io/mcu/foo/_grisp/otp/22.0/build/erts/emulator/sys/unix/erl_main.c"
* Patching OTP to include sys, driver and NIF files
===> Patching OTP Version "22.0"
===> Using Template "/usr/home/mko_io/mcu/foo/_checkouts/rebar3_grisp/priv/patches/otp-22.0.patch.mustache"
===> sh info:
cwd: "/usr/home/mko_io/mcu/foo"
cmd: git apply otp.patch --ignore-whitespace --reverse --check
===> opts: [{cd,"/usr/home/mko_io/mcu/foo/_grisp/otp/22.0/build"},
return_on_error,abort_on_error]
===> Port Cmd: git apply otp.patch --ignore-whitespace --reverse --check
Port Opts: [{cd,"/usr/home/mko_io/mcu/foo/_grisp/otp/22.0/build"},
exit_status,
{line,16384},
use_stdio,stderr_to_stdout,hide,eof]
(skipped, already patched)
===> sh info:
cwd: "/usr/home/mko_io/mcu/foo"
cmd: rm otp.patch
===> opts: [{cd,"/usr/home/mko_io/mcu/foo/_grisp/otp/22.0/build"},
abort_on_error]
===> Port Cmd: rm otp.patch
Port Opts: [{cd,"/usr/home/mko_io/mcu/foo/_grisp/otp/22.0/build"},
exit_status,
{line,16384},
use_stdio,stderr_to_stdout,hide,eof]
===> Building
===> File grisp/grisp_base/xcomp/erl-xcomp-22.0.conf not found
rebar3 clean and rebar3 upgrade solve the problem. thanks
Hi, I'm following the guide and found the following error
and there my rebar report