[asterisk-bugs] [JIRA] (ASTERISK-27687) FreeBSD: powl has lower than advertised precision.
Corey Farrell (JIRA)
noreply at issues.asterisk.org
Wed Feb 28 00:00:13 CST 2018
[ https://issues.asterisk.org/jira/browse/ASTERISK-27687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=242394#comment-242394 ]
Corey Farrell commented on ASTERISK-27687:
------------------------------------------
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?
> FreeBSD: powl has lower than advertised precision.
> --------------------------------------------------
>
> Key: ASTERISK-27687
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-27687
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: . I did not set the category correctly.
> Affects Versions: 13.19.1
> Environment: FreeBSD 11.1
> base compiler (clang)
> Reporter: Alexander Traud
> Severity: Minor
>
> 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
> 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 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 then falls back to {{pow(.)}}. Because 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.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list