libm symbol

16 views
Skip to first unread message

zhiting zhu

unread,
Nov 3, 2019, 12:31:01 AM11/3/19
to OSv Development
Hey,

I want to use ffmpeg python binding(pyav) in osv. One of the dependencies, libx264 uses __log2f_finite which is from libm. In the compiled lib, it shows that: U __log2_finite@@GLIBC_2.15
I see the symbol is implemented in libc/math/aliases.c.  On the host, the symbol is provided by libm. What should I do to make the symbol resolved on osv?

Best,
Zhiting

zhiting zhu

unread,
Nov 3, 2019, 1:03:47 AM11/3/19
to OSv Development

Maybe I'm looking at the screen too long. I miss the f. The provided on is log2_finite.

Waldek Kozaczuk

unread,
Nov 3, 2019, 12:20:44 PM11/3/19
to OSv Development
We just need to add it __log2f_finite in a similar way we added __log2_finite. Should be trivial change.

diff --git a/libc/math/aliases.c b/libc/math/aliases.c
index 361f3cf7..b137d530 100644
--- a/libc/math/aliases.c
+++ b/libc/math/aliases.c
@@ -20,6 +20,11 @@ double __log2_finite(double x)
        return log2(x);
 }
 
+double __log2f_finite(double x)
+{
+       return log2f(x);
+}
+
 double __log_finite(double x)
 {
        return log(x);


BTW which ffmpeg version are you using?

Waldek

zhiting zhu

unread,
Nov 3, 2019, 12:35:23 PM11/3/19
to OSv Development

I'm using 4.0.4.
Reply all
Reply to author
Forward
0 new messages