How to investigate undefined symbol errors?

39 views
Skip to first unread message

שחר לנגבהיים

unread,
Jun 5, 2019, 3:19:22 AM6/5/19
to emscripten-discuss
Hi,
I'm trying to build Skia, integrate it into my c++ code, and then build it into WASM, but when I call emcc I get several undefined symbol errors, which don't happen with equivalent clang compilation. 
What should I do in order to investigate why these symbols weren't compiled or linked? Is there some verbose output I could go into in order to understand the difference between clang and emcc's behavior?

Shlomi Fish

unread,
Jun 5, 2019, 6:42:58 AM6/5/19
to שחר לנגבהיים, emscripte...@googlegroups.com
Hi Shachar!

Please see the guidelines at https://github.com/shlomif/how-to-share-code-online
and http://sscce.org/ .

--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
What does “Zionism” mean? - http://shlom.in/def-zionism

Chuck Norris has an Erdős number of -1.
http://www.shlomifish.org/humour/bits/facts/Chuck-Norris/

Please reply to list if it's a mailing list post - http://shlom.in/reply .

Shlomi Fish

unread,
Jun 5, 2019, 8:41:54 AM6/5/19
to Shachar Langbeheim, emscripten-discuss
Hi,

CCing the list - see:

https://www.shlomifish.org/philosophy/computers/netiquette/email/reply-to-list.html

On Wed, 5 Jun 2019 14:25:50 +0300
Shachar Langbeheim <nih...@gmail.com> wrote:

> Hi Shlomi,
> Making an SSCC example will be impossible, since I'm having an issue
> specifically with usage of the Skia library, which is neither small nor
> self contained :). That's why I asked for ways to for me to analyze the
> issue, rather than for you to solve this.
> I'd be happy to write an SSCC example that includes a git submodule of
> Skia, if someone is willing to delve into the issue, but ATM all I'm asking
> for is just an explanation of the modus operandi needed to analyze such
> issues.
>

such a git repo will help a lot, and I can try looking into it.
Optimising Code for Speed - http://shlom.in/optimise

Larry Wall applies a patch manually quicker than GNU patch.
http://www.shlomifish.org/humour/bits/facts/Larry-Wall/

Shachar Langbeheim

unread,
Jun 5, 2019, 10:45:31 AM6/5/19
to Shlomi Fish, emscripten-discuss
Sorry, and thanks for your corrections.

I uploaded the minimal example to here - https://github.com/Shachlan/skia-wasm-example 
The Readme.md file at the base directory contains the instructions on how to reproduce this. I packed all of the different stages into 3 scripts, in order to ease your process.

Thanks in advance for the help!

Alon Zakai

unread,
Jun 5, 2019, 12:02:48 PM6/5/19
to emscripte...@googlegroups.com
Running with EMCC_DEBUG=1 in the env will print out the linking command etc. Then you can use llvm-nm to look for symbols in those files, which can help debug things like this.

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/f8b3b901-3adf-4f9a-932a-f90f95225f94%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Shlomi Fish

unread,
Jun 6, 2019, 9:13:40 AM6/6/19
to Shachar Langbeheim, emscripte...@googlegroups.com
On Wed, 5 Jun 2019 17:45:18 +0300
Shachar Langbeheim <nih...@gmail.com> wrote:

> Sorry, and thanks for your corrections.
>
> I uploaded the minimal example to here -
> https://github.com/Shachlan/skia-wasm-example
> The Readme.md file at the base directory contains the instructions on how
> to reproduce this. I packed all of the different stages into 3 scripts, in
> order to ease your process.
>
> Thanks in advance for the help!
>

Hi,

see https://github.com/Shachlan/skia-wasm-example/issues/1 .
List of Text Editors and IDEs - http://shlom.in/IDEs

Forth - There are several ways to write it, but no way to read it.
http://www.shlomifish.org/humour/ways_to_do_it.html

Shachar Langbeheim

unread,
Jun 6, 2019, 11:36:42 AM6/6/19
to emscripten-discuss
Have you pulled the latest commit? It contains the Skia submodule.
Reply all
Reply to author
Forward
0 new messages