Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined reference __powf_finite with clang 9.0.1, Linux 5.5.4-arch1-1 and glibc 2.31-1 #2146

Closed
roxlu opened this issue Feb 19, 2020 · 2 comments

Comments

@roxlu
Copy link
Contributor

roxlu commented Feb 19, 2020

Clang fails to compile Filament with a recently updated linux system. When using the -ffast-math flag you'll run into errors like: undefined reference to __powf_finite. You can still build Filament by adding -fno-builtin to you CXXFLAGS.

@roxlu roxlu closed this as completed Feb 19, 2020
@stasgora
Copy link

Running into the same problem here, have you been able to figure out the cause and a proper solution other than adding -fno-builtin manually?

@stasgora
Copy link

After a little digging that's what I figured out:
The issue is introduced with the 2.31 version of the GNU C Library.
The following symbols from LLVM libc++ math.h become undefined:

U __asinf_finite
U __atan2f_finite
U __exp2f_finite
U __exp2_finite
U __expf_finite
U __log2f_finite
U __powf_finite

Looking at the changelog the cause seems to be:

* The <math.h> functions that round their results to a narrower type
  now have corresponding type-generic macros in <tgmath.h>, as defined
  in TS 18661-1:2014 and TS 18661-3:2015 as amended by the resolution
  of Clarification Request 13 to TS 18661-3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants