Bug 12092 - Sources (/usr/src/debug) missing in -dbg packages when MACHINE="qemumips"
Summary: Sources (/usr/src/debug) missing in -dbg packages when MACHINE="qemumips"
Status: RESOLVED FIXED
Alias: None
Product: Meta-yocto
Classification: Build System, Metadata & Runtime
Component: meta-yocto (show other bugs)
Version: 2.3.2
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.5 M4
Assignee: Amanda Brindle
QA Contact:
URL:
Whiteboard: Backport 2.3.n and 2.4.n
Depends on:
Blocks:
 
Reported: 2017-09-15 18:28 UTC by Matthias Schöpfer
Modified: 2018-05-10 08:10 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
Patches classes/package.bbclass to show warning instead of silently ignoring return of command (925 bytes, patch)
2017-09-15 18:28 UTC, Matthias Schöpfer
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Schöpfer 2017-09-15 18:28:33 UTC
Created attachment 4010 [details]
Patches classes/package.bbclass to show warning instead of silently ignoring return of command

Preconditions/Environment
-------------------------
Build Configuration:
BB_VERSION        = "1.34.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "universal"
TARGET_SYS        = "mips-poky-linux"
MACHINE           = "qemumips"
DISTRO            = "poky"
DISTRO_VERSION    = "2.3.2"
TUNE_FEATURES     = "o32 bigendian fpu-hard mips32r2"
TARGET_FPU        = ""
meta              
meta-poky         
meta-yocto-bsp    = "pyro:072430b9b3a78b318b66371c36e2986d2ed5cba4"



Triggering Action/Cause
-----------------------
Set MACHINE to qemumips, build any package (say "bitbake bash")
run
"oe-pkgdata-util list-pkg-files bash-dbg"
List is missing /usr/src/debug

Expectation
-----------
bash-dbg shall have /usr/src/debug sources in it

Actual Result
-------------
bash-dbg is missing /usr/src/debug

Reproducibility
---------------
allways

Hints
---------------
When MACHINE="qemux86-64" all is fine. When applying attached patch, on qemux86-64 command will fail, but on qemumips not!!
Comment 1 Richard Purdie 2017-09-21 14:47:12 UTC
We need to check first if this occurs with master. If so we need to figure out the fix, if not, we need to figure out if there is a fix to backport.
Comment 2 Amanda Brindle 2017-09-27 20:44:55 UTC
This does occur on master. I will look more into this.
Comment 3 Amanda Brindle 2017-10-24 19:42:50 UTC
"oe-pkgdata-util list-pkg-files bash-dbg" prints out the FILES_INFO variable from the  file tmp/pkgdata/qemu(mips)(x86-64)/runtime/bash-dbg

FILES_INFO is set to whatever is inside of tmp/work/(core2-64-poky-linux)(mips32r2-poky-linux)/bash/4.4-r0/packages-split

packages-split is created based on the contents of tmp/work/(core2-64-poky-linux)(mips32r2-poky-linux)/bash/4.4-r0/package

package is created with the cpio command, which copies the files written inside of tmp/work/(core2-64-poky-linux)(mips32r2-poky-linux)/bash/4.4-r0/debugsources.list into package

debugsources.list is created with the command tmp/work/(core2-64-poky-linux)(mips32r2-poky-linux)/bash/4.4-r0/recipe-sysroot-native/usr/lib/rpm/debugedit

debugsources.list is empty for mips32r2-poky-linux

I believe that this is the root of the problem; debugedit is creating debusources.list, and is creating an empty file for mips32r2-poky-linux. I haven't used debugedit before, and I'm not sure which steps I should take in debugging it, or if someone more familiar with debugedit can take a look.
Comment 4 Alexander Kanavin 2017-11-16 10:00:22 UTC
Debugedit is somthing that we didn't write (rpm folks did), and it does intricate binary file walkover that is not easy to debug.

As we're transitioning away from debugedit, can you try to see if using the replacement dwarfsrcfiles utility fixes the issue?

Patch was posted here:
http://lists.openembedded.org/pipermail/openembedded-core/2017-November/144369.html
Comment 5 Amanda Brindle 2017-11-16 23:28:00 UTC
Alex's patch fixes this issue. Alex, can you please let us know when this patch is merged? Also, is this something we should backport to pyro?
Comment 6 Alexander Kanavin 2017-11-17 12:14:13 UTC
If pyro has the same issue, and it is fixed by the patch, then yes, you should.
Comment 7 Stephano Cetola 2018-02-20 22:49:08 UTC
Backport for M4.
Comment 8 Richard Purdie 2018-05-10 08:10:11 UTC
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=0d5475a3b28d9e2c9273967a03726bb6c427bd11

[if anyone wants this backported I'd suggest mailing list discussion as its an invasive change]