Re: Need help understanding packaging

2018-07-04 Thread Guido Witmond

On 07/03/2018 02:55 PM, Norman Feske wrote:


As far
as documenting the process of creating a 'content.mk' file goes, it is
not easy to find a useful level of detail.


I know. Writing good documents is hard. I hope my experiences help you 
find a base level of detail. Perhaps Genode Labs could curate a set of 
example files, rated from simple to complex and referred to in the 
documentation. That would certainly have helped me.



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.


Similar to hosting a symbolic link '/repos/feather', you may in
principle host a symbolic link in '/depot/guido/src/feather',
pointing to your source tree. I admittedly haven't tried this but you
may give it a try. Note, however, that the publish step would archive
the entire content of the directory. So it might be preferable to have a
tool (makefile) in place to assemble the content.


Although helpful, that was not the answer I was expecting. I wanted your 
vision on whether third parties should create their repositories like 
genode/repos/ complete with a recipe to transform it into a 
depot//... structure or to skip the genode/repos part entirely and 
use a depot//../ structure as base of development? The 
latter would save a lot of documenting :-)




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++".


This is strange. Have you successfully built one of Genode's binary
archives, e.g., guido/bin/x86_64/report_rom? If this works, what is the
difference between your src archive and report_rom's? By any chance, do
you happen to have an 'etc/' or 'mk/' directory in your archive? This
shouldn't be.


I found the source of this problem. I fat-fingered the x86_64 as x84_64. 
That gave the error. When I transcribed the command line from my VM (I 
could not copy-paste), I 'corrected' it in my previous mail to you. 
Sorry about that confusion.


Cheers, Guido.

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

Re: Need help understanding packaging

2018-07-03 Thread Norman Feske
Hi Guido,

> 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.

you may keep your code anywhere you like by creating a symlink
'/repos/feather' pointing to the location of your code.

> 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.

It's certainly the best to take an existing recipe as reference. As far
as documenting the process of creating a 'content.mk' file goes, it is
not easy to find a useful level of detail.

> 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.

Similar to hosting a symbolic link '/repos/feather', you may in
principle host a symbolic link in '/depot/guido/src/feather',
pointing to your source tree. I admittedly haven't tried this but you
may give it a try. Note, however, that the publish step would archive
the entire content of the directory. So it might be preferable to have a
tool (makefile) in place to assemble the content.

> 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++".

This is strange. Have you successfully built one of Genode's binary
archives, e.g., guido/bin/x86_64/report_rom? If this works, what is the
difference between your src archive and report_rom's? By any chance, do
you happen to have an 'etc/' or 'mk/' directory in your archive? This
shouldn't be.

> I added that last part to builddir/build.mk to diagnose what compiler
> ran. It seems that this code in
> depot/guido/biI think, given that there are plentiful examples to learn from, 
> n/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?

This is a follow-up problem of the one above. I recommend experimenting
with Genode's existing packages first, and then comparing your's with those.

Cheers
Norman

-- 
Dr.-Ing. Norman Feske
Genode Labs

https://www.genode-labs.com · https://genode.org

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · SYyitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth

___
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

Re: Need help understanding packaging

2018-06-25 Thread Guido Witmond

On 06/25/2018 10:44 PM, Guido Witmond wrote:

But I get stuck with making it into a depot-package. I lack the clarity 
of what the next steps are.


I forgot to mention that I read the book and the articles on the site 
and I think I know the abstract of it but I lack the concrete steps.


What I think I know know:
- I have to make the directory into a SRC-package
- From there I do a build to get BIN package
- That I copy to a webroot and point my testbox to it.

Hope this clarifies where I'm stuck.

Cheers, Guido.

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