esl / erlang_ale

Erlang Actor Library for Embedded -- An embedded framework from Erlang Solutions
Apache License 2.0
207 stars 65 forks source link

Failed to compile erlang_ale within erlang.mk #17

Open ethrbh opened 9 years ago

ethrbh commented 9 years ago

Dear erlang-ale developers,

First of all I would like thanks for your grate support you gave me previously. Now I could control the GPIO pins of my Raspberry Pi. Today I started build up my own project, where the erlang-ale will be a dependency. I spent several hours with googling what and how I should do for able to do this, and I find erlang.mk (https://github.com/ninenines/erlang.mk) project what looks good and according its doc. It is easy to configure to use any dependency. So I cloned the erlang.mk project and made an own Makefile according to its description, where I set erlang-ale as a dependency project. Once I was ready with the Makefile, I tried make the project.

1st scenario: This is the contents of my Makefile in erlang.mk dir PROJECT = erlang.mk DEPS = erlang_ale dep_erlang_ale = git https://github.com/esl/erlang_ale.git master include erlang.mk

According to the console printout, erlang-ale is cloned well, and started compile. Unfortunately compilation has failed when it started to compile meck project
    Compiled src/gproc.erl
    make[2]: Leaving directory '/home/pi/ethrbh/erlang.mk/deps/gproc'
    make[2]: Entering directory '/home/pi/ethrbh/erlang.mk/deps/meck'
    /bin/sh: 1: ./rebar: not found
    /bin/sh: 1: compile: not found
    Makefile:6: recipe for target 'compile' failed
    make[2]: *** [compile] Error 127

The second error below that when started to compile erlang_portutils project
    make[2]: Entering directory '/home/pi/ethrbh/erlang.mk/deps/erlang_portutil'
    gcc -c -o portutil.o portutil.c -Wall -std=c99 -I/usr/lib/erlang/usr/include
    make[2]: Leaving directory '/home/pi/ethrbh/erlang.mk/deps/erlang_portutil'
    mkdir -p priv ebin
    gcc -I/usr/local/include -I/usr/lib/erlang/lib/erl_interface-3.7.17/include -I/usr/lib/erlang/usr/include/ -Ideps/erlang_portutil -Ideps/pihwm/lib -c -o priv/portutil.o deps/erlang_portutil/portutil.c 
    gcc: error: deps/erlang_portutil/portutil.c: No such file or directory
    gcc: fatal error: no input files
    compilation terminated.
    Makefile:37: recipe for target 'portutil' failed
    make[1]: *** [portutil] Error 4

2nd scenario: I tried solve the issues by myself. For this first I forked erlang-ale project (https://github.com/ethrbh/erlang_ale) and modified the Makefile, by removing meck from the dependency list. Once it was done, I changed the reference of erlang-ale in erlang.mk/Makefile to refer to my own version. Once it was done, I restarted to make my own project below erlang.mk. Now the meck fault was not seen, but erlang_portutils still not able to compile, the same error appeared whet I got before (see above).

This is the contents of my Makefile in erlang.mk dir
    PROJECT = erlang.mk
    DEPS = erlang_ale
    dep_erlang_ale = git https://github.com/ethrbh/erlang_ale.git master
    include erlang.mk

I would like to ask you please try help me what did I wrong.

Thanks for your help, /Robi

Ps: Please find the whole console log on the 1st scenario pi@raspberrypi ~/ethrbh/erlang.mk $ pi@raspberrypi ~/ethrbh/erlang.mk $ make Cloning into '/home/pi/ethrbh/erlang.mk/deps/erlang_ale'... remote: Counting objects: 867, done. remote: Total 867 (delta 0), reused 0 (delta 0), pack-reused 866 Resolving deltas: 100% (412/412), done. make[1]: Entering directory '/home/pi/ethrbh/erlang.mk/deps/erlang_ale' git clone -n -- https://github.com/lehoff/gproc.git /home/pi/ethrbh/erlang.mk/deps/gproc Cloning into '/home/pi/ethrbh/erlang.mk/deps/gproc'... remote: Counting objects: 1308, done. remote: Total 1308 (delta 0), reused 0 (delta 0), pack-reused 1308 Resolving deltas: 100% (783/783), done. cd /home/pi/ethrbh/erlang.mk/deps/gproc ; git checkout -q master cd /home/pi/ethrbh/erlang.mk/deps/gproc ; if [ -n ]; then eval ; fi
git clone -n -- https://github.com/eproxus/meck.git /home/pi/ethrbh/erlang.mk/deps/meck Cloning into '/home/pi/ethrbh/erlang.mk/deps/meck'... remote: Counting objects: 1596, done. remote: Total 1596 (delta 0), reused 0 (delta 0), pack-reused 1596 Resolving deltas: 100% (910/910), done. cd /home/pi/ethrbh/erlang.mk/deps/meck ; git checkout -q 0.7.2 cd /home/pi/ethrbh/erlang.mk/deps/meck ; if [ -n ]; then eval ; fi
git clone -n -- https://github.com/omerk/pihwm.git /home/pi/ethrbh/erlang.mk/deps/pihwm Cloning into '/home/pi/ethrbh/erlang.mk/deps/pihwm'... remote: Counting objects: 829, done. remote: Total 829 (delta 0), reused 0 (delta 0), pack-reused 829 Resolving deltas: 100% (456/456), done. cd /home/pi/ethrbh/erlang.mk/deps/pihwm ; git checkout -q master cd /home/pi/ethrbh/erlang.mk/deps/pihwm ; if [ -n ]; then eval ; fi
git clone -n -- https://github.com/omerk/erlang_portutil /home/pi/ethrbh/erlang.mk/deps/erlang_portutil Cloning into '/home/pi/ethrbh/erlang.mk/deps/erlang_portutil'... remote: Counting objects: 41, done. remote: Total 41 (delta 0), reused 0 (delta 0), pack-reused 41 Unpacking objects: 100% (41/41), done. cd /home/pi/ethrbh/erlang.mk/deps/erlang_portutil ; git checkout -q master cd /home/pi/ethrbh/erlang.mk/deps/erlang_portutil ; if [ -n ]; then eval ; fi
make[2]: Entering directory '/home/pi/ethrbh/erlang.mk/deps/gproc' ./rebar get-deps ==> gproc (get-deps) ./rebar compile ==> gproc (compile) Compiled src/gproc_pt.erl Compiled src/gproc_app.erl Compiled src/gproc_info.erl Compiled src/gproc_sup.erl Compiled src/gproc_lib.erl Compiled src/gproc_init.erl Compiled src/gproc_ps.erl Compiled src/gproc_bcast.erl src/gproc_dist.erl:23: Warning: behaviour gen_leader undefined Compiled src/gproc_dist.erl Compiled src/gproc_monitor.erl Compiled src/gproc_pool.erl Compiled src/gproc.erl make[2]: Leaving directory '/home/pi/ethrbh/erlang.mk/deps/gproc' make[2]: Entering directory '/home/pi/ethrbh/erlang.mk/deps/meck' /bin/sh: 1: ./rebar: not found /bin/sh: 1: compile: not found Makefile:6: recipe for target 'compile' failed make[2]: * [compile] Error 127 make[2]: Leaving directory '/home/pi/ethrbh/erlang.mk/deps/meck' make[2]: Entering directory '/home/pi/ethrbh/erlang.mk/deps/pihwm' make[2]: * No targets specified and no makefile found. Stop. make[2]: Leaving directory '/home/pi/ethrbh/erlang.mk/deps/pihwm' make[2]: Entering directory '/home/pi/ethrbh/erlang.mk/deps/erlang_portutil' gcc -c -o portutil.o portutil.c -Wall -std=c99 -I/usr/lib/erlang/usr/include make[2]: Leaving directory '/home/pi/ethrbh/erlang.mk/deps/erlang_portutil' mkdir -p priv ebin gcc -I/usr/local/include -I/usr/lib/erlang/lib/erl_interface-3.7.17/include -I/usr/lib/erlang/usr/include/ -Ideps/erlang_portutil -Ideps/pihwm/lib -c -o priv/portutil.o deps/erlang_portutil/portutil.c gcc: error: deps/erlang_portutil/portutil.c: No such file or directory gcc: fatal error: no input files compilation terminated. Makefile:37: recipe for target 'portutil' failed make[1]: * [portutil] Error 4 make[1]: Leaving directory '/home/pi/ethrbh/erlang.mk/deps/erlang_ale' erlang.mk:141: recipe for target 'deps' failed make: * [deps] Error 2 pi@raspberrypi ~/ethrbh/erlang.mk $ pi@raspberrypi ~/ethrbh/erlang.mk $ cat Makefile PROJECT = erlang.mk DEPS = erlang_ale dep_erlang_ale = git https://github.com/esl/erlang_ale.git master

include erlang.mk
pi@raspberrypi ~/ethrbh/erlang.mk $ 
pi@raspberrypi ~/ethrbh/erlang.mk $ ls
build.config  deps       LICENSE   packages.v1.tsv  packages.v2.tsv  plugins    src
core          erlang.mk  Makefile  packages.v1.txt  pkg_add.sh       README.md  test
pi@raspberrypi ~/ethrbh/erlang.mk $