Error when switching to llvm wasm backed.

82 views
Skip to first unread message

Anthony Catel

unread,
Jul 3, 2019, 10:36:27 AM7/3/19
to emscripten-discuss
Hey,

I tried to switch to the upstream in order to try the new backend.
I have not changed any config and i'm getting this link error :

https://pastebin.com/raw/BCWa9vGZ

As I'm not familiar with the internals yet, I'm not sure where to look.

Any insight?

Thanks!

Sam Clegg

unread,
Jul 3, 2019, 1:08:55 PM7/3/19
to emscripte...@googlegroups.com
From your error output:

wasm-ld: error: /tmp/emscripten_temp_pdXmxY/particles_bindings_2.o:
cannot resolve relocation of type R_WASM_MEMORY_ADDR_SLEB against
undefined (non-weak) data symbol: SkReflected::gTypes

This means that these symbols (in this case SkReflected::gTypes) are
undefined at link time but are expected to be defined. Are you
missing some object files from you link line?
> --
> 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/5c0d86f7-87e6-4159-bb01-15de4da3bb07%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Anthony "paraboul" Catel

unread,
Jul 3, 2019, 1:14:34 PM7/3/19
to emscripte...@googlegroups.com
It's building fine from `latest-fastcomp'. I only get this when building with 'lastest-upstream'.

So i'd say, nothing is missing or it's surfaced only when wasm-ld is used?



For more options, visit https://groups.google.com/d/optout.


--
A.

Anthony Catel

unread,
Jul 5, 2019, 3:47:21 AM7/5/19
to emscripten-discuss
Not sure if related but i'm unable to dump symbols from the generated objects :


llvm-nm craches with `LLVM ERROR: malformed uleb128, extends past end` 

On Wednesday, July 3, 2019 at 7:14:34 PM UTC+2, Anthony Catel wrote:
It's building fine from `latest-fastcomp'. I only get this when building with 'lastest-upstream'.

So i'd say, nothing is missing or it's surfaced only when wasm-ld is used?


On Wed, Jul 3, 2019 at 7:08 PM 'Sam Clegg' via emscripten-discuss <emscripten-discuss@googlegroups.com> wrote:
From your error output:

wasm-ld: error: /tmp/emscripten_temp_pdXmxY/particles_bindings_2.o:
cannot resolve relocation of type R_WASM_MEMORY_ADDR_SLEB against
undefined (non-weak) data symbol: SkReflected::gTypes

This means that these symbols (in this case SkReflected::gTypes) are
undefined at link time but are expected to be defined.  Are you
missing some object files from you link line?


On Wed, Jul 3, 2019 at 7:36 AM Anthony Catel <para...@gmail.com> wrote:
>
> Hey,
>
> I tried to switch to the upstream in order to try the new backend.
> I have not changed any config and i'm getting this link error :
>
> https://pastebin.com/raw/BCWa9vGZ
>
> As I'm not familiar with the internals yet, I'm not sure where to look.
>
> Any insight?
>
> Thanks!
>
> --
> 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-discuss+unsub...@googlegroups.com.

> To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/5c0d86f7-87e6-4159-bb01-15de4da3bb07%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
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-discuss+unsub...@googlegroups.com.


--
A.

Anthony Catel

unread,
Jul 5, 2019, 4:34:53 AM7/5/19
to emscripten-discuss
Ok it seems that my toolchain is using `ranlib` from my system as emscripten doesn't provide a `ranlib` binary replacement in its PATH.
There is an empty `emranlib` script (no code inside).  Not sure if that's expected.

I guess i'll have to rely on `upstream/bin/llvm-ranlib`.

Is there any reason that `upstream/bin/` is not exported by `emsdk_env.sh`?

Thanks!

Anthony Catel

unread,
Jul 5, 2019, 5:23:14 AM7/5/19
to emscripten-discuss
Confirmed that using llvm-ranlib fixed my issue.
Now i'm stuck with a :

Fatal: GOT.func entry with no import/export: $emscripten_longjmp_jmpbuf

Looks like you're already aware of this Sam :)

https://github.com/WebAssembly/binaryen/issues/2180

Alon Zakai

unread,
Jul 10, 2019, 2:27:46 PM7/10/19
to emscripte...@googlegroups.com
I don't think emsdk_env.sh adds all the env vars - it just sets up the paths so that emcc etc. are available.

To set up the env vars, emscripten has emmake (and emconfigure, for configure scripts). "emmake make" will set up ranlib when running a makefile, for example (by setting "RANLIB").

> 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/5c0d86f7-87e6-4159-bb01-15de4da3bb07%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
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.


--
A.

--
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/15e8997e-372f-4ba3-86a1-aeb4b432b65b%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages