I need some help and direction:

I've started working on a 'meta-ocaml' layer to add support for the OCaml 
language to Yocto:

https://gitlab.com/wtolkien/meta-ocaml

However, many OCaml projects seem to rely on the 'findlib' library manager 
(http://projects.camlcity.org/projects/findlib.html) which keeps all 
information in a fixed system-global path.

This seems to conflict with Yocto's sysroot concept. Also, 'findlib' handles 
dependencies, which is obviously something Yocto would normally do.

What's the best way to handle this? Try to make do without findlib? Ideally I'd 
like to end up with an 'ocaml.bbclass' file that just needs to be included, but 
maybe that's not achievable?

For example, here is findlib's default directory setup when installing it 
outside of Yocto:

About the OCAML core installation:
    Standard library:      /usr/local/lib/ocaml
    Binaries:              /usr/local/bin
The directory of site-specific packages will be
    site-lib:              /usr/local/lib/ocaml/site-lib
The configuration file is written to:
    findlib config file:   /usr/local/etc/findlib.conf
Software will be installed:
    Libraries:             in <site-lib>/findlib
    Binaries:              /usr/local/bin
    topfind script:        /usr/local/lib/ocaml


With Yocto (this doesn't seem right...):

About the OCAML core installation:
    Standard library:      
/opt/src/sumo/build/tmp/work/x86_64-linux/ocaml-native/4.03.0-r0/image/opt/src/sumo-test/build/tmp/work/x86_64-linux/ocaml-native/4.03.0-r0/recipe-sysroot-native/usr/lib
    Binaries:              
/opt/src/sumo/build/tmp/work/x86_64-linux/findlib-native/1.8.0-r0/recipe-sysroot-native/usr/bin
The directory of site-specific packages will be
    site-lib:              
/opt/src/sumo/build/tmp/work/x86_64-linux/ocaml-native/4.03.0-r0/image/opt/src/sumo-test/build/tmp/work/x86_64-linux/ocaml-native/4.03.0-r0/recipe-sysroot-native/usr/site-lib
The configuration file is written to:
    findlib config file:   
/opt/src/sumo/build/tmp/work/x86_64-linux/findlib-native/1.8.0-r0/recipe-sysroot-native/usr/etc/findlib.conf
Software will be installed:
    Libraries:             in <site-lib>/findlib
    Binaries:              
/opt/src/sumo/build/tmp/work/x86_64-linux/findlib-native/1.8.0-r0/recipe-sysroot-native/usr/bin
    topfind script:        
/opt/src/sumo/build/tmp/work/x86_64-linux/ocaml-native/4.03.0-r0/image/opt/src/sumo-test/build/tmp/work/x86_64-linux/ocaml-native/4.03.0-r0/recipe-sysroot-native/usr/lib


Many thanks,
Wolfgang

-- 
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to