Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1423200

Summary: 0ad: FTBFS in rawhide
Product: [Fedora] Fedora Reporter: Fedora Release Engineering <releng>
Component: 0adAssignee: Paulo Andrade <paulo.cesar.pereira.de.andrade>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: bioinfornatics, cheese, ignatenko, jwakely, paulo.cesar.pereira.de.andrade, walter.pete, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-07-20 21:41:57 UTC Type: ---
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:    
Bug Blocks: 1423041    
Attachments:
Description Flags
build.log
none
root.log
none
state.log none

Description Fedora Release Engineering 2017-02-17 03:08:42 UTC
Your package 0ad failed to build from source in current rawhide.

https://koji.fedoraproject.org/koji/taskinfo?taskID=17709990

For details on mass rebuild see https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

Comment 1 Fedora Release Engineering 2017-02-17 03:08:51 UTC
Created attachment 1251366 [details]
build.log

Comment 2 Fedora Release Engineering 2017-02-17 03:08:56 UTC
Created attachment 1251367 [details]
root.log

Comment 3 Fedora Release Engineering 2017-02-17 03:09:00 UTC
Created attachment 1251368 [details]
state.log

Comment 4 Jonathan Wakely 2017-02-17 10:57:18 UTC
../../../source/gui/CDropDown.cpp: In member function 'virtual InReaction CDropDown::ManuallyHandleEvent(const SDL_Event_*)':
../../../source/gui/CDropDown.cpp:348:94: error: call of overloaded 'abs(unsigned int)' is ambiguous
       diff = abs(pList->m_Items[i].GetOriginalString().LowerCase()[j] - (int)m_InputBuffer[j]);
                                                                                              ^

This is documented at https://gcc.gnu.org/gcc-7/porting_to.html#cmath

Comment 5 Fedora End Of Life 2017-02-28 11:21:56 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 6 Zbigniew Jędrzejewski-Szmek 2017-07-15 16:55:41 UTC
A right, this only happens on arm, where 'char' is 'unsigned char', while most other architectures have 'char' which is 'signed char'. The code is subtracting (unsigned char) - (int), which is promoted to unsigned int, and abs((unsigned int)) is undefined.

So the fix would be:

-       diff = abs(pList->m_Items[i].GetOriginalString().LowerCase()[j] - (int)m_InputBuffer[j]);
+       diff = abs((int) pList->m_Items[i].GetOriginalString().LowerCase()[j] - (int)m_InputBuffer[j]);

Should be easy enough.

Comment 7 Jonathan Wakely 2017-07-17 10:06:14 UTC
(In reply to Zbigniew Jędrzejewski-Szmek from comment #6)
> A right, this only happens on arm, where 'char' is 'unsigned char', while
> most other architectures have 'char' which is 'signed char'. The code is

Strictly speaking char is signed or unsigned, but is not signed char or unsigned char. It's always a distinct type.

> subtracting (unsigned char) - (int), which is promoted to unsigned int, and
> abs((unsigned int)) is undefined.
> 
> So the fix would be:
> 
> -       diff = abs(pList->m_Items[i].GetOriginalString().LowerCase()[j] -
> (int)m_InputBuffer[j]);
> +       diff = abs((int)
> pList->m_Items[i].GetOriginalString().LowerCase()[j] -
> (int)m_InputBuffer[j]);
> 
> Should be easy enough.

Looks good to me.

Comment 8 Jonathan Wakely 2017-07-17 17:31:49 UTC
I need to rebuild this for Boost 1.64 anyway, so I'll make that change.

Comment 9 Jonathan Wakely 2017-07-20 21:41:57 UTC
Fixed https://koji.fedoraproject.org/koji/buildinfo?buildID=919640