<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>598</bug_id>
          
          <creation_ts>2010-12-15 06:42:24 +0000</creation_ts>
          <short_desc>[poky]  kernel interactive build does not work via ssh</short_desc>
          <delta_ts>2011-03-10 17:41:53 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>Meta-yocto</product>
          <component>meta-yocto</component>
          <version>1.0</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>1.0 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jiajun Xu">jiajun.xu</reporter>
          <assigned_to name="Bruce Ashfield">bruce.ashfield</assigned_to>
          <cc>bruce.ashfield</cc>
    
    <cc>ke.yu</cc>
    
    <cc>kevin.tian</cc>
    
    <cc>kunwei.tian</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>sgw</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>11182</commentid>
    <comment_count>0</comment_count>
    <who name="Jiajun Xu">jiajun.xu</who>
    <bug_when>2010-12-15 06:42:24 +0000</bug_when>
    <thetext>Testing Env:    
Poky gitinfo: 3a78838d4f1db75d06b5d3df042638f34cf328f5

This is an enhancement request. Poky supports kernel interactive build such as, &quot;bitbake linux-yocto -c menuconfig&quot;. But currently such command only works on local X desktop. It cannot work via ssh, which is a common usage model for developer.

Reproduce steps:
1. Download latest poky source
2. Run &quot;bitbake linux-yocto -c menuconfig&quot; in a ssh session</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11183</commentid>
    <comment_count>1</comment_count>
    <who name="Jiajun Xu">jiajun.xu</who>
    <bug_when>2010-12-15 06:43:25 +0000</bug_when>
    <thetext>(In reply to comment #0)
&gt; Testing Env:    
&gt; Poky gitinfo: 3a78838d4f1db75d06b5d3df042638f34cf328f5
&gt; This is an enhancement request. Poky supports kernel interactive build such as,
&gt; &quot;bitbake linux-yocto -c menuconfig&quot;. But currently such command only works on
&gt; local X desktop. It cannot work via ssh, which is a common usage model for
&gt; developer.
&gt; Reproduce steps:
&gt; 1. Download latest poky source
&gt; 2. Run &quot;bitbake linux-yocto -c menuconfig&quot; in a ssh session

The error we got when running in a ssh session:

###########
NOTE: package linux-yocto-2.6.37+git0+ee0a10ab687b29c4d22d47e5b28bc8b3ebb7a8d9_0+87aacc373557f8849dde8618fbe1f7f8f2af6038-r14: task do_menuconfig: Started
ERROR: Task failed: (&apos;function do_menuconfig failed&apos;, &apos;/home/jxu49/osel/poky-m2/build/tmp/work/qemux86-poky-linux/linux-yocto-2.6.37+git0+ee0a10ab687b29c4d22d47e5b28bc8b3ebb7a8d9_0+87aacc373557f8849dde8618fbe1f7f8f2af6038-r14/temp/log.do_menuconfig.28018&apos;)
ERROR: Logfile of failure stored in: /home/jxu49/osel/poky-m2/build/tmp/work/qemux86-poky-linux/linux-yocto-2.6.37+git0+ee0a10ab687b29c4d22d47e5b28bc8b3ebb7a8d9_0+87aacc373557f8849dde8618fbe1f7f8f2af6038-r14/temp/log.do_menuconfig.28018
Log data follows:
| Failed to parse arguments: Cannot open display:
| ERROR: Task failed: (&apos;function do_menuconfig failed&apos;, &apos;/home/jxu49/osel/poky-m2/build/tmp/work/qemux86-poky-linux/linux-yocto-2.6.37+git0+ee0a10ab687b29c4d22d47e5b28bc8b3ebb7a8d9_0+87aacc373557f8849dde8618fbe1f7f8f2af6038-r14/temp/log.do_menuconfig.28018&apos;)
NOTE: package linux-yocto-2.6.37+git0+ee0a10ab687b29c4d22d47e5b28bc8b3ebb7a8d9_0+87aacc373557f8849dde8618fbe1f7f8f2af6038-r14: task do_menuconfig: Failed
ERROR: Task 6 (/home/jxu49/osel/poky-m2/meta/recipes-kernel/linux/linux-yocto_git.bb, do_menuconfig) failed with 1
ERROR: &apos;/home/jxu49/osel/poky-m2/meta/recipes-kernel/linux/linux-yocto_git.bb&apos; failed
###########</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11199</commentid>
    <comment_count>2</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2010-12-15 11:22:41 +0000</bug_when>
    <thetext>Can you try setting TERMCMD and TERMCMDRUN to the screen settings and see if that works?

Place the following in your local.conf

TERMCMD = &quot;${SCREEN_TERMCMD}&quot;
TERMCMDRUN = &quot;${SCREEN_TERMCMDRUN}&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11202</commentid>
    <comment_count>3</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2010-12-15 13:09:46 +0000</bug_when>
    <thetext>No change here:


yow-bashfiel-d2 [/home/bruc...poky/build]&gt; cat conf/local.conf | grep SCREE
TERMCMD = &quot;${SCREEN_TERMCMD}&quot;
TERMCMDRUN = &quot;${SCREEN_TERMCMDRUN}&quot;


bitbake -f linux-yocto -c menuconfig
NOTE: Handling BitBake files: - (0773/0773) [100 %]
Parsing of 773 .bb files complete (726 cached, 47 parsed). 932 targets, 34 skipped, 0 masked, 0 errors.

OE Build Configuration:
BB_VERSION        = &quot;1.11.0&quot;
METADATA_BRANCH   = &quot;master&quot;
METADATA_REVISION = &quot;774de9680f32009be3af41155c9750769a611a47&quot;
TARGET_ARCH       = &quot;x86_64&quot;
TARGET_OS         = &quot;linux&quot;
MACHINE           = &quot;qemux86-64&quot;
DISTRO            = &quot;poky&quot;
DISTRO_VERSION    = &quot;0.9+snapshot-20101215&quot;
TARGET_FPU        = &quot;&quot;

NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing setscene Tasks
NOTE: We can skip tasks set([])
NOTE: Executing runqueue
NOTE: Full skip list set([])
NOTE: Running task 151 of 151 (ID: 6, /home/bruce/poky/meta/recipes-kernel/linux/linux-yocto_git.bb, do_menuconfig)
NOTE: package linux-yocto-2.6.37+git0+ee0a10ab687b29c4d22d47e5b28bc8b3ebb7a8d9_0+87aacc373557f8849dde8618fbe1f7f8f2af6038-r14: task do_menuconfig: Started
NOTE: package linux-yocto-2.6.37+git0+ee0a10ab687b29c4d22d47e5b28bc8b3ebb7a8d9_0+87aacc373557f8849dde8618fbe1f7f8f2af6038-r14: task do_menuconfig: Succeeded
NOTE: Tasks Summary: Attempted 151 tasks of which 150 didn&apos;t need to be rerun and 0 failed.

No menuconfig was seen :)

---------------

I previously had:


yow-bashfiel-d2 [/home/bruc...poky/build]&gt; cat conf/local.conf | grep screen
TERMCMD = &quot;screen&quot;
TERMCMDRUN = &quot;screen&quot;

Which results in:


yow-bashfiel-d2 [/home/bruc...poky/build]&gt; !bit
bitbake -f linux-yocto -c menuconfig
NOTE: Out of date cache found, rebuilding...
NOTE: Handling BitBake files: - (0773/0773) [100 %]
Parsing of 773 .bb files complete (0 cached, 773 parsed). 932 targets, 34 skipped, 0 masked, 0 errors.

OE Build Configuration:
BB_VERSION        = &quot;1.11.0&quot;
METADATA_BRANCH   = &quot;master&quot;
METADATA_REVISION = &quot;774de9680f32009be3af41155c9750769a611a47&quot;
TARGET_ARCH       = &quot;x86_64&quot;
TARGET_OS         = &quot;linux&quot;
MACHINE           = &quot;qemux86-64&quot;
DISTRO            = &quot;poky&quot;
DISTRO_VERSION    = &quot;0.9+snapshot-20101215&quot;
TARGET_FPU        = &quot;&quot;

NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing setscene Tasks
NOTE: We can skip tasks set([])
NOTE: Executing runqueue
NOTE: Full skip list set([])
NOTE: Running task 151 of 151 (ID: 6, /home/bruce/poky/meta/recipes-kernel/linux/linux-yocto_git.bb, do_menuconfig)
NOTE: package linux-yocto-2.6.37+git0+ee0a10ab687b29c4d22d47e5b28bc8b3ebb7a8d9_0+87aacc373557f8849dde8618fbe1f7f8f2af6038-r14: task do_menuconfig: Started
ERROR: Task failed: (&apos;function do_menuconfig failed&apos;, &apos;/home/bruce/poky/build/tmp/work/qemux86-64-poky-linux/linux-yocto-2.6.37+git0+ee0a10ab687b29c4d22d47e5b28bc8b3ebb7a8d9_0+87aacc373557f8849dde8618fbe1f7f8f2af6038-r14/temp/log.do_menuconfig.30706&apos;)
ERROR: Logfile of failure stored in: /home/bruce/poky/build/tmp/work/qemux86-64-poky-linux/linux-yocto-2.6.37+git0+ee0a10ab687b29c4d22d47e5b28bc8b3ebb7a8d9_0+87aacc373557f8849dde8618fbe1f7f8f2af6038-r14/temp/log.do_menuconfig.30706
Log data follows:
| Must be connected to a terminal.
| ERROR: Task failed: (&apos;function do_menuconfig failed&apos;, &apos;/home/bruce/poky/build/tmp/work/qemux86-64-poky-linux/linux-yocto-2.6.37+git0+ee0a10ab687b29c4d22d47e5b28bc8b3ebb7a8d9_0+87aacc373557f8849dde8618fbe1f7f8f2af6038-r14/temp/log.do_menuconfig.30706&apos;)
NOTE: package linux-yocto-2.6.37+git0+ee0a10ab687b29c4d22d47e5b28bc8b3ebb7a8d9_0+87aacc373557f8849dde8618fbe1f7f8f2af6038-r14: task do_menuconfig: Failed
ERROR: Task 6 (/home/bruce/poky/meta/recipes-kernel/linux/linux-yocto_git.bb, do_menuconfig) failed with 1
ERROR: &apos;/home/bruce/poky/meta/recipes-kernel/linux/linux-yocto_git.bb&apos; failed

------------------------------

All tests done via ssh -Y</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11261</commentid>
    <comment_count>4</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2010-12-21 06:33:58 +0000</bug_when>
    <thetext>Can people retest this with the latest master please? I tested with ssh -Y and gnome-terminal and it seemed to work fine both locally and over ssh. I&apos;m not sure about screen, I think that may have some kind of problem as it appears to hang here. I don&apos;t use screen much though so it could be my usage...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11262</commentid>
    <comment_count>5</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2010-12-21 06:36:16 +0000</bug_when>
    <thetext>Just to confirm that if in another terminal I attach with screen -r, it connects to the menuconfig task. It won&apos;t reuse an existing screen session with a new window by the looks of it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11264</commentid>
    <comment_count>6</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2010-12-21 09:58:34 +0000</bug_when>
    <thetext>works on master for me now. screen was used, and I can see 
the menuconfig.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11278</commentid>
    <comment_count>7</comment_count>
    <who name="Jiajun Xu">jiajun.xu</who>
    <bug_when>2010-12-22 06:33:22 +0000</bug_when>
    <thetext>When I set following configure in local.conf, I will get error in log.do_menuconfig.
########
TERMCMD = &quot;${SCREEN_TERMCMD}&quot;
TERMCMDRUN = &quot;${SCREEN_TERMCMDRUN}&quot;
########

Error log in log.do_menuconfig:
########
ERROR: ld.so: object &apos;libpseudo.so&apos; from LD_PRELOAD cannot be preloaded: ignored.
########</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12012</commentid>
    <comment_count>8</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2011-02-23 12:47:11 +0000</bug_when>
    <thetext>This works fine. I just retested. When you attach to the appropriate screen
session the menuconfig is quite healthy and running.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12190</commentid>
    <comment_count>9</comment_count>
    <who name="Jiajun Xu">jiajun.xu</who>
    <bug_when>2011-03-01 06:14:09 +0000</bug_when>
    <thetext>(In reply to comment #8)
&gt; This works fine. I just retested. When you attach to the appropriate screen
&gt; session the menuconfig is quite healthy and running.

Hi Bruce,
Is is possible for you to send me a BKM on how to enable interactive build with latest poky?
It never works on my machine, maybe it is caused by my machine configuration.

Now the only workable terminal on my machine is XTERM. But it still needs following change to work correctly. Without the change, seems ${TERMCMDRUN} in function do_menuconfig run under ${TOPDIR}, instead of ${S}.

########
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 5d9b86a..e2c7562 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -202,7 +202,7 @@ do_menuconfig() {
         export DBUS_SESSION_BUS_ADDRESS=&apos;${DBUS_SESSION_BUS_ADDRESS}&apos;
         export XAUTHORITY=&apos;${XAUTHORITY}&apos;
        export TERMWINDOWTITLE=&quot;${PN} Kernel Configuration&quot;
-       export SHELLCMDS=&quot;bash make menuconfig&quot;
+       export SHELLCMDS=&quot;cd ${S} &amp;&amp; make menuconfig&quot;
        ${TERMCMDRUN}
        if [ $? -ne 0 ]; then
                echo &quot;Fatal: &apos;${TERMCMD}&apos; not found. Check TERMCMD variable.&quot;
########</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12200</commentid>
    <comment_count>10</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2011-03-01 12:35:44 +0000</bug_when>
    <thetext>You definitely shouldn&apos;t need the &quot;cd {S}&quot;, this is already being
run in the context of the source directory of the build. That&apos;s what
I&apos;m seeing.

But I AM seeing the pseudo preload issue jump up and abort
the menuconfig. Investigating more.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12240</commentid>
    <comment_count>11</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2011-03-03 11:00:19 +0000</bug_when>
    <thetext>http://git.pokylinux.org/cgit/cgit.cgi/poky/commit/?id=23ecbad5cd2b83263cdd79ddb31a7cd10f7ede7f</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12465</commentid>
    <comment_count>12</comment_count>
    <who name="Jiajun Xu">jiajun.xu</who>
    <bug_when>2011-03-10 17:41:53 +0000</bug_when>
    <thetext>Verify the bug in RC2 testing, and it&apos;s fixed now.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>