[Home]

Summary:ASTERISK-27687: FreeBSD: powl has lower than advertised precision.
Reporter:Alexander Traud (traud)Labels:
Date Opened:2018-02-17 04:06:35.000-0600Date Closed:
Priority:MinorRegression?
Status:Open/NewComponents:Core/Platform
Versions:13.19.1 Frequency of
Occurrence
Related
Issues:
Environment:FreeBSD 11.1 base compiler (clang)Attachments:
Description:After patching all of my found issues (see ASTERISK-27686), this is the only, the last warning message which remains on FreeBSD when I go [for|http://lists.digium.com/pipermail/asterisk-dev/2018-January/076765.html]:{code}fetch --no-verify-peer http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-13-current.tar.gz
tar -zxf asterisk-*
cd asterisk-*
sudo ./contrib/scripts/install_prereq install
./configure --with-pjproject-bundled
make
sudo make install samples config
asterisk -c{code}Unfortunately, the message does not say what to do instead. Therefore, I do not know how to proceed except to report it:{code}
ast_expr2.o: In function `op_func':
main/ast_expr2.y:882: warning: powl has lower than advertised precision{code}The cause are [Expr2|https://wiki.asterisk.org/wiki/display/AST/Expr2+Built-in+Functions] which bridge standard C functions, like {{powl(.)}}. Because of that, a [macro|http://sources.freebsd.org/HEAD/src/lib/msun/src/imprecise.c] in FreeBSD is triggered. Even found a more [detailed explanation|https://android.googlesource.com/platform/bionic/+/f723b70%5E%21/] in the Android Open Source Project: {quote}On LP64, sizeof(long double) > sizeof(double), so functions which fall back to their double variants lose precision. Emit a warning whenever something links against such functions. On LP32, sizeof(long double) == sizeof(double), so we don't need to warn.{quote}There, that code falls back to {{pow(.)}}. Because in Asterisk, FreeBSD has only community contributed support, perhaps someone interested in FreeBSD can start with this analysis and find a fix, like a pragma for the compiler or another workaround.
Comments:By: Asterisk Team (asteriskteam) 2018-02-17 04:06:36.741-0600

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Corey Farrell (coreyfarrell) 2018-02-27 23:59:21.354-0600

Related ticket: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191754

Can you try to define {{_DECLARE_C99_LDBL_MATH}}, see if that has any effect?

By: Alexander Traud (traud) 2018-02-28 02:15:28.629-0600

Not sure how that ticket is related. In that ticket, powl was not found by the preprocessor at all. According to that ticket, after defining {{_DECLARE_C99_LDBL_MATH}} powl was found but the same warning message is created.