hannes changed the topic of #mirage to: https://mirage.io - https://github.com/mirage/mirage-www/wiki/Call-Agenda - this channel is logged at http://irclog.whitequark.org/mirage/ - MirageOS 3.5.0 is released - happy hacking!
Haudegen has quit [Quit: Bin weg.]
Haudegen has joined #mirage
_whitelogger has joined #mirage
Nikkel has quit [Ping timeout: 245 seconds]
Nikkel has joined #mirage
dinosaure has quit [Ping timeout: 245 seconds]
engil has quit [Ping timeout: 268 seconds]
dinosaure has joined #mirage
Haudegen has quit [Quit: Bin weg.]
Haudegen has joined #mirage
pie_ has quit [Ping timeout: 240 seconds]
mk__ has joined #mirage
<mk__> Is there any technique to create a Mirage unikernel for xen, with code dependency on C libraries?
<dinosaure> mk__: it's depends about your C library
Haudegen has quit [Quit: Bin weg.]
<dinosaure> I mean, if you C library has some syscall, you should have some trouble
<dinosaure> but for some "agnostic to the system" C code, it's possible (and it is the case for some MirageOS libraries)
<mk__> I think (not sure), it is agnostic to the system. In the case of being agnostic, how is it possible to do it?
<mk__> for instance, ocaml tensorflow?
<dinosaure> hmmhmm, I see
<dinosaure> so first, any C libraries for xen needs to be compiled with some special flags: https://github.com/mirage/checkseum/blob/0.0.9/src-c/native/xen/dune
<dinosaure> then, your library (we still are outside your unikernel) must provide a special META file
<dinosaure> this META file should provide at least for xen this line: https://github.com/mirage/checkseum/blob/0.0.9/META.checkseum.template#L3
<dinosaure> (the other line is for hvt/kvm/solo5)
<dinosaure> so, the *.a is the C library compiled with right flags
<dinosaure> then, in your unikernel, you should not update anythin where ocamlbuild/ocamlfind will select automagically your *.a
<dinosaure> it's little bit complex currently (MirageOS 4 should be easier) but checkseum.0.0.9 is a good example of how to integrate C code for an unikernel
<dinosaure> (checkseum go further and uses cmx trick but it's orthogonal to your goal :) )
<mk__> That is actually nice! I will try it soon, and will get back to this channel if it didn't work well
<dinosaure> then, at the link step of your unikernel, you will see what is missing (about C stdlib) :D
<mk__> So, how to fix those link problems?
<dinosaure> reimplement them/delete them :d
<dinosaure> for example, if you look into checkseum, we redefine some type like size_t/ptrdiff_t which are not available
<dinosaure> in other side, it's better to try to delete what you don't use (a concrete task here: https://github.com/mirage/ocaml-freestanding/issues/60)
<mk__> is there any documentation on how to write META file? For instance, what xen_linkopts and freestanding_linkopts are?
<dinosaure> mk__: it's trick :D and about how to write a META, I read some to learn :/
Haudegen has joined #mirage
jnavila has joined #mirage
mk__ has quit [Ping timeout: 260 seconds]
jnavila has quit [Ping timeout: 246 seconds]
jnavila has joined #mirage
sigjuice has quit [Ping timeout: 240 seconds]
sigjuice has joined #mirage
smondet[m] has quit [Remote host closed the connection]
Haudegen[m] has quit [Remote host closed the connection]
hdurer[m] has quit [Read error: Connection reset by peer]
TG[m] has quit [Read error: Connection reset by peer]
copy` has quit [Write error: Connection reset by peer]
xuqzab[m] has quit [Write error: Connection reset by peer]
Haudegen[m] has joined #mirage
copy` has joined #mirage
TG[m] has joined #mirage
smondet[m] has joined #mirage
xuqzab[m] has joined #mirage
hdurer[m] has joined #mirage
jnavila has quit [Ping timeout: 276 seconds]
Hrundi_V_Bakshi has joined #mirage