query about debuginfo

Jakub Bogusz qboosh at pld-linux.org
Sun Apr 11 21:47:30 CEST 2021


On Fri, Apr 09, 2021 at 03:27:11PM +0100, Krzysztof Mrozowicz via pld-devel-en wrote:
> Hi, I updated the wesnoth package to newer version and it built on my
> computer with no problems. When I tried to build it on the builders,
> it failed with error saying that debugsourcefiles.list is empty.

That's because package was compiled without debugging information, so
rpm couldn't find source files for compiled binaries.

After adjusting build to use PLD-specific compiler flags, debug packages
are created.

> I updated my environment to what is in th-test and was able to
> reproduce the error on my computer, so something got changed in macros
> or rpm there...

Older rpm didn't complain on empty debug packages.

> This was the first time when I saw this kind of error so I asked
> google and found some solution:
> 
> add %global debug_package %{nil} to the spec

We're rather using "%define _enable_debug_packages 0"
to disable debug packages completely (which must be done when no
native binaries are packaged, but package can't be noarch e.g. because
of arch-dependent file paths or arch-dependenty bytecode).

If binary debuginfo packages are created, but source files cannot be
found (e.g. because of language not supported by rpm debugsource
mechanism, like rust), we can disable just debugsource packages by
"%define _debugsource_packages 0"
(see gnome-tour.spec for example).


-- 
Jakub Bogusz    http://qboosh.pl/


More information about the pld-devel-en mailing list