Re: Raspberry pi 4 recipe and layer issues.


Josef Holzmayr <holzmayr@...>
 

Howdy.

On Mon, Dec 23, 2019 at 09:11:07PM +0000, Ed Vidal wrote:
The Makefile executes several lines, which set variables ARACHNE_VER, GIT_REV, and VER_HASH.   These are used in the rule which creates a file src/version_$(VER_HASH).cc.The line below appears to be the one that causes the error.VER_HASH = $(shell echo "$(ARACHNE_VER) $(GIT_REV)" | sum | cut -d ' ' -f -1)
src/version_$(VER_HASH).cc: echo "const char *version_str = \"arachne-pnr $(ARACHNE_VER) (git sha1 $(GIT_REV), $(notdir $(CXX)) `$(CXX) --version | tr ' ()' '\n' | grep '^[0-9]' | head -n1` $(filter -f% -m% -O% -DNDEBUG,$(CXXFLAGS)))\";" > src/version_$(VER_HASH).cc
bin/arachne-pnr$(EXE): src/arachne-pnr.o src/netlist.o src/blif.o src/pack.o src/place.o src/util.o src/io.o src/route.o src/chipdb.o src/location.o src/configuration.o src/line_parser.o src/pcf.o src/global.o src/constant.o src/designstate.o src/version_$(VER_HASH).o $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
These variables are based on git revision.   So I can not hard code them.This is the error that I get.
/bin/sh: 1: sum: not found
If a Makefile does such _stupid_ things, then better patch it. An
example of patching something like this is

https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-core/util-linux/util-linux/configure-sbindir.patch

which targets configure.ac, but hey, little difference to a Makefile.

Greetz
--
———————————————
Josef Holzmayr
Software Developer Embedded Systems

Tel: +49 8444 9204-48
Fax: +49 8444 9204-50

R-S-I Elektrotechnik GmbH & Co. KG
Woelkestrasse 11
D-85301 Schweitenkirchen
www.rsi-elektrotechnik.de
———————————————
Amtsgericht Ingolstadt – GmbH: HRB 191328 – KG: HRA 170393
Geschäftsführer: Dr.-Ing. Michael Sorg, Dipl.-Ing. Franz Sorg
Ust-IdNr: DE 128592548

_____________________________________________________________
Amtsgericht Ingolstadt - GmbH: HRB 191328 - KG: HRA 170363
Geschäftsführer: Dr.-Ing. Michael Sorg, Dipl.-Ing. Franz Sorg
USt-IdNr.: DE 128592548

Join yocto@lists.yoctoproject.org to automatically receive all group messages.