Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Jul 2016 23:07:15 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 209742] devel/godot: Update to 2.0.4.1; add devel/godot-tools port
Message-ID:  <bug-209742-13-olvAa81cNE@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-209742-13@https.bugs.freebsd.org/bugzilla/>
References:  <bug-209742-13@https.bugs.freebsd.org/bugzilla/>

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

--- Comment #55 from Shane <FreeBSD@ShaneWare.Biz> ---
On 10.3 clang 3.8 from ports you get a warning,
On 11.0 clang 3.8 in base it is an error that stops the build.
So it is changes in the system headers/libs in 11.0 that leaves abs(unsigned
int) as no longer accepted, not clang 3.8 itself, unless 11.0 has different
warning defaults compiled in compared to ports clang, I don't get the info
about the -Wabsolute-value flag in 11.0 so there is a variation somewhere.

In the failing piece of code sampleRate is an unsigned int which is why this
one fails where the other uses of abs and fabs compile, as they use int and
float with some casts to suit. We could also add a cast here
(abs(srate-(int)sampleRate)>100) to get it to compile, which would match wi=
th
other existing code. I chose removing abs as the use of unsigned int should
remove the need.

To me the one odd result you get in your test shouldn't be returning true. =
That
odd result is saying that (44100-44200) is greater than 100 - by itself
(44100-44200) will return -100 then comparing that to 100 it is saying that
-100 is greater than 100, even dropping the sign they should be equal.


The error on 11.0 -

drivers/rtaudio/RtAudio.cpp:9046:8: error: call to 'abs' is ambiguous
  if ( abs( srate - sampleRate ) > 100 ) {
       ^~~
/usr/include/stdlib.h:83:6: note: candidate function
int      abs(int) __pure2;
         ^
/usr/include/c++/v1/stdlib.h:115:44: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long      abs(     long __x) _NOEXCEPT {re=
turn
 labs(__x);}
                                           ^
/usr/include/c++/v1/stdlib.h:117:44: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {re=
turn
llabs(__x);}
                                           ^
/usr/include/c++/v1/math.h:646:1: note: candidate function
abs(float __lcpp_x) _NOEXCEPT {return fabsf(__lcpp_x);}
^
/usr/include/c++/v1/math.h:650:1: note: candidate function
abs(double __lcpp_x) _NOEXCEPT {return fabs(__lcpp_x);}
^
/usr/include/c++/v1/math.h:654:1: note: candidate function
abs(long double __lcpp_x) _NOEXCEPT {return fabsl(__lcpp_x);}
^
1 error generated.
scons: *** [drivers/rtaudio/RtAudio.x11.opt.64.llvm.o] Error 1
scons: building terminated because of errors.
=3D=3D=3D> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=3Dyes and rebuild before reporting the failure =
to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/devel/godot
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/godot

--=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-209742-13-olvAa81cNE>