My setup/environment: - Source: Branch: master commit 0adbd1ce2428dadffc61664d93ec394d5b0e6722 Date: Wed Aug 30 12:42:42 2017 +0200 - Target-genode-System: nova x86_64 - Host-System: genode-x86-gcc (GCC) 6.3.0 Ubuntu 17.04 QEMU emulator version 2.8.0(Debian 1:2.8+dfsg-3ubuntu2.3)
Hi,
I read the documentation about Native Genode port of a library from the gnode website[1]. It looks very easy to "create a port" of a library for genode. I started to port a library and I have realized what is meant by Chapter "Creating the build Makefile". This Chapter says, that I should create a build (Makefile) for the third party source code ?
I was expected that the port mechanism from genode will execute the configure script (Cross compiling) of the third party just as the "source based" Linux/UNIX (FreeBSD/Arch Linux) systems does.
I investigate for example how libssh is ported and I see that in genode/repos/libports/lib/mk/libssh.mk every source file are added. For such a small lib it is easy but for a bigger lib like Qt5, I see there are helper scripts to generate the port mk for genode ?
I didn't use "Makefiles" in my projects. I'm a cmake user :-). So my knowledge about Makefiles are very poor. Maybe I missed something.
My question: It is not possible to execute the "third party build system" to cross compile it for genode?
My port idea/work: I didn't see any information about boost on the "Future Challenges of the Genode project"[2] or "Genode Porting Wishlist"[3] site, so I try to port boost to genode. Maybe somebody is also working on this?
Cheers Jörg
[1] http://genode.org/documentation/developer-resources/porting_libraries [2] https://genode.org/about/challenges [3] http://usr.sysret.de/jws/genode/porting_wishlist.html
Hi Jörg,
This Chapter says, that I should create a build (Makefile) for the third party source code ? I was expected that the port mechanism from genode will execute the configure script (Cross compiling) of the third party just as the "source based" Linux/UNIX (FreeBSD/Arch Linux) systems does.
we apply the approach of invoking the configure script only to noux packages (like coreutils, bash, gcc) but not for building libraries. We instead "port" libraries to Genode's build system so that they are built as first-class citizens. This gives us the advantage that the deep dependency tracking of Genode's build system is applied to those libraries. E.g., when changing an implementation file of a 3rd-party library and then re-executing a run script that implicitly uses the library, the library gets automatically updated.
Please don't be afraid of make too much. For porting libraries, you typically don't need to write make rules. In most cases, it suffices to list the source codes, specify the location of the source codes (via vpath), and define compiler arguments (like defines passed via -D). Genode's build system does the tricky parts for you. You can learn about the use of Genode's build system in Section 5.3. "Build system" in the Genode Foundations book [1]. You may also take the other libraries (e.g., those at genode-world) as reference.
[1] http://genode.org/documentation/genode-foundations-17-05.pdf
My question: It is not possible to execute the "third party build system" to cross compile it for genode?
In principle, it is possible (as done by GNU-build-system wrapper we use for noux, see ports/mk/gnu_build.mk) but we deliberately don't do that for libraries.
My port idea/work: I didn't see any information about boost on the "Future Challenges of the Genode project"[2] or "Genode Porting Wishlist"[3] site, so I try to port boost to genode. Maybe somebody is also working on this?
I am not aware of such a development. This would be a very welcome contribution!
Cheers Norman
Hi Jörg,
as a small addition to Normans' answer, we also wrote a porting guide:
http://genode.org/documentation/developer-resources/porting
Sebastian