Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 598986 - dev-scheme/guile-2.0.12-r1 fails to build with -ffast-math (from -Ofast)
Summary: dev-scheme/guile-2.0.12-r1 fails to build with -ffast-math (from -Ofast)
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM Linux
: Normal normal
Assignee: Scheme Project
URL: https://debbugs.gnu.org/cgi/bugreport...
Whiteboard:
Keywords: PullRequest
: 793179 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-11-05 10:14 UTC by Sven Müller
Modified: 2021-06-04 17:02 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,524.48 KB, text/plain)
2016-11-05 10:14 UTC, Sven Müller
Details
emerge --info (emerge_info.txt,5.30 KB, text/plain)
2016-11-05 10:16 UTC, Sven Müller
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Müller 2016-11-05 10:14:05 UTC
Created attachment 452408 [details]
build.log

guile-1.8.8-r2 builds fine. guile-2.0.12 fails with: 

  -L "/var/tmp/portage/dev-scheme/guile-2.0.12-r1/work/guile-2.0.12/guile-readline"			\
  -o "language/ecmascript/impl.go" "language/ecmascript/impl.scm"
%% Reduce/Reduce conflict (reduce 11, reduce 7) on '--' in state 422
%% Reduce/Reduce conflict (reduce 11, reduce 7) on '++' in state 422
%% Reduce/Reduce conflict (reduce 11, reduce 7) on '-' in state 422
%% Reduce/Reduce conflict (reduce 11, reduce 7) on '+' in state 422
%% Reduce/Reduce conflict (reduce 11, reduce 7) on 'semicolon' in state 422
%% Reduce/Reduce conflict (reduce 11, reduce 7) on 'dot' in state 422
%% Reduce/Reduce conflict (reduce 11, reduce 7) on 'lbracket' in state 422
%% Reduce/Reduce conflict (reduce 11, reduce 7) on 'lparen' in state 422
%% Reduce/Reduce conflict (reduce 9, reduce 6) on '--' in state 397
%% Reduce/Reduce conflict (reduce 9, reduce 6) on '++' in state 397
%% Reduce/Reduce conflict (reduce 9, reduce 6) on '-' in state 397
%% Reduce/Reduce conflict (reduce 9, reduce 6) on '+' in state 397
%% Reduce/Reduce conflict (reduce 9, reduce 6) on 'semicolon' in state 397
%% Reduce/Reduce conflict (reduce 9, reduce 6) on 'dot' in state 397
%% Reduce/Reduce conflict (reduce 9, reduce 6) on 'lbracket' in state 397
%% Reduce/Reduce conflict (reduce 9, reduce 6) on 'lparen' in state 397
%% Shift/Reduce conflict (shift 367, reduce 49) on 'else' in state 319
%% Shift/Reduce conflict (shift 144, reduce 177) on 'in' in state 242
%% Shift/Reduce conflict (shift 144, reduce 178) on 'in' in state 241
%% Shift/Reduce conflict (shift 144, reduce 179) on 'in' in state 240
%% Shift/Reduce conflict (shift 144, reduce 180) on 'in' in state 239
%% Shift/Reduce conflict (shift 80, reduce 119) on 'colon' in state 125
%% Shift/Reduce conflict (shift 170, reduce 139) on '++' in state 85
%% Shift/Reduce conflict (shift 169, reduce 139) on '--' in state 85
%% Shift/Reduce conflict (shift 153, reduce 159) on '+' in state 49
%% Shift/Reduce conflict (shift 152, reduce 159) on '-' in state 49
%% Shift/Reduce conflict (shift 144, reduce 176) on 'in' in state 47
make[2]: *** [Makefile:2235: language/ecmascript/impl.go] Floating point exception
make[2]: *** Waiting for unfinished jobs....
wrote `language/ecmascript/parse.go'
make[2]: Leaving directory '/var/tmp/portage/dev-scheme/guile-2.0.12-r1/work/guile-2.0.12/module'
make[1]: *** [Makefile:1838: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/dev-scheme/guile-2.0.12-r1/work/guile-2.0.12'
make: *** [Makefile:1724: all] Error 2
 * ERROR: dev-scheme/guile-2.0.12-r1::gentoo failed (compile phase):


CFLAGS (extracted from native):
CFLAGS="-Ofast -march=armv7-a -mtune=cortex-a9 -mfpu=neon-fp16 -mtls-dialect=gnu -mfloat-abi=hard -pipe -fomit-frame-pointer -fstack-protector-strong"

Tried to reduce the used USE-flags to: regex and networking. Dropping regex fails with https://bugs.gentoo.org/show_bug.cgi?id=596322. Networking is needed for gnutls and autogen.
Comment 1 Sven Müller 2016-11-05 10:16:50 UTC
Created attachment 452410 [details]
emerge --info
Comment 2 Tyler Slabinski 2016-12-02 19:44:12 UTC
I have experienced the same issue on AMD64. It seems to be cause by -ffast-math being enabled in -Ofast.

Adding -fno-fast-math to my CFLAGs eliminated the issue.
Comment 3 James Cloos 2016-12-20 14:39:34 UTC
I've found -O2 also can prevent compilation.

-O1 worked.
Comment 4 Amy Liffey gentoo-dev 2017-08-05 11:57:09 UTC
(In reply to James Cloos from comment #3)
> I've found -O2 also can prevent compilation.
> 
> -O1 worked.

Is this still present for new versions 2.0.13-r2 and 2.0.14-r2 which are in tree?
Comment 5 Cyprien Nicolas (fulax) 2019-06-23 08:33:27 UTC
(In reply to Amy Liffey from comment #4)
> (In reply to James Cloos from comment #3)
> > I've found -O2 also can prevent compilation.
> > 
> > -O1 worked.
> 
> Is this still present for new versions 2.0.13-r2 and 2.0.14-r2 which are in
> tree?

I have done several builds on amd64 for 2.0.14-r3, my findings:

I'm unable to reproduce any issue with only -O2.

I can reproduce the failure with only -Ofast, and make it pass using -Ofast -fno-fast-math.
Comment 6 Cyprien Nicolas (fulax) 2021-06-04 17:02:40 UTC
*** Bug 793179 has been marked as a duplicate of this bug. ***