ocaml: recipes use objects outside of their sysroot.

Description

Various OCAML recipes may trigger compilation/link failures all related to C runtime components not being found in the recipe sysroot, e.g:

  • ocaml-dbus:

  • camomile:

  • xen-ocaml-libs:

  • xenclient-toolstack

This is almost guarantied to happen if local.conf has INHERIT += rm_work.

The problem comes from ocaml-cross being configured with -cc "${TARGET_PREFIX}gcc -fPIC --sysroot=${STAGING_DIR_TARGET}". The C compiler used in recipes using the cross compiler will try to use the C compiler defined as such, using STAGING_DIR_TARGET, defined for ocaml-cross as their own sysroot. E.g, with ocaml-dbus:

Environment

Build environment

Validation Steps

  1. OCaml components compilation succeeds.

  2. OCaml components use only the recipe sysroot they have access to.

Assignee

Eric Chanudet

Reporter

Eric Chanudet

Labels

None

QA Assignee

None

QA Image URL

None

Components

Fix versions

Affects versions

Priority

Critical
Configure