Bug 10348 - Suggested note to clarify how native recipes find dependencies
Summary: Suggested note to clarify how native recipes find dependencies
Status: RESOLVED FIXED
Alias: None
Product: Reference
Classification: Documentation
Component: handbook (show other bugs)
Version: 2.2
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.2 M4
Assignee: Scott Rifenbark
QA Contact:
URL:
Whiteboard: 03 Oct 2016: RESOLVED
Depends on:
Blocks:
 
Reported: 2016-09-29 14:30 UTC by ulfalizer
Modified: 2016-10-03 19:27 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Done (doc changes complete)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ulfalizer 2016-09-29 14:30:22 UTC
Hello,

It's currently hard to see how native recipes find their build dependencies.
The description for native recipes in STAGING_DIR_HOST might also trick people
into thinking that native recipes are installed into host directories like
/usr.

Here's a suggested note to add to the native bullet point in the
STAGING_DIR_HOST glossary entry:

  Note {
  This does not mean that -native recipes are installed into host paths like
  /usr. Rather, they are installed into [STAGING_DIR_NATIVE]. When compiling
  -native recipes, standard build environment variables like [CPPFLAGS] and
  [CFLAGS] are set up so that both host paths and [STAGING_DIR_NATIVE] are
  searched for libraries and headers (using, for example, GCC's -isystem flag).

  This emphasises that the STAGING_DIR* variables should be viewed as an input
  variables by tasks such as [do_configure], [do_compile], and [do_install].
  Having the real system root correspond to STAGING_DIR_HOST makes conceptual
  sense for -native recipes, as they make use of host headers and libraries.
  }


Cheers,
Ulf
Comment 1 ulfalizer 2016-09-29 14:41:01 UTC
I also just spotted an error in the STAGING_DIR_HOST glossary entry (that might be my fault). This is not correct for -native recipes:

  This sysroot is the one that the recipe's do_populate_sysroot task copies
  files into.


Instead, it could say this:

  For most recipes, this sysroot is the one that the recipe's
  [do_populate_sysroot] task copies files into. Exceptions include -native
  recipes, where do_populate_sysroot instead uses [STAGING_DIR_NATIVE].


Cheers,
Ulf
Comment 2 ulfalizer 2016-09-29 15:11:02 UTC
Small typo: "...as an input variables..." should be "...as input variables..."
Comment 3 Scott Rifenbark 2016-10-03 16:10:38 UTC
Ulf, 

See http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#var-STAGING_DIR_HOST for the re-write of the variable. 

Thanks, 
Scott
Comment 4 ulfalizer 2016-10-03 16:22:34 UTC
Looks good to me.

Maybe it would make more sense to have the note after the second (native) bullet point, but I'm okay with the current version if that's awkward to do or if you think that it spaces things out too much.

Thanks,
Ulf
Comment 5 Scott Rifenbark 2016-10-03 19:27:25 UTC
Ulf, 

I wondered about the ultimate placement of that note.  It did not seem to fit at the bottom too well.  I will move it as suggested.  See http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#var-STAGING_DIR_HOST.

Since you were okay either way... I am setting to RESOLVED and putting the doc flag to "done."

Thanks,
Scott