Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue in finding debugsymbols for Fedora 41 #29

Merged
merged 1 commit into from
May 27, 2024

Conversation

fepitre
Copy link
Member

@fepitre fepitre commented May 18, 2024

Build typically fails like:

+ /usr/bin/find-debuginfo -j8 --strict-build-id -m -i --build-id-seed 0.2.7-1.fc41 --unique-debug-suffix -0.2.7-1.fc41.x86_64 --unique-debug-src-base qubes-rpm-oxide-0.2.7-1.fc41.x86_64 --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 110000000 -S debugsourcefiles.list /builddir/build/BUILD/qubes-rpm-oxide-0.2.7
find-debuginfo: starting
Extracting debug info from 2 files
warning: Unsupported auto-load script at offset 0 in section .debug_gdb_scripts
of file /builddir/build/BUILDROOT/qubes-rpm-oxide-0.2.7-1.fc41.x86_64/usr/bin/sigparse.
Use `info auto-load python-scripts [REGEXP]' to list them.
warning: Unsupported auto-load script at offset 0 in section .debug_gdb_scripts
of file /builddir/build/BUILDROOT/qubes-rpm-oxide-0.2.7-1.fc41.x86_64/usr/bin/rpmcanon.
Use `info auto-load python-scripts [REGEXP]' to list them.
Error while writing index for `/builddir/build/BUILDROOT/qubes-rpm-oxide-0.2.7-1.fc41.x86_64/usr/bin/sigparse': No debugging symbols
Error while writing index for `/builddir/build/BUILDROOT/qubes-rpm-oxide-0.2.7-1.fc41.x86_64/usr/bin/rpmcanon': No debugging symbols
gdb-add-index: No index was created for /builddir/build/BUILDROOT/qubes-rpm-oxide-0.2.7-1.fc41.x86_64/usr/bin/sigparse
gdb-add-index: [Was there no debuginfo? Was there already an index?]
gdb-add-index: No index was created for /builddir/build/BUILDROOT/qubes-rpm-oxide-0.2.7-1.fc41.x86_64/usr/bin/rpmcanon
gdb-add-index: [Was there no debuginfo? Was there already an index?]
DWARF-compressing 2 files
dwz: Too few files for multifile optimization
sepdebugcrcfix: Updated 0 CRC32s, 2 CRC32s did match.
Creating .debug symlinks for symlinks to ELF files
find-debuginfo: done

https://doc.rust-lang.org/cargo/reference/profiles.html#strip

QubesOS/qubes-issues#9244

@marmarek
Copy link
Member

Is it also QubesOS/qubes-issues#9137 ?

@@ -29,7 +29,7 @@ BuildRequires: rpm-devel >= 4.14.2.1-4
BuildRequires: rust-debugger-common
BuildRequires: rust-cc-devel
BuildRequires: rust-libc-devel
%define qubes_cargo RUSTFLAGS='-Cdebuginfo=2 -Clink-arg=-Wl,-z,relro,-z,now' \\\
%define qubes_cargo RUSTFLAGS='-Cstrip=none -Cdebuginfo=2 -Clink-arg=-Wl,-z,relro,-z,now' \\\
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe better avoid setting custom RUSTFLAGS at all?
And add %set_build_flags at the start of %build (and %check?) to have default ones set

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DemiMarie what's the original reason to not use default Fedora flags?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don’t remember. I suspect it dates back to me trying to support the ancient Rust in Fedora 25 for R4.0.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fepitre so, in this case can you try removing custom RUSTFLAGS?

Build typically fails like:
```
+ /usr/bin/find-debuginfo -j8 --strict-build-id -m -i --build-id-seed 0.2.7-1.fc41 --unique-debug-suffix -0.2.7-1.fc41.x86_64 --unique-debug-src-base qubes-rpm-oxide-0.2.7-1.fc41.x86_64 --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 110000000 -S debugsourcefiles.list /builddir/build/BUILD/qubes-rpm-oxide-0.2.7
find-debuginfo: starting
Extracting debug info from 2 files
warning: Unsupported auto-load script at offset 0 in section .debug_gdb_scripts
of file /builddir/build/BUILDROOT/qubes-rpm-oxide-0.2.7-1.fc41.x86_64/usr/bin/sigparse.
Use `info auto-load python-scripts [REGEXP]' to list them.
warning: Unsupported auto-load script at offset 0 in section .debug_gdb_scripts
of file /builddir/build/BUILDROOT/qubes-rpm-oxide-0.2.7-1.fc41.x86_64/usr/bin/rpmcanon.
Use `info auto-load python-scripts [REGEXP]' to list them.
Error while writing index for `/builddir/build/BUILDROOT/qubes-rpm-oxide-0.2.7-1.fc41.x86_64/usr/bin/sigparse': No debugging symbols
Error while writing index for `/builddir/build/BUILDROOT/qubes-rpm-oxide-0.2.7-1.fc41.x86_64/usr/bin/rpmcanon': No debugging symbols
gdb-add-index: No index was created for /builddir/build/BUILDROOT/qubes-rpm-oxide-0.2.7-1.fc41.x86_64/usr/bin/sigparse
gdb-add-index: [Was there no debuginfo? Was there already an index?]
gdb-add-index: No index was created for /builddir/build/BUILDROOT/qubes-rpm-oxide-0.2.7-1.fc41.x86_64/usr/bin/rpmcanon
gdb-add-index: [Was there no debuginfo? Was there already an index?]
DWARF-compressing 2 files
dwz: Too few files for multifile optimization
sepdebugcrcfix: Updated 0 CRC32s, 2 CRC32s did match.
Creating .debug symlinks for symlinks to ELF files
find-debuginfo: done
```
@marmarek
Copy link
Member

I'm confused, now fc38 failed with:

DEBUG: error: Empty %files file /builddir/build/BUILD/qubes-rpm-oxide-0.2.7/debugsourcefiles.list

but both fc37 (dom0) and fc39 worked

@marmarek
Copy link
Member

I have an idea: Fedora 38 went EOL just a few days ago, lets drop it from CI :D

@marmarek
Copy link
Member

PipelineRetry

@marmarek marmarek merged commit cec7f52 into QubesOS:main May 27, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants