[Android] Undefined reference to 'log2'

257 views
Skip to first unread message

Matthew Leibowitz

unread,
Aug 11, 2017, 11:48:05 AM8/11/17
to skia-discuss
I am building a static version of skia for Android.

It appears that in this commit (https://github.com/google/skia/commit/6d342285a4546b54cb17570aae7eeb8a123c81ae#diff-1b37363474d7e879bcb2a2b7b2bdda5eR42), a reference to the log2 function was used. This is fine for when building against the 18+ API, but for previous versions, I get a linker error:

GrAtlasGlyphCache::GrAtlasGlyphCache(GrContext*, float): error: undefined reference to 'log2'

As this library needs to be able to run on at least Android 4.0.3 (API 15), should I be doing something, or are older version of Android not supported anymore? Or, can I build for 18, but still run on older Android versions?

Brian Osman

unread,
Aug 11, 2017, 12:08:15 PM8/11/17
to skia-d...@googlegroups.com
That looks like an oversight. We have a version of log2 that does work on Android (using log and multiply). I'll fix that code.

--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss+unsubscribe@googlegroups.com.
To post to this group, send email to skia-d...@googlegroups.com.
Visit this group at https://groups.google.com/group/skia-discuss.
For more options, visit https://groups.google.com/d/optout.

Brian Osman

unread,
Aug 11, 2017, 2:27:13 PM8/11/17
to skia-d...@googlegroups.com

Matthew Leibowitz

unread,
Aug 15, 2017, 8:12:13 AM8/15/17
to skia-discuss
Thanks for the fix.
I have been working with it (not sure I am actually running this code at all), but it seems to be working.

On Friday, August 11, 2017 at 8:27:13 PM UTC+2, Brian Osman wrote:
On Fri, Aug 11, 2017 at 12:08 PM, Brian Osman <brian...@google.com> wrote:
That looks like an oversight. We have a version of log2 that does work on Android (using log and multiply). I'll fix that code.
On Fri, Aug 11, 2017 at 11:48 AM, Matthew Leibowitz <mattl...@live.com> wrote:
I am building a static version of skia for Android.

It appears that in this commit (https://github.com/google/skia/commit/6d342285a4546b54cb17570aae7eeb8a123c81ae#diff-1b37363474d7e879bcb2a2b7b2bdda5eR42), a reference to the log2 function was used. This is fine for when building against the 18+ API, but for previous versions, I get a linker error:

GrAtlasGlyphCache::GrAtlasGlyphCache(GrContext*, float): error: undefined reference to 'log2'

As this library needs to be able to run on at least Android 4.0.3 (API 15), should I be doing something, or are older version of Android not supported anymore? Or, can I build for 18, but still run on older Android versions?

--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages