Bug 11464 - devshell and cross compiler / tools
Summary: devshell and cross compiler / tools
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 2.3
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.4 M1
Assignee: Rebecca Chang
QA Contact: Ashwin Soman
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-05-05 04:49 UTC by Paul Eggleton
Modified: 2017-11-08 05:45 UTC (History)
7 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Eggleton 2017-05-05 04:49:40 UTC
In the old days you'd have access to the cross-compiler and other build tools for within devshell "by accident" since there was one shared sysroot, but with RSS you'll only get those if you've actually done a compilation - if you clean the recipe and then run devshell on it, none of the build tools will be in the sysroot since do_devshell only depends on do_patch and there aren't any dependencies to ensure that the tools are in the sysroot from that task.

I guess if we want to fix this we'll have to try to copy dependencies from do_configure / do_compile across to do_devshell or something similar so that they explicitly get populated.
Comment 1 Rebecca Chang 2017-05-17 08:52:46 UTC
Does this related to task ordering for do_devshell?
I would like to clarify on the "dependencies" mentioned in the description. Based on my understanding here, devshell should be executed after configure and compile. Is that what you mean?
Comment 2 Trevor Woerner 2017-05-17 21:09:58 UTC
I think devshell should still continue to be run after do_patch, but what I think Paul is saying is that do_devshell should have the *dependencies* of do_compile. 

In other words devshell needs to make sure a compile is available before it runs (i.e. a DEPENDS, not a task dependency).
Comment 3 Paul Eggleton 2017-05-17 21:17:51 UTC
What I was suggestion was basically read the depends varflag of do_configure and do_compile and then appendVarFlag() those to the depends of do_devshell.
Comment 4 Paul Eggleton 2017-05-17 21:18:29 UTC
*"What I was suggesting". Apparently I'm not good at editing this morning.
Comment 5 Rebecca Chang 2017-06-07 00:47:46 UTC
Fix implemented and merged.

OE-Core rev: eb8a1cdf5106d119f77db76f9a690826af9fcda3
Comment 6 Ashwin Soman 2017-10-23 03:35:08 UTC
Bug is fixed and verified, 
$ bitbake ifupdown -c devshell
# ls

addrfam.c     archhurd.c      archkfreebsd.h  can.defn  COPYING    defn2man.pl  header.h    inet.defn         link.defn  meta.defn      tests
archcommon.c  archhurd.h      archlinux.c     config.c  debian     examples     ifup.8      interfaces.5.pre  main.c     patches        TODO.scripts
archcommon.h  archkfreebsd.c  archlinux.h     contrib   defn2c.pl  execute.c    inet6.defn  ipx.defn          Makefile   settle-dad.sh  wait-for-ll6.sh

#make 

i586-poky-linux-gcc  -m32 -march=i586 --sysroot=/workdir/build/tmp/work/i586-poky-linux/ifupdown/0.8.16-r0/recipe-sysroot  -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/workdir/build/tmp/work/i586-poky-linux/ifupdown/0.8.16-r0=/usr/src/debug/ifupdown/0.8.16
.
.
.
.
.
.
sysroot=  -std=c99 -D_DEFAULT_SOURCE -D'IFUPDOWN_VERSION="0.7"' main.o addrfam.o execute.o config.o inet.o ipx.o inet6.o can.o archcommon.o archlinux.o meta.o link.o -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -o ifup
ln -sf ifup ifdown
ln -sf ifup ifquery
ln -sf ifup.8 ifdown.8
ln -sf ifup.8 ifquery.8
./defn2man.pl inet.defn > inet.man
./defn2man.pl ipx.defn > ipx.man
./defn2man.pl inet6.defn > inet6.man
./defn2man.pl can.defn > can.man
sed -e '/^##ADDRESSFAM##$/r inet.man' -e '/^##ADDRESSFAM##$/r ipx.man' -e '/^##ADDRESSFAM##$/r inet6.man' -e '/^##ADDRESSFAM##$/r can.man' \
     -e '/^##ADDRESSFAM##$/d' < interfaces.5.pre > interfaces.5
# ls

addrfam.c     archhurd.c      archlinux.h  can.o     debian       execute.o  ifquery.8   inet6.man  inet.o            ipx.man    main.c     meta.o         wait-for-ll6.sh
addrfam.o     archhurd.h      archlinux.o  config.c  defn2c.pl    header.h   ifup        inet6.o    interfaces.5      ipx.o      main.o     patches
archcommon.c  archkfreebsd.c  can.c        config.o  defn2man.pl  ifdown     ifup.8      inet.c     interfaces.5.pre  link.c     Makefile   settle-dad.sh
archcommon.h  archkfreebsd.h  can.defn     contrib   examples     ifdown.8   inet6.c     inet.defn  ipx.c             link.defn  meta.c     tests
archcommon.o  archlinux.c     can.man      COPYING   execute.c    ifquery    inet6.defn  inet.man   ipx.defn          link.o     meta.defn  TODO.scripts
#




Compilation was successful
Comment 7 Ashwin Soman 2017-11-08 05:45:19 UTC
Bug have been resolved and verified