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

[BUG] Linux build is exporting symbols from statically linked dependencies #927

Closed
kekekeks opened this issue Aug 8, 2019 · 1 comment
Closed

Comments

@kekekeks
Copy link
Contributor

kekekeks commented Aug 8, 2019

On Linux library imports don't have a library name attached to them, so when dynamic loader sees multiple exported functions with the same name it just picks the one which was loaded first.

This causes issues when application tries to use a dynamic version of a library that was statically linked into libSkiaSharp.so.

We need to build the library with a version script which will hide everything but Skia C API exports, e. g.

{
        global:
                sk_*; 
                gr_*;
        local:
                *;
};

linker script can be set via ldflags, e. g.

LDFLAGS += -Wl,--version-script=libSkiaSharp.map
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants