Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 639492 - dev-libs/tvision-2.2.1.4 : ../.../tdesktop.cc:151:29: error: call of overloaded abs(unsigned int) is ambiguous
Summary: dev-libs/tvision-2.2.1.4 : ../.../tdesktop.cc:151:29: error: call of overload...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Bernd
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2017-12-02 10:48 UTC by Toralf Förster
Modified: 2019-07-05 14:28 UTC (History)
2 users (show)

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


Attachments
emerge-info.txt (emerge-info.txt,15.38 KB, text/plain)
2017-12-02 10:48 UTC, Toralf Förster
Details
dev-libs:tvision-2.2.1.4:20171202-104255.log (dev-libs:tvision-2.2.1.4:20171202-104255.log,37.23 KB, text/plain)
2017-12-02 10:48 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,154.01 KB, text/plain)
2017-12-02 10:48 UTC, Toralf Förster
Details
environment (environment,16.90 KB, text/plain)
2017-12-02 10:48 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,16.48 KB, application/x-bzip)
2017-12-02 10:49 UTC, Toralf Förster
Details
logs.tbz2 (logs.tbz2,67.85 KB, application/x-bzip)
2017-12-02 10:49 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,10.73 KB, application/x-bzip)
2017-12-02 10:49 UTC, Toralf Förster
Details
fix abs error in >=gcc-6 (tvision-2.2.1.4-abs.patch,2.37 KB, patch)
2018-09-19 21:28 UTC, Bernd
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2017-12-02 10:48:46 UTC
g++  -I../include -I/usr/X11R6/include       -fPIC -O2 -pipe -march=native  -c ../classes/tdesktop.cc -o obj/tdesktop.lo
../classes/tdesktop.cc: In function ‘unsigned int iSqr(unsigned int)’:
../classes/tdesktop.cc:151:29: error: call of overloaded ‘abs(unsigned int)’ is ambiguous
     while( abs( res1 - res2 ) > 1 )
                             ^
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/include/g++-v7/cstdlib:75:0,

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.0-systemd_20171129-195001

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-7.2.0 *

Available Python interpreters, in order of preference:
  [1]   python3.4
  [2]   python3.6 (fallback)
  [3]   python3.5 (fallback)
  [4]   python2.7 (fallback)
Available Ruby profiles:
  [1]   ruby22 (with Rubygems) *
java-config:
The following VMs are available for generation-2:
*)	IcedTea JDK 3.6.0 [icedtea-bin-8]
Available Java Virtual Machines:
  [1]   icedtea-bin-8  system-vm

emerge -qpv dev-libs/tvision
[ebuild  N    ] dev-libs/tvision-2.2.1.4  USE="X -debug -gpm"
Comment 1 Toralf Förster gentoo-dev 2017-12-02 10:48:48 UTC
Created attachment 507662 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2017-12-02 10:48:51 UTC
Created attachment 507664 [details]
dev-libs:tvision-2.2.1.4:20171202-104255.log
Comment 3 Toralf Förster gentoo-dev 2017-12-02 10:48:54 UTC
Created attachment 507666 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2017-12-02 10:48:57 UTC
Created attachment 507668 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2017-12-02 10:49:00 UTC
Created attachment 507670 [details]
etc.portage.tbz2
Comment 6 Toralf Förster gentoo-dev 2017-12-02 10:49:03 UTC
Created attachment 507672 [details]
logs.tbz2
Comment 7 Toralf Förster gentoo-dev 2017-12-02 10:49:06 UTC
Created attachment 507674 [details]
temp.tbz2
Comment 8 Bernd 2017-12-04 19:35:32 UTC
I look into this when I got the transition to 17.0 ready. It looks like an easy to fix bug, I encountered with 6.4.0 too but in different files.
Comment 9 Bernd 2018-09-19 21:28:46 UTC
Created attachment 547350 [details, diff]
fix abs error in >=gcc-6

This patch solves the compile issue with >gcc-6. It replaces the use of unsigned with int at places where abs is used.
But I don't know the exact impact on the library or existing applications, because I don't have a real world example application to test with. The patch also replaces the ${FILESDIR}/${P}-gcc6.patch file. The use of std::abs is no longer necessary.

I filed a bug upstream, see https://sourceforge.net/p/tvision/bugs/17/ but got no response yet.
Comment 10 Bernd 2018-10-18 18:25:34 UTC
Still no response from upstream, after 30 days.
Comment 11 Larry the Git Cow gentoo-dev 2019-07-05 14:28:59 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f524f5217331b84965e484eded8b5271b907fb6b

commit f524f5217331b84965e484eded8b5271b907fb6b
Author:     Bernd Waibel <waebbl@gmail.com>
AuthorDate: 2019-06-12 12:04:40 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2019-07-05 14:23:57 +0000

    dev-libs/tvision: fix gcc-7 incompatibilities
    
    With gcc-7, they way overloaded functions are handled has changed,
    which led to build failures. This has been addressed by upstream,
    see https://sourceforge.net/p/tvision/bugs/17/
    
    Closes: https://bugs.gentoo.org/639492
    Package-Manager: Portage-2.3.67, Repoman-2.3.14
    Signed-off-by: Bernd Waibel <waebbl@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/12245
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 .../files/tvision-2.2.1.4-fix-overloaded-abs.patch | 100 +++++++++++++++++++++
 dev-libs/tvision/tvision-2.2.1.4.ebuild            |  17 ++--
 2 files changed, 108 insertions(+), 9 deletions(-)