Porting Mosquitto to Genode: no plugin found for socket()

Wouter van Oijen wouter.van.oijen at technolution.nl
Wed Nov 21 11:54:35 CET 2018


Hello,

I'm currently porting Mosquitto (https://mosquitto.org/) to Genode.
I've managed to compile and run the application, but I get the
following error:

(...)
genode build completed
using 'core-linux' as 'core'
using 'ld-linux.lib.so' as 'ld.lib.so'
spawn ./core
Genode 18.08
17592186044415 MiB RAM and 8998 caps assigned to init
[init -> mosquitto] Warning: rtc not configured, returning 0
[init -> mosquitto] Error: no plugin found for socket()
[init -> mosquitto] Error: no plugin found for socket()
[init] child "mosquitto" exited with exit value 1

This is probably because the socket() function in libc is just a stub
and needs a plugin to work correctly. I'm not sure how to continue
from here. As far as I know, there are different ways to implement the
sockets in Genode (for example using VFS). Is there any (up-to-date)
documentation about these implementations? What are the advantages and
disadvantages of each approach, and what other steps are required to
get it working (there seem to be a lot of dependencies when including
the socket interface...).

I've tried following the example in run/usb_net [1], which uses
lib/vfs/lwip, but then I get the following error:
  invalid command name "usb_host_drv_binary"
I cannot find where usb_host_drv_binary is coming from (it's referred
to in this file, but I don't know where it is generated). Besides, I
don't know if this example is working anyway, so maybe this is not the
right direction...
[1] https://github.com/genodelabs/genode/blob/master/repos/dde_linux/run/usb_net.run

Following another example from the mailing list, I've tried adding
LIBS += libc_lwip_nic_dhcp, but this currently results in the
following errors:
(...)
genode build completed
using 'core-linux' as 'core'
using 'linux_timer_drv' as 'timer'
using 'ld-linux.lib.so' as 'ld.lib.so'
spawn ./core
Genode 18.08
17592186044415 MiB RAM and 8998 caps assigned to init
[init -> mosquitto] using the lwIP libc plugin
[init -> mosquitto] init
[init -> mosquitto] Using DHCP for interface configuration.
[init] Warning: mosquitto: no route to service "Nic"
[init -> mosquitto] Error: Nic-session creation failed
(ram_quota=671744, cap_quota=8, tx_buf_size=204800,
rx_buf_size=204800, label="")
[init -> mosquitto] Warning: NIC not available, loopback is used as default
[init -> mosquitto] Warning: rtc not configured, returning 0
[init -> mosquitto] Warning: geteuid: geteuid not implemented
[init -> mosquitto] Warning: getpwnam: getpwnam not implemented
Warning: blocking canceled in entrypoint constructor
[init] child "mosquitto" exited with exit value 1

Based on this log output, to get this working I would need to:
* provide the Nic service in some way
* find a library which implements geteuid() and getwpnam() (I guess
this would require Noux, right?)

In both cases I also have the warning about rtc nog configured. How do
I resolve this?

Any pointers in the right direction are very welcome :-)

Kind regards,
Wouter



More information about the users mailing list