Reproducible builds vs debugedit vs relative debug paths

Holger Levsen holger at layer-acht.org
Sat Mar 28 14:21:27 UTC 2026


Hi Mark,

thanks for reaching out! Leaving full context for those who missed
the original mail :)

On Sun, Mar 22, 2026 at 08:39:08PM +0100, Mark Wielaard wrote:
> "debugedit https://sourceware.org/debugedit provides programs and
> scripts for creating debuginfo and source file distributions, collect
> build-ids and rewrite source paths in DWARF data for debugging,
> tracing and profiling."
> 
> For the "rewrite source paths in DWARF data" part we recently hit a
> bug because debugedit doesn't handle rewriting relative paths. We
> might be able to fix that bug, but it isn't precisely clear what the
> path is relative to when multiple object files build in different
> directories are linked together. So we would like to recommend people
> avoid creating these relative paths.
> https://sourceware.org/bugzilla/show_bug.cgi?id=33823
> https://sourceware.org/bugzilla/show_bug.cgi?id=33602
> 
> But then we found https://reproducible-builds.org/docs/build-path/
> which explicitly seems to recommend using them. And has a note on
> debugedit:
> https://reproducible-builds.org/docs/build-path/#fn:debugedit
> 
>   debugedit can replace the path used at build time by a
>   predefined one but it does that by rewriting bytes in place.
>   As this does not reorder the hash table of strings,
>   the resulting bytes are still depending on the original
>   build path.
> 
> I wonder if that comment might be based on some older version of
> debugedit? 

this might well be the case, this file was last touched in 2020, see
https://salsa.debian.org/reproducible-builds/reproducible-website/-/blob/master/_docs/build_path.md?ref_type=heads

is there a improved wording you could suggest?

> Current versions do rewrite the .debug_str and other
> similar string tables. But maybe I am missing something else that
> makes debugedit not deterministic in path rewriting.
> 
> Have people tried more modern versions of debugedit to get
> deterministic (absolute) DWARF paths and found issues with it?

not sure, this is really not my area of expertize. Anyone else?


-- 
cheers,
	Holger

 ⢀⣴⠾⠻⢶⣦⠀
 ⣾⠁⢠⠒⠀⣿⡁  holger@(debian|reproducible-builds|layer-acht).org
 ⢿⡄⠘⠷⠚⠋⠀  OpenPGP: B8BF54137B09D35CF026FE9D 091AB856069AAA1C
 ⠈⠳⣄

AI is for our brains what cars are for our legs. (Tomáš Peltan)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.reproducible-builds.org/pipermail/rb-general/attachments/20260328/b3dddb7a/attachment.sig>


More information about the rb-general mailing list