Bug 1138809 - LTO: gmp build fails
Summary: LTO: gmp build fails
Status: NEW
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Martin Liška
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 1133084
  Show dependency treegraph
 
Reported: 2019-06-20 10:09 UTC by Martin Liška
Modified: 2023-04-06 15:26 UTC (History)
2 users (show)

See Also:
Found By: ---
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 Martin Liška 2019-06-20 10:09:19 UTC
Fails in the following test-case:

abuild@marxinbox:~/rpmbuild/BUILD/gmp-6.1.2/tests/mpz> ./t-get_d_2exp 
mpz_get_d_2exp wrong on 2**54-1
result out of range, expect 0.5 <= got < 1.0
   rnd_mode = 0
   data[i]  = 54
   z    =0x3FFFFFFFFFFFFF
   got  =[00 00 00 00 00 00 F0 3F] 1
   got exp  54
Aborted (core dumped)

https://build.opensuse.org/package/live_build_log/openSUSE:Factory:Staging:N/gmp/standard/x86_64

For not I'm going to disable LTO for it.
Comment 1 Richard Biener 2019-06-24 09:39:35 UTC
Did you file an upstream bugreport?  Did you do any analysis?  Note that the
testsuite uses the static libgmp which means we end up LTO-ing that.

I'd say instead of SR#711056 we want to disable LTO for the testsuite only
and see if we run into issues downstream.  Does the following work?

Index: gmp.spec
===================================================================
--- gmp.spec    (revision c7798040d19b320e52e6462ed7ede0e8)
+++ gmp.spec    (working copy)
@@ -81,6 +81,8 @@
 
 %check
 # do not disable "make check", FIX THE BUGS!
+# bsc#1138809 lists mpz/t-get_d_2exp failing with LTO
+export CFLAGS="%{optflags} -fno-lto"
 make %{?_smp_mflags} check
 
 %install
Comment 2 Martin Liška 2019-06-24 13:48:03 UTC
(In reply to Richard Biener from comment #1)
> Did you file an upstream bugreport?  Did you do any analysis?

I've just sent a bug report (CCing you). And I haven't done an analysis yet.

>  Note that the
> testsuite uses the static libgmp which means we end up LTO-ing that.

Ah I see.

> 
> I'd say instead of SR#711056 we want to disable LTO for the testsuite only
> and see if we run into issues downstream.  Does the following work?
> 
> Index: gmp.spec
> ===================================================================
> --- gmp.spec    (revision c7798040d19b320e52e6462ed7ede0e8)
> +++ gmp.spec    (working copy)
> @@ -81,6 +81,8 @@
>  
>  %check
>  # do not disable "make check", FIX THE BUGS!
> +# bsc#1138809 lists mpz/t-get_d_2exp failing with LTO
> +export CFLAGS="%{optflags} -fno-lto"
>  make %{?_smp_mflags} check
>  
>  %install

No, that does not help, the issue is really in the library. Using -fno-lto does not help in test-suite. I can return to it, but for now I would prefer disabling of LTO.
Comment 3 Martin Liška 2019-06-25 08:04:28 UTC
So it's a known issue:
https://gmplib.org/list-archives/gmp-bugs/2019-May/004547.html
Comment 4 Swamp Workflow Management 2019-07-01 10:40:06 UTC
This is an autogenerated message for OBS integration:
This bug (1138809) was mentioned in
https://build.opensuse.org/request/show/712776 Factory / gmp
Comment 5 Alynx Zhou 2019-07-04 08:54:26 UTC
So it seems it is a gmp issue. If incorrect please re-assign.
Comment 6 Martin Liška 2019-07-04 08:57:01 UTC
(In reply to Alynx Zhou from comment #5)
> So it seems it is a gmp issue. If incorrect please re-assign.

Yep, they are working on that. Please leave it assigned to me.
Comment 7 Alynx Zhou 2019-07-04 09:00:53 UTC
(In reply to Martin Liška from comment #6)
> (In reply to Alynx Zhou from comment #5)
> > So it seems it is a gmp issue. If incorrect please re-assign.
> 
> Yep, they are working on that. Please leave it assigned to me.

Thank you! It shows in bnc-screening-team before I assign it.