Bug 1541613

Summary: mame-0.194 fails to build on ppc64 and ppc64le due to long double issues
Product: [Fedora] Fedora Reporter: Julian Sikorski <belegdol>
Component: mameAssignee: Julian Sikorski <belegdol>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: barndt, belegdol, jakub, mpolacek
Target Milestone: ---   
Target Release: ---   
Hardware: ppc64le   
OS: Unspecified   
Whiteboard:
Fixed In Version: 0.240-3.fc36 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2048910 (view as bug list) Environment:
Last Closed: 2022-02-01 13:10:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1649936    
Bug Blocks: 1071880, 2048910    

Description Julian Sikorski 2018-02-03 10:35:32 UTC
Description of problem:
mame-0.194 fails to build on ppc64 and ppc64le due to issues with long double variables.

Version-Release number of selected component (if applicable):
0.194-1.fc28

How reproducible:
always

Steps to Reproduce:
1. fedpkg clone mame
2. remove ExcludeArch ppc64 ppc64le from the spec file
3. attempt to build

Actual results:
build fails with the following error:

In file included from ../../../../../src/emu/emu.h:31:0:
../../../../../src/mame/drivers/fp200.cpp:28:36:   in constexpr expansion of 'operator""_MHz_XTAL(6.14399999999999999999999999999999e+0l)'
../../../../../src/emu/xtal.h:85:83: error: '(6.14399999999999999999999999999999e+0l * 1.0e+6l)' is not a constant expression
 constexpr XTAL operator ""_MHz_XTAL(long double clock) { return XTAL(double(clock * 1e6)); }
                                                                             ~~~~~~^~~~~
make[2]: *** [casio.make:362: ../../../../linux_gcc/obj/x64/Release/src/mame/drivers/fp200.o] Error 1
make[1]: *** [Makefile:463: casio] Error 2

Expected results:
build completes successfully

Comment 2 Fedora End Of Life 2018-02-20 15:38:08 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 28 development cycle.
Changing version to '28'.

Comment 3 Ben Cotton 2019-05-02 20:05:42 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 4 Ben Cotton 2019-08-13 17:10:59 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to '31'.

Comment 5 Ben Cotton 2019-08-13 19:24:49 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to 31.

Comment 6 Julian Sikorski 2019-08-13 19:27:36 UTC
It does not look like the new double format is going to make it into F31. Changing back to rawhide.

Comment 7 Ben Cotton 2020-02-11 15:49:49 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle.
Changing version to 32.

Comment 8 Fedora Program Management 2021-04-29 15:53:52 UTC
This message is a reminder that Fedora 32 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 32 on 2021-05-25.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '32'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 32 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 9 Ben Cotton 2021-08-10 12:45:24 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 35 development cycle.
Changing version to 35.

Comment 10 Julian Sikorski 2022-01-30 11:11:00 UTC
With long double changes enabled in rawhide, I am getting a different error:
https://kojipkgs.fedoraproject.org//work/tasks/19/82140019/build.log

*** WARNING *** there are active plugins, do not report this as a bug unless you can reproduce it without enabling any plugins.
Event                            | Plugins
PLUGIN_FINISH_UNIT               | annobin: Generate final annotations
PLUGIN_START_UNIT                | annobin: Generate global annotations
PLUGIN_ALL_PASSES_START          | annobin: Generate per-function annotations
PLUGIN_ALL_PASSES_END            | annobin: Register per-function end symbols
In file included from ../../../../../src/emu/video/rgbutil.h:24,
                 from ../../../../../src/mame/drivers/rollext.cpp:123:
../../../../../src/emu/video/rgbvmx.h: In member function 'void rgbaint_t::set(u32)':
../../../../../src/emu/video/rgbvmx.h:49:62: internal compiler error: Segmentation fault
   49 |                 m_value = VECS32(vec_mergeh(VECS16(vec_mergeh(temp, VECS8(zero))), VECS16(zero)));
      |                                                              ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
make[2]: *** [gaelco.make:586: ../../../../linux_gcc/obj/x64/Release/src/mame/drivers/rollext.o] Error 1
make[2]: *** Waiting for unfinished jobs....

Comment 11 Julian Sikorski 2022-01-31 18:05:23 UTC
I can reproduce the issue with annobin disabled too:

In file included from ../../../../../src/emu/video/rgbutil.h:24,
                 from ../../../../../src/emu/rendersw.hxx:14,
                 from ../../../../../src/emu/video.cpp:16:
../../../../../src/emu/video/rgbvmx.h: In member function 'void rgbaint_t::set(u32)':
../../../../../src/emu/video/rgbvmx.h:49:62: internal compiler error: in fold_convert_loc, at fold-const.cc:2450
   49 |                 m_value = VECS32(vec_mergeh(VECS16(vec_mergeh(temp, VECS8(zero))), VECS16(zero)));
      |                                                              ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.

Comment 12 Jakub Jelinek 2022-01-31 22:23:54 UTC
Seems to be PCH related, looks like rs6000_builtin_info[?].fntype contains random garbage.
When PCH is disabled, compiles just fine.
Will try to reproduce tomorrow on a simpler testcase.