Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Jul 2024 10:51:55 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 280257] devel/rhtvision
Message-ID:  <bug-280257-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D280257

            Bug ID: 280257
           Summary: devel/rhtvision
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: bmeyer@mesoft.com.au

Problem: The rhtvision library when compiled with x11 support fails to comp=
ile
(i.e. OPTIONS_FILE_SET+=3DX11)

Cause:

The problem is in the file:

tvision/classes/x11/x11src.cc

Lines # 2542, 2543:
    int dif1=3Dabs(8*16-target);
    int dif2=3Dabs(10*20-target);

These lines cause gcc (13) to fail with the error of:

../classes/x11/x11src.cc:2542:17: error: call of overloaded 'abs(unsigned i=
nt)'
is ambiguous
 2542 |     int dif1=3Dabs(8*16-target);
      |              ~~~^~~~~~~~~~~~~


../classes/x11/x11src.cc:2543:17: error: call of overloaded 'abs(unsigned i=
nt)'
is ambiguous
 2543 |     int dif2=3Dabs(10*20-target);
      |              ~~~^~~~~~~~~~~~~~

The problem here is that as 'target' is defined on the previous line (#2541)
as:
        unsigned target=3DfW*fH;

This means that GCC will then recast the expression to that of an "unsigned
int", and this is a problem as the abs function does not have an overload
definition for that type (unsigned int).=20=20

What you have to do alter that line to that of either a 'int' or 'long int':
        int target=3DfW*fH;

This then allows GCC to recast the data type to a type that the abs function
*DOES* have an overload definition for (there are overload definitions for =
both
'int' and a 'long int').=20=20

End result, code compiles and appears to work just fine.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-280257-7788>