Open
Conversation
A recent Portage fix should avoid any collisions by salting the debug files with the package name and version. The fix inadvertently broke the debuglink CRC, which gdb checks, but this went unnoticed in Gentoo because gdb prefers looking up symbols with the build-id instead. However, this was noticed in Flatcar because of the INSTALL_MASK! This has now been fixed in Gentoo, pending a new Portage release. We can drop the INSTALL_MASK now to rely on the build-id instead of the debuglink. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
Otherwise they trip our QA check, which fails the build. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
Gentoo starts with this directory being empty, and Portage complains if you populate it with merge-usr symlinks. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix debug symbol issues
A recent Portage fix should avoid any collisions by salting the debug files with the package name and version. The fix inadvertently broke the debuglink CRC, which gdb checks, but this went unnoticed in Gentoo because gdb prefers looking up symbols with the build-id instead. However, this was noticed in Flatcar because of /usr/lib/debug/.build-id being INSTALL_MASK'd! This has now been fixed in Gentoo, pending a new Portage release. We can drop the INSTALL_MASK now to rely on the build-id instead of the debuglink.
Following that, we also need to remove debug build-id symlinks broken by other INSTALL_MASK entries, otherwise they trip our QA check, which fails the build.
Finally, we bump baselayout to drop /usr/lib/debug dirs and symlinks. Gentoo starts with this directory being empty, and Portage complains if you populate it with merge-usr symlinks.
How to use
Run gdb against any binary in the SDK. It should find the debug symbols without complaining of CRC mismatches. Do the same after renaming /usr/lib/debug/.build-id.
Testing done
An SDK build is running under Jenkins. I have also done the above manually.
changelog/directory (user-facing change, bug fix, security fix, update) -- N/A/bootand/usrsize, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.