filter-out instead of filter

2018-07-01 Thread Guido Witmond

On 07/01/2018 11:15 PM, Guido Witmond wrote:

It seems that this code in depot/guido/bin/build/etc/tools.conf expects SPECS to be 
just x86_64 while specs.conf contains: SPECS += genode x86_64

     ifeq ($(filter-out $(SPECS),x86_64),)
     CROSS_DEV_PREFIX ?= /usr/local/genode-gcc/bin/genode-x86-
     endif
It left CROSS_DEV_PREFIX unset, falling back to the compiler in $PATH.



I've grepped the code and I found the idiom:
'ifeq(filter-out $SPECS, X),)'
a few more times. If I'm not mistaken, it is true if $SPECS contains 
only X and false if SPECS contains two or more items even if including an X.


But it goes against the manual of make [1] where the first param is the 
pattern X and the second is the string 'text' to look up the string X.


I wonder why the code is not:
'ifeq (filter (X,$(SPECS)),X)'
as that would signal a that an X is found in SPECS, irrespective of the 
rest in SPECS.


Cheers, Guido.

1: 
https://www.gnu.org/software/make/manual/html_node/Text-Functions.html#Text-Functions


___
Genode users mailing list
users@lists.genode.org
https://lists.genode.org/listinfo/users

Re: Need help understanding packaging

2018-07-01 Thread Guido Witmond

On 06/27/2018 03:36 PM, Norman Feske wrote:

Hi Norman,

Here's my experiences with packaging my app.

1. As I'm in the role of system integrator (not genode developer), I 
originally placed my feather-package in genode/projects/feather and 
added that path to REPOSITORIES in genode/build/x86_64/etc/build.conf. 
While that works for the make run/feather mechanism, it does not work 
for the packaging. That requires the source code in 
genode/repos/feather. It's in the manual but was my first stumbling block.


2. I needed to add the content.mk as well as the hash file to my recipes
directory to make the depot/create work. Without either I got the error:
"incomplete or missing recipe (guido/src/feather). It's probably in the
book but the error message is quite vague. A message "missing
file/repo//recipes/src//hash" would be more
helpful. I'll add it after I get the hang of the packaging system (to
prevent adding stuff that's not needed).

3. The part where I found the documentation lacking was the description 
of the content.mk file. The documentation did not lead me to a working 
version. Ultimately, I copied the one from gems/.../depot_deploy and 
adapted it.


After that depot/create worked. It gave me a depot/guido/src/feather 
directory with the same structure as my repo/feather.


Question: do you foresee that third party developers place their git 
source in repos/ like I did or in depot/ and 
bypassing that recipes/hash/content.mk part.



4. I did a depot/build guido/bin/x86_64/feather/2018-06-30 KEEP_BUILD_DIR=1
That gave me this error:
  Makefile: 131: *** "g++ version 6.3.0 is required, we got
  /usr/bin/g++".

I added that last part to builddir/build.mk to diagnose what compiler 
ran. It seems that this code in 
depot/guido/bin/build/etc/tools.conf expects SPECS to be 
just x86_64 while specs.conf contains: SPECS += genode x86_64

ifeq ($(filter-out $(SPECS),x86_64),)
CROSS_DEV_PREFIX ?= /usr/local/genode-gcc/bin/genode-x86-
endif
It left CROSS_DEV_PREFIX unset, falling back to the compiler in $PATH.

Is this a bug or did I miss something?


5. Setting export CROSS_DEV_PREFIX=/usr/local/.../genode-x86- by hand 
made the build get further. I got these errors.

"Library-description file libc.mk is missing."
(And so for libc_lwip.mk, libc_lwip_nic_dhcp.mk and posix.mk).
Here the error message is correct but lacks the hint to add the 
dependencies to used_apis in the previous step.


6. After setting the dependencies in used_apis, and running create 
again, I get this error at build:

checking library dependencies...
Skip target feather because it requires
libc_support_for_your_target_platform
created guido/bin/x84_64/feather/2018-07-01-b

The libc_support... 'target' suggests that it can't determine the 
platform. Is that the SPECS += genode x86_64 bug again?


Yet it did create a that directory it specfied but it's empty and 
further invocations of build happily tell me that there is everything is 
up to date. I expect it would not make that directory or retry builing 
until it has more deliverables.



Hope my feedback helps you to improve Genode.

Cheers, Guido.

___
Genode users mailing list
users@lists.genode.org
https://lists.genode.org/listinfo/users