Hopefully a simple question- I am trying to port a CMake project (arcan https://github.com/letoram/arcan/tree/master) that uses Freetype and looks for it using find_package(Freetype REQUIRED QUIET). I've added 'freetype' to 'used_apis' but that did not seem to make it happy. Worth noting, I am doing this in a separate directory from my Genode git clone, I assume that is not a problem? This article https://genodians.org/jschlatow/2024-01-11-lomiri-calculator-porting seems to suggest that there is a way to add a CMake file that satisfies it. I found this file https://github.com/Manabu-GT/sdl_core/blob/aed19cd68e02b11e27275c05e00cf242a337553a/cmake/Modules/FindQt5Core.cmake#L4 on github, but I don't understand what it's doing and it's not the same one referenced in the article.
Additionally, the arcan cmake https://github.com/letoram/arcan/blob/master/src/CMakeLists.txt calls for find_package(Threads REQUIRED) and fails here too. I see that PThreads seem to be supported in the libc port, and foundations 8.13.1 gives a genode native way of starting threads. I assume the method for this is similar to the one for Freetype?
Hello Spencer
I have ported some libraries/applications using Goa, but it is a while since the last one.
On 7/17/24 06:15, Spencer via users wrote:
Hopefully a simple question- I am trying to port a CMake project (arcan https://github.com/letoram/arcan/tree/master) that uses Freetype and looks for it using find_package(Freetype REQUIRED QUIET). I've added 'freetype' to 'used_apis' but that did not seem to make it happy. Worth noting, I am doing this in a separate directory from my Genode git clone, I assume that is not a problem? This article https://genodians.org/jschlatow/2024-01-11-lomiri-calculator-porting seems to suggest that there is a way to add a CMake file that satisfies it. I found this file https://github.com/Manabu-GT/sdl_core/blob/aed19cd68e02b11e27275c05e00cf242a337553a/cmake/Modules/FindQt5Core.cmake#L4 on github, but I don't understand what it's doing and it's not the same one referenced in the article.
It is the "normal" way to have Goa projects in a dedicated repository. IMHO this helps to make it clear that it uses a different build system.
There were added some `FindXxx.cmake` files in the `genode` and `genode-world` repositories, but for all libraries (only actually used ones). looking at e6c4913a256231918ca09d5ee18a9e6e12cfe238 in the `genode-world` repository, I think it should be fairly easy to add the file for most libraries. Before the support for `FindXxx.cmake` files was there, I usually patched the CMakeLists.txt file to set the variables accordingly.
Additionally, the arcan cmake https://github.com/letoram/arcan/blob/master/src/CMakeLists.txt calls for find_package(Threads REQUIRED) and fails here too. I see that PThreads seem to be supported in the libc port, and foundations 8.13.1 gives a genode native way of starting threads. I assume the method for this is similar to the one for Freetype?
For threads there is a patch required (at least when I last encountered it), as that integrated in `libc`. I normally just commented out the corresponding line.
Hope that this helps, best regards Pirmin
Hi Spencer,
On 17/07/2024 06:15, Spencer via users wrote:
Hopefully a simple question- I am trying to port a CMake project (arcan https://github.com/letoram/arcan/tree/master) that uses Freetype and looks for it using find_package(Freetype REQUIRED QUIET). I've added 'freetype' to 'used_apis' but that did not seem to make it happy. Worth noting, I am doing this in a separate directory from my Genode git clone, I assume that is not a problem? This article https://genodians.org/jschlatow/2024-01-11-lomiri-calculator-porting seems to suggest that there is a way to add a CMake file that satisfies it. I found this file https://github.com/Manabu-GT/sdl_core/blob/aed19cd68e02b11e27275c05e00cf242a337553a/cmake/Modules/FindQt5Core.cmake#L4 on github, but I don't understand what it's doing and it's not the same one referenced in the article.
Goa looks for the FindXxx.cmake files in the api archives. However, Our freetype library port does not yet come with a .cmake file. The FindXxx.cmake files you find in other projects can be quite complex. Since Goa takes care of adding the corresponding include paths and linker options, it is often sufficient to just set the XXX_FOUND variable to True. In other words, adding a FindXxx.cmake file to an api archive is just a way of making CMake happy once the corresponding archive has been added to the used_apis file.
You may have a look at https://github.com/genodelabs/genode/blob/master/repos/libports/recipes/api/... or https://github.com/genodelabs/genode-world/blob/master/recipes/api/sdl2/cont... for two examples of how to add .cmake files to api archives.
Cheers Johannes
Thank you both! I'm now a bit farther along in my port - the current stumbling block is that I'm trying to include a genode-world port (lua) and it can't seem to find what version to pull, I assume because its not archived in depot.genode.org
Is there a recommended way to include these projects? Right now I'm just building a seperage version statically but it seems a little silly
On Wed, Jul 17, 2024, at 2:04 AM, Johannes Schlatow wrote:
Hi Spencer,
On 17/07/2024 06:15, Spencer via users wrote:
Hopefully a simple question- I am trying to port a CMake project (arcan https://github.com/letoram/arcan/tree/master) that uses Freetype and looks for it using find_package(Freetype REQUIRED QUIET). I've added 'freetype' to 'used_apis' but that did not seem to make it happy. Worth noting, I am doing this in a separate directory from my Genode git clone, I assume that is not a problem? This article https://genodians.org/jschlatow/2024-01-11-lomiri-calculator-porting seems to suggest that there is a way to add a CMake file that satisfies it. I found this file https://github.com/Manabu-GT/sdl_core/blob/aed19cd68e02b11e27275c05e00cf242a337553a/cmake/Modules/FindQt5Core.cmake#L4 on github, but I don't understand what it's doing and it's not the same one referenced in the article.
Goa looks for the FindXxx.cmake files in the api archives. However, Our freetype library port does not yet come with a .cmake file. The FindXxx.cmake files you find in other projects can be quite complex. Since Goa takes care of adding the corresponding include paths and linker options, it is often sufficient to just set the XXX_FOUND variable to True. In other words, adding a FindXxx.cmake file to an api archive is just a way of making CMake happy once the corresponding archive has been added to the used_apis file.
You may have a look at https://github.com/genodelabs/genode/blob/master/repos/libports/recipes/api/... or https://github.com/genodelabs/genode-world/blob/master/recipes/api/sdl2/cont... for two examples of how to add .cmake files to api archives.
Cheers Johannes _______________________________________________ users mailing list -- users@lists.genode.org To unsubscribe send an email to users-leave@lists.genode.org Archived at https://lists.genode.org/mailman3/hyperkitty/list/users@lists.genode.org/mes...
Hi Spencer
On 19/07/2024 01:21, Spencer via users wrote:
Thank you both! I'm now a bit farther along in my port - the current stumbling block is that I'm trying to include a genode-world port (lua) and it can't seem to find what version to pull, I assume because its not archived in depot.genode.org
Is there a recommended way to include these projects? Right now I'm just building a seperage version statically but it seems a little silly
There is no recipe for the lua port, therefore there cannot be a corresponding archive at depot.genode.org. You may add the api and src recipes to genode-world, export the corresponding archives and tell Goa the version of the exported archives. This might require adding some quirks to Goa, though, since Goa has no general mechanism for dealing with static library archives.
If lua can be compiled as a shared library, the recommended way would be to create a separate Goa project for that. You find a brief explanation and example w.r.t. lvgl in this article: http://genodians.org/jschlatow/2024-02-07-system-info#Development
Cheers Johannes
thank you so much for that! made it a bit further again, this time the problem is missing functions for some linux operations, specifically: shm_open https://linux.die.net/man/3/shm_open and shm_unlink https://linux.die.net/man/3/shm_unlink I see that these are part of mman.h https://www.man7.org/linux/man-pages/man0/sys_mman.h.0p.html, which Genode has some mention of in libdrm https://github.com/genodelabs/genode/blob/299951ced5e587f9146a4d42ddd0b5a38dc1a0ea/repos/libports/src/lib/libdrm/include/libdrm_macros.h#L12 among others, however this where I got lost. It doesn't seem to be anywhere in the api depot https://depot.genode.org/genodelabs/api/ nor in libports https://github.com/genodelabs/genode/tree/299951ced5e587f9146a4d42ddd0b5a38dc1a0ea/repos/libports/ports, so I'm not sure how to include it in my Goa project. (Or: is it that those functions of mman.h aren't implemented, so it is impossible)
Thanks again, - Spencer
On Fri, Jul 19, 2024, at 3:32 AM, Johannes Schlatow wrote:
Hi Spencer
On 19/07/2024 01:21, Spencer via users wrote:
Thank you both! I'm now a bit farther along in my port - the current stumbling block is that I'm trying to include a genode-world port (lua) and it can't seem to find what version to pull, I assume because its not archived in depot.genode.org
Is there a recommended way to include these projects? Right now I'm just building a seperage version statically but it seems a little silly
There is no recipe for the lua port, therefore there cannot be a corresponding archive at depot.genode.org. You may add the api and src recipes to genode-world, export the corresponding archives and tell Goa the version of the exported archives. This might require adding some quirks to Goa, though, since Goa has no general mechanism for dealing with static library archives.
If lua can be compiled as a shared library, the recommended way would be to create a separate Goa project for that. You find a brief explanation and example w.r.t. lvgl in this article: http://genodians.org/jschlatow/2024-02-07-system-info#Development
Cheers Johannes _______________________________________________ users mailing list -- users@lists.genode.org To unsubscribe send an email to users-leave@lists.genode.org Archived at https://lists.genode.org/mailman3/hyperkitty/list/users@lists.genode.org/mes...
Hello,
On Tue, Jul 23, 2024 at 22:01:29 CEST, Spencer via users wrote:
made it a bit further again, this time the problem is missing functions for some linux operations, specifically: shm_open https://linux.die.net/man/3/shm_open and shm_unlink https://linux.die.net/man/3/shm_unlink
Our C runtime does not support shm shared-memory objects currently.
Regards
Thank you so much! I think I have a much better handle on what Goa's doing now
On Wed, Jul 24, 2024, at 6:15 AM, Christian Helmuth wrote:
Hello,
On Tue, Jul 23, 2024 at 22:01:29 CEST, Spencer via users wrote:
made it a bit further again, this time the problem is missing functions for some linux operations, specifically: shm_open https://linux.die.net/man/3/shm_open and shm_unlink https://linux.die.net/man/3/shm_unlink
Our C runtime does not support shm shared-memory objects currently.
Regards
Christian Helmuth Genode Labs
https://www.genode-labs.com/ · https://genode.org/ https://floss.social/@genode · https://genodians.org/
Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth _______________________________________________ users mailing list -- users@lists.genode.org To unsubscribe send an email to users-leave@lists.genode.org Archived at https://lists.genode.org/mailman3/hyperkitty/list/users@lists.genode.org/mes...