Please read the Ticket HowTo before creating or commenting on a ticket. Failure to do so may cause your ticket to be rejected or result in a slower response.
Opened 11 months ago
Closed 11 months ago
Last modified 11 months ago
#10915 closed Patch - Feature (fixed)
Compile of abs(long long) fails on ARM processor
| Reported by: | parrisimo@… | Owned by: | beirdo |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.26 |
| Component: | MythTV - Mythtranscode | Version: | Master Head |
| Severity: | medium | Keywords: | |
| Cc: | Ticket locked: | no |
Description
Error:
transcode.cpp:541: error: call of overloaded 'abs(long long int)' is ambiguous
Fix:
Changing abs to llabs allows the compile to be successful.
Info:
Another user reported a similar problem on Ticket 1885, but fixed problem by adding special function MyAbs?. I don't know which solution is preferred by the developers.
Attachments (2)
Change History (8)
Changed 11 months ago by m Parris <parrisimo@…>
comment:1 Changed 11 months ago by Gary Buhrmaster <gary.buhrmaster@…>
This issue was discussed in http://www.gossamer-threads.com/lists/mythtv/dev/522106
I agree with Lawrence Rust regarding compiler/platform idiosyncratic behaviors, and would instead suggest that using the Qt function here is likely to be the most portable solution. Attached is an alternative patch using qAbs (all uses of abs changed).
Changed 11 months ago by Gary Buhrmaster <gary.buhrmaster@…>
comment:2 Changed 11 months ago by beirdo
At this time, we do not specifically support ARM processors. What platform are you compiling for, and with what compiler tools versions, etc?
With no way to verify this, it's probably not going to be immediately viewed as terribly high priority as we have too many other platforms to support as it is. However, it would be nice to get it working.
comment:3 Changed 11 months ago by beirdo
- Milestone changed from 0.26 to unknown
- Type changed from Patch - Bug Fix to Patch - Feature
Kinda a feature request... Anyways, please do not set the milestone.
comment:4 Changed 11 months ago by danielk
- Owner set to beirdo
- Status changed from new to assigned
Gavin, I think qAbs() makes sense for long long, due to current state of flux with long long in C99 vs C++03 vs C++11. i.e. it is required in C99 and C++11, but not in C++03 which is our current minimum C++.
comment:5 Changed 11 months ago by Gavin Hurlbut <ghurlbut@…>
- Resolution set to fixed
- Status changed from assigned to closed
comment:6 Changed 11 months ago by beirdo
- Milestone changed from unknown to 0.26

patch changing abs to llabs