Bug 1192192 - pari: gp.o varies from parallelism
Summary: pari: gp.o varies from parallelism
Status: NEW
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Other (show other bugs)
Version: Current
Hardware: Other All
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Jan Engelhardt
QA Contact: E-mail List
URL: https://pari.math.u-bordeaux.fr/cgi-b...
Whiteboard:
Keywords:
Depends on:
Blocks: 1102408
  Show dependency treegraph
 
Reported: 2021-10-31 19:34 UTC by Bernhard Wiedemann
Modified: 2021-11-01 07:11 UTC (History)
0 users

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 2021-10-31 19:34:31 UTC
Also reported upstream.

While working on reproducible builds for openSUSE, I found that
our pari-2.13.2 package build results varied between -j1 and -j4 builds.

From the logs I found that in the parallel build case, gp.o was compiled a 2nd time without our CFLAGS but instead with flags that come from 
pari-2.13.2/config/get_cc


[1]
difflog | grep -- -o.gp.o
- /usr/bin/gcc  -c -I. -I../src/headers -I../src/language -DDL_DFLT_NAME=NULL -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type  -fno-strict-aliasing -o gp.o ../src/gp/gp.c
+ /usr/bin/gcc  -c -I. -I../src/headers -I../src/language -DDL_DFLT_NAME=NULL -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type  -fno-strict-aliasing -o gp.o ../src/gp/gp.c
+ /usr/bin/gcc  -c -I. -I../src/headers -I../src/language -DDL_DFLT_NAME=NULL -O3 -Wall -fno-strict-aliasing -fomit-frame-pointer    -o gp.o ../src/gp/gp.c


pari-2.13.2/Olinux-x86_64/init.o also varied, likely from the same root cause.

This is probably some problem with dependencies in the build system.

We build thusly:
https://code.opensuse.org/package/pari/blob/08424e1789878449eb0ac61c5cafde2ff296a565/f/pari.spec#_104

That .o files are sometimes built without our hardening CFLAGS is a bug independent of reproducible builds.

The previous version 2.13.1 was building reproducibly today with the old spec file and current toolchain. But 2.13.1 also became unreproducible when building with the current .spec file.

This indicates that one of the .spec changes triggered the new problem. The diff is
https://code.opensuse.org/package/pari/c/08424e1789878449eb0ac61c5cafde2ff296a565

I think, the problem came from
make [...] all docpdf
because changing that to
make [...] all
make [...] docpdf

made the output reproducible again.

[1] https://github.com/bmwiedemann/reproducibleopensuse/blob/master/difflog