[Bug 280257] devel/rhtvision
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 280257] devel/rhtvision: does not build with X11"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 280257] devel/rhtvision: does not build with X11"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 280257] devel/rhtvision: does not build with X11"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 280257] devel/rhtvision: does not build with X11"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 13 Jul 2024 10:51:55 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=280257 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 compile (i.e. OPTIONS_FILE_SET+=X11) Cause: The problem is in the file: tvision/classes/x11/x11src.cc Lines # 2542, 2543: int dif1=abs(8*16-target); int dif2=abs(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 int)' is ambiguous 2542 | int dif1=abs(8*16-target); | ~~~^~~~~~~~~~~~~ ../classes/x11/x11src.cc:2543:17: error: call of overloaded 'abs(unsigned int)' is ambiguous 2543 | int dif2=abs(10*20-target); | ~~~^~~~~~~~~~~~~~ The problem here is that as 'target' is defined on the previous line (#2541) as: unsigned target=fW*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). What you have to do alter that line to that of either a 'int' or 'long int': int target=fW*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'). End result, code compiles and appears to work just fine. -- You are receiving this mail because: You are the assignee for the bug.