Compile cowboy project ignoring errors - makefile

I had this working with a modification to ERLC_OPTS, or so I thought.
Had to clean up my erlang.mk and didn't save it.
Where do I add the warnings ok flag?
root#marble-pyramid-1:~/tunnel-deploy# make run
erlang.mk:26: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
make[1]: Entering directory `/root/tunnel-deploy/deps/cowboy'
/root/tunnel-deploy/erlang.mk:26: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
make[2]: Entering directory `/root/tunnel-deploy/deps/cowlib'
/root/tunnel-deploy/erlang.mk:26: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
DEPEND cowlib.d
/root/tunnel-deploy/erlang.mk:26: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
ERLC cow_base64url.erl cow_cookie.erl cow_date.erl cow_hpack.erl cow_http.erl cow_http2.erl cow_http_hd.erl cow_http_te.erl cow_mimetypes.erl cow_multipart.erl cow_qs.erl cow_spdy.erl cow_sse.erl cow_uri.erl cow_ws.erl
APP cowlib
make[2]: Leaving directory `/root/tunnel-deploy/deps/cowlib'
make[2]: Entering directory `/root/tunnel-deploy/deps/ranch'
/root/tunnel-deploy/erlang.mk:26: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
DEPEND ranch.d
/root/tunnel-deploy/erlang.mk:26: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
make[2]: Leaving directory `/root/tunnel-deploy/deps/ranch'
DEPEND cowboy.d
/root/tunnel-deploy/erlang.mk:26: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
GEN rebar.config
make[1]: Leaving directory `/root/tunnel-deploy/deps/cowboy'
make[1]: Entering directory `/root/tunnel-deploy/deps/jiffy'
/root/tunnel-deploy/erlang.mk:26: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
CC=cc escript enc compile
make -f c_src/Makefile.erlang.mk
make[2]: Entering directory `/root/tunnel-deploy/deps/jiffy'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/root/tunnel-deploy/deps/jiffy'
DEPEND jiffy.d
/root/tunnel-deploy/erlang.mk:26: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
make[1]: Leaving directory `/root/tunnel-deploy/deps/jiffy'
DEPEND tunnel.d
erlang.mk:26: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
ERLC actions.erl board.erl clock.erl door.erl hall.erl join_handler.erl player_status_handler.erl res.erl res_test.erl room.erl room_test.erl s.erl seats.erl table.erl table_info_handler.erl table_play_handler.erl table_test.erl tunnel_app.erl tunnel_sup.erl
compile: warnings being treated as errors
src/actions.erl:2: export_all flag enabled - all functions will be exported
make[1]: *** [ebin/tunnel.app] Error 1
make: *** [app] Error 2
I tried adding -W0 to this:
Write(["ERLANG_ARCH = ", rebar_utils:wordsize(), "\nexport ERLANG_ARCH\n"]),
fun() ->
Write("ERLC_OPTS = +debug_info -W0\nexport ERLC_OPTS\n"),
case lists:keyfind(erl_opts, 1, Conf) of
false -> ok;
{_, ErlOpts} ->
but I still get that error.

You could try to filter out the default options Erlang.mk uses for compilation by setting ERLC_OPTS like this:
ERLC_OPTS := $(filter-out -Werror,$(ERLC_OPTS))
as per Erlang.mk user guide

Related

Trying to make sonic annotator *keeps* failing

Trying to make install sonic annotator. I've added a lot of dependencies. The error I'm getting now is
supportprogs: test succeeded
helpfulflags: terminate called after throwing an instance of 'Dataquay::RDFIncompleteURI'
what(): Uri::Uri: Given string is not a complete absolute URI [with string "doap:download-page"]
./test-helpfulflags.sh: line 24: 125839 Aborted (core dumped) $r --skeleton $percplug > /dev/null
Test failed: Fails to run with --skeleton vamp:vamp-example-plugins:percussiononsets
*** Test FAILED
make[1]: *** [Makefile.runner:182: sonic-annotator] Error 1
make[1]: Leaving directory '/home/luke/Desktop/sonic-annotator-1.6'
make: *** [Makefile:164: sub-runner-pro-make_first-ordered] Error 2
I am, as I ask the question, trying to use
vamp-rdf-template-generator doap:http://vamp-plugins.org/rdf/plugins/vamp-example-plugins vamp:vamp-example-plugins:percussiononsets
In the following folder
/usr/local/lib/vamp$ ls
libvamp-hostsdk.so vamp-example-plugins.cat vamp-test-plugin.cat
libvamp-sdk.so vamp-example-plugins.n3 vamp-test-plugin.so
plugins.cpp vamp-example-plugins.so
pyin.so vamp-rdf-template-generator
I am not optimistic.
B4fore running ./configure and make, again. Another thing that is annoying me, is that whenever make fails to complete, trying make install or make again, shows there is nothing to do: but I still can't run sonic-annotator. Meaning I go and delete the folder and start from the beginning again...
It seems to be the case that vamp-rdf-template-generator will not overwrite its previous actions, so I had to delete vamp-example-plugins, which was inside the vamp folder, and run the former command with the uri, correct above.
The uri I provided is fine, an absolute one. I checked it by running the java code here Convert relative path to absolute using JavaScript via jnode.
So make finishes without errors. I then ran make install, and there was nothing to do again. Have tried running make and make install with sudo, and nothing changes
~/Downloads/sonic-annotator-1.6$ sudo make install
( test -e Makefile.base || /usr/lib/qt5/bin/qmake -o Makefile.base /home/luke/Downloads/sonic-annotator-1.6/base.pro ) && make -f Makefile.base install
make[1]: Entering directory '/home/luke/Downloads/sonic-annotator-1.6'
make[1]: Nothing to be done for 'install'.
make[1]: Leaving directory '/home/luke/Downloads/sonic-annotator-1.6'
( test -e Makefile.test-svcore-base || /usr/lib/qt5/bin/qmake -o Makefile.test-svcore-base /home/luke/Downloads/sonic-annotator-1.6/test-svcore-base.pro ) && make -f Makefile.test-svcore-base install
make[1]: Entering directory '/home/luke/Downloads/sonic-annotator-1.6'
make[1]: Nothing to be done for 'install'.
make[1]: Leaving directory '/home/luke/Downloads/sonic-annotator-1.6'
( test -e Makefile.test-svcore-system || /usr/lib/qt5/bin/qmake -o Makefile.test-svcore-system /home/luke/Downloads/sonic-annotator-1.6/test-svcore-system.pro ) && make -f Makefile.test-svcore-system install
make[1]: Entering directory '/home/luke/Downloads/sonic-annotator-1.6'
make[1]: Nothing to be done for 'install'.
make[1]: Leaving directory '/home/luke/Downloads/sonic-annotator-1.6'
( test -e Makefile.test-svcore-data-fileio || /usr/lib/qt5/bin/qmake -o Makefile.test-svcore-data-fileio /home/luke/Downloads/sonic-annotator-1.6/test-svcore-data-fileio.pro ) && make -f Makefile.test-svcore-data-fileio install
make[1]: Entering directory '/home/luke/Downloads/sonic-annotator-1.6'
make[1]: Nothing to be done for 'install'.
make[1]: Leaving directory '/home/luke/Downloads/sonic-annotator-1.6'
( test -e Makefile.runner || /usr/lib/qt5/bin/qmake -o Makefile.runner /home/luke/Downloads/sonic-annotator-1.6/runner.pro ) && make -f Makefile.runner install
make[1]: Entering directory '/home/luke/Downloads/sonic-annotator-1.6'
make[1]: Nothing to be done for 'install'.
make[1]: Leaving directory '/home/luke/Downloads/sonic-annotator-1.6'
So the issue is solved without installation / success.

“cc: command not found” when running make for libgcrypt on windows 10

G'day all. Just to preface this, I'm not an experienced programmer, so I might not use the correct jargon.
I'm in the process of installing GnuPG 2.2.19 on a Windows 10 machine (build no. 18363.628). I have installed MinGW (version 2013072300 according to mingw-get), as well as npth 1.6 and libgpg-error 1.37. I'm now attempting to install libgcrypt 1.8.5. Running ./autogen.sh --build-w32 works, but running make fails with the following output (I am using msys.bat as my shell):
$ make
make all-recursive
make[1]: Entering directory '/c/Users/USER/Downloads/libgcrypt-1.8.5.tar/libgcrypt-1.8.5/libgcrypt-1.8.5'
Making all in compat
make[2]: Entering directory '/c/Users/USER/Downloads/libgcrypt-1.8.5.tar/libgcrypt-1.8.5/libgcrypt-1.8.5/compat'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/c/Users/USER/Downloads/libgcrypt-1.8.5.tar/libgcrypt-1.8.5/libgcrypt-1.8.5/compat'
Making all in mpi
make[2]: Entering directory '/c/Users/USER/Downloads/libgcrypt-1.8.5.tar/libgcrypt-1.8.5/libgcrypt-1.8.5/mpi'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/c/Users/USER/Downloads/libgcrypt-1.8.5.tar/libgcrypt-1.8.5/libgcrypt-1.8.5/mpi'
Making all in cipher
make[2]: Entering directory '/c/Users/USER/Downloads/libgcrypt-1.8.5.tar/libgcrypt-1.8.5/libgcrypt-1.8.5/cipher'
cc -o gost-s-box ./gost-s-box.c
make[2]: cc: Command not found
make[2]: *** [gost-s-box] Error 127
make[2]: Leaving directory '/c/Users/USER/Downloads/libgcrypt-1.8.5.tar/libgcrypt-1.8.5/libgcrypt-1.8.5/cipher'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/c/Users/USER/Downloads/libgcrypt-1.8.5.tar/libgcrypt-1.8.5/libgcrypt-1.8.5'
make: *** [all] Error 2
Unfortunately I accidentally closed the shell window after the first time I ran make, so this is from when I ran it a second time, hence the "Nothing to be done" stuff.
I have checked the Makefile for libgcrypt; it contains the following:
CC = mingw32-gcc
CCAS = mingw32-gcc
CCASDEPMODE = depmode=gcc3
CCASFLAGS = -g -O2
CCDEPMODE = depmode=gcc3
CC_FOR_BUILD = cc
I've checked the MinGW root folder, and gcc.exe and mingw32-gcc.exe are both present in the bin folder. I've also tried changing the first of those lines above to CC=gcc; no change.
Anyone have any suggestions as to what the problem is? Thanks in advance.
Ok, so I managed to solve it myself; after some research, I found that creating a symlink "CC.exe" to "mingw32-gcc.exe" in MinGW's bin did the trick.

Make threw out an error but no detailed error message

Here's the last few lines from the output of running "make install" at root level /home/gm/TEST/:
make[3]: Leaving directory `/home/gm/TEST/tppf/tm/ipmgt'
ld ipfac.o ipfacV.o ipfac_rset.o ipfac_args.o ipfac_d2a.o ipfac_a2d.o ipfac_modr.o ipfac_mod.o ipfac_read.o ipfac_add.o ipfac_del.o ipfac_list.o ipfac_unlk.o ipfac_lock.o ipfac_util.o ipfac_lkid.o -r -o /home/gm/TEST/tppf/lib/ipfac_tppf.o
make[3]: Leaving directory `/home/gm/TEST/tppf/tm/ipfac'
make[2]: Leaving directory `/home/gm/TEST/tppf/tm'
make[1]: *** [i_tm] Error 2
make[1]: Leaving directory `/home/gm/TEST/tppf'
make: *** [i_tppf] Error 2
And the Makefile under /home/gm/TEST/tppf/tm/ipfac contains this rule:
install: ipfac.h $(TPPLIB)/ipfac_tppf.o
$(TPPLIB)/ipfac_tppf.o: $(PROPOBJS)
ld $(PROPOBJS) -r -o $(TPPLIB)/ipfac_tppf.o
Is there something wrong with the linking process? Make should've told me what the error actually is, but it didn't.
BTW, I think /home/gm/TEST/tppf/lib/ipfac_tppf. O was linked and created successfully, or at least it was there in directory /home/gm/TEST/tppf/lib/ after make failed and exited.
That line is not the error line. You can tell that it succeeded because there was no error message there, for building the target /home/gm/TEST/tppf/lib/ipfac_tppf.o.
The error is here:
make[1]: *** [i_tm] Error 2
The [1] means that it was the first level of makefile (note the recipe you are quoting here was in the 3rd level of makefile) and the [i_tm] means that the build of the target i_tm failed. You need to look back up further in the output of make, earlier than what you've shown us, and find the *** error line for building the i_tm target and see what errors were generated there.

SkaMPI compilation error, Makefile.dep:5: *** missing separator.

I was trying to compile SkaMPI 5 using latest GNU make(3.81), but getting below error :
make -f Makefile.dep MPICC="mpicc" CFLAGS="-O2" skampi
make[1]: Entering directory
Makefile.dep:5: *** missing separator. Stop.
make[1]: Leaving directory
make: *** [skampi] Error 2

How do I build camlp5-6.11 on Windows 8 under cygwin with OCaml 4.01.0?

I installed OCaml 4.01.0 from http://protz.github.io/ocaml-installer/. I am now trying to build camlp5-6.11. When I run ./configure && make world.opt in cygwin, I get
...
sed -e "s|#VERSION#|6.11|" -e "s|#CAMLP5DIR#|D:\OCaml\lib/camlp5|" META.tpl > META
make[2]: Leaving directory '/cygdrive/d/Downloads/camlp5-6.11/etc'
make[2]: Entering directory '/cygdrive/d/Downloads/camlp5-6.11/top'
ocamlrun.exe ../boot/camlp5r.exe -nolib -I ../boot -mode S -o camlp5_top.ppo camlp5_top.ml
ocamlc.opt -warn-error A -I ../main -I ../boot -I ../ocaml_stuff/4.01.0/utils -I ../ocaml_stuff/4.01.0/parsing -I D:OCamllib/compiler-libs -c -impl camlp5_top.ppo
File "camlp5_top.ml", line 51, characters 14-32:
Error: Unbound module Toploop
../config/Makefile:20: recipe for target 'camlp5_top.cmo' failed
make[2]: *** [camlp5_top.cmo] Error 2
make[2]: Leaving directory '/cygdrive/d/Downloads/camlp5-6.11/top'
Makefile:26: recipe for target 'out' failed
make[1]: *** [out] Error 2
make[1]: Leaving directory '/cygdrive/d/Downloads/camlp5-6.11'
Makefile:141: recipe for target 'world.opt' failed
make: *** [world.opt] Error 2
How do I fix this?
I suspect the Makefile of Camlp5 hasn't been tested on Windows. It probably doesn't deal properly with backslashes: indeed, in your output, I can see D:OCamllib/compiler-libs which leads me to think that the error lies on the Camlp5 side: the path should obviously be D:\OCaml\lib....
Little-known fact about windows: / works as a path separator just as well, so if that's an option, you could probably try to hardcode d:/ocaml/ somewhere in the Makefile as the root dir for your OCaml installation, but you'd also have to fix the Makefile to generate d:/ocaml/lib as the library directory.

Resources