Difference between revisions of "Devshell"

From Openembedded.org
Jump to: navigation, search
(own page for devshell)
 
(faq+)
Line 21: Line 21:
  
 
* You now have all the environment variables set up to correctly to run configure, make, etc.
 
* You now have all the environment variables set up to correctly to run configure, make, etc.
 +
 +
== FAQ ==
 +
 +
=== X11 connection rejected because of wrong authentication ===
 +
 +
Sometimes if you try to run devshell remote over SSH with X11 redirection this error occurs:
 +
 +
X11 connection rejected because of wrong authentication.
 +
ERROR: function do_devshell failed
 +
 +
The problem seems to be the XAUTHORITY handling. The following part in .profile helped some users.
 +
 +
if [ -e "$HOME/.Xauthority" ] ; then
 +
    export XAUTHORITY="$HOME/.Xauthority"
 +
fi
 +
 +
  
 
[[Category:FAQ]]
 
[[Category:FAQ]]
 
[[Category:Debug build]]
 
[[Category:Debug build]]

Revision as of 14:09, 27 April 2009

When a build fails, it is often useful to interactively build the part that is failing. Because OE sets up the build environment, it may not be obvious how to quickly reproduce such an environment.

Background

One technique that can be use is:

  • cd into tmp/work/<failing package dir>/<failing package build dir>
  • copy ../temp/run.do_compile.. x (or do_install or whatever task is failing)
  • edit x and replace the do_compile (at the end of the file) function call w/ bash
  • ./bash --norc (you now have a shell w/ the environment set up properly for doing a build)
  • make (debug issues, etc)
  • exit (when done to go back to shell without run.do_compile settings)

Setup devshell

The above is mainly for illustration purposes. A better/quicker way to set up a development shell is this.

  • Add 'devshell' to your local.conf's INHERIT variable and enjoy the power of devshell by running it like this:
bitbake -c devshell <target>
  • You now have all the environment variables set up to correctly to run configure, make, etc.

FAQ

X11 connection rejected because of wrong authentication

Sometimes if you try to run devshell remote over SSH with X11 redirection this error occurs:

X11 connection rejected because of wrong authentication.
ERROR: function do_devshell failed

The problem seems to be the XAUTHORITY handling. The following part in .profile helped some users.

if [ -e "$HOME/.Xauthority" ] ; then
    export XAUTHORITY="$HOME/.Xauthority"
fi