Bug 1146634 - pcc does not build reproducibly with LTO
Summary: pcc does not build reproducibly with LTO
Status: RESOLVED FIXED
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Development (show other bugs)
Version: Current
Hardware: Other openSUSE Factory
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Michael Matz
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 1081754
  Show dependency treegraph
 
Reported: 2019-08-21 11:03 UTC by Bernhard Wiedemann
Modified: 2023-04-06 15:44 UTC (History)
4 users (show)

See Also:
Found By: Development
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard Wiedemann 2019-08-21 11:03:16 UTC
/usr/lib64/pcc/x86_64-suse-linux-gnu/1.0.0.RELEASE/lib/*.o differ

e.g.
+Contents of section .gnu.lto_.profile.23efe723a460f453:
+ 0000 789ce360 60044220 0000005d 000b      x..``.B ...]..
/usr/lib64/pcc/x86_64-suse-linux-gnu/1.0.0.RELEASE/lib/crt0.o differs in ELF section .gnu.lto_.icf.23efe723a460f453

 /usr/lib64/pcc/x86_64-suse-linux-gnu/1.0.0.RELEASE/lib/crt0.o:     file format elf64-x86-64

+Contents of section .gnu.lto_.icf.23efe723a460f453:
+ 0000 789ce360 6064e060 40004686 cecf6fba  x..``d.`@.F...o.
+ 0010 1819000e db0306                      .......

The .a files are fine, though, because they are stripped by
https://github.com/openSUSE/brp-check-suse/blob/master/brp-15-strip-debug#L40
Comment 1 Bernhard Wiedemann 2019-08-21 15:03:24 UTC
This also affects perl-XML-Parser
/usr/share/doc/packages/perl-XML-Parser/Expat/Expat.o
maybe that file should not be in there?

also racket
/usr/lib64/racket/mzdyn3m.o

and clisp
/usr/lib64/clisp-2.49.92/zlib/zlib.o
The latter both have other reproducibility issues as well
Comment 2 Pedro Monreal Gonzalez 2019-08-21 16:55:07 UTC
(In reply to Bernhard Wiedemann from comment #1)
> This also affects perl-XML-Parser
> /usr/share/doc/packages/perl-XML-Parser/Expat/Expat.o
> maybe that file should not be in there?

Good catch! In fact, there are a couple of files that should not be in the doc section. I just submitted a fix here:

  https://build.opensuse.org/request/show/725122

Please, let me know if that fixes the LTO build in ppc.
Comment 3 Bernhard Wiedemann 2019-11-05 14:50:59 UTC
Thanks Pedro. perl-XML-Parser is fine now.

Still a problem with pcc and racket though.
Comment 4 Bernhard Wiedemann 2019-11-05 15:34:47 UTC
https://github.com/openSUSE/brp-check-suse/pull/29
helped with pcc reproducibility in my tests.
Comment 5 Pedro Monreal Gonzalez 2019-11-05 16:19:04 UTC
There is a new racket version 7.4:
   https://racket-lang.org/

You can ask the maitainers to update the package. The osc maintainer command returns: toganm, KGronlund, olszewst
Comment 6 Martin Liška 2019-11-06 07:33:59 UTC
May I ask you why do the packages distribute *.o files in RPM?
Comment 7 Michael Matz 2019-11-06 09:04:32 UTC
That's the runtime startup code of the PCC compiler.  It's purpose is similar to
the crt*.o files distributed by gcc packages.
Comment 8 Swamp Workflow Management 2020-02-15 11:10:05 UTC
This is an autogenerated message for OBS integration:
This bug (1146634) was mentioned in
https://build.opensuse.org/request/show/774512 Factory / brp-check-suse
Comment 9 Bernhard Wiedemann 2020-05-27 09:39:57 UTC
solved for pcc.
Only thing left is a rebuild for  Factory pcc package.