Page 1 of 1

Emscripten version update

Posted: 09 Nov 2023, 17:37
by FrancoisRecisio
Hello !

We have started integrating NoesisGUI into our custom c++ engine, it's working well on Windows and Android so far. We also need to compile for WebAssembly, but we have a link error:

wasm-ld: error: function signature mismatch: time
>>> defined as (i32) -> i32 in [...]/noesisgui-3.2.2/Bin/wasm/Noesis.bc(License.o)
>>> defined as (i32) -> i64 in [...]\emsdk\upstream\emscripten\cache\sysroot\lib\wasm32-emscripten\libc-mt-debug.a(emscripten_time.o)

NoesisGUI is apparently compiled with the Emscripten version 3.1.8 [03/24/2022] (https://www.noesisengine.com/docs/Gui.C ... ative.html "Building WebGL").

And we use the latest version (3.1.48) [11/05/2023].

We have done some research and it seems that time_t has been changed to int64 in version 3.1.16 [07/14/2022] :
https://github.com/emscripten-core/emsc ... --07142022
"The type of time_t was restored 64-bit after being converted to 32-bit in 3.1.11. (#17401)"

We found the related commits in the history of the file alltypes.h:

https://github.com/emscripten-core/emsc ... alltypes.h

https://github.com/emscripten-core/emsc ... b9379ee86b
https://github.com/emscripten-core/emsc ... ee4c80fe30

It seems that time_t, as compiled in Noesis.bc, is "long" (potentially int32), which is no longer the case after version 3.1.16 ("_Int64").

So, our question is: is it possible to update and recompile the Noesis lib for WebAssembly with the latest version of Emscripten? Thanks in advance!

Re: Emscripten version update

Posted: 10 Nov 2023, 11:06
by jsantos
So, our question is: is it possible to update and recompile the Noesis lib for WebAssembly with the latest version of Emscripten? Thanks in advance!
Effectively we are using Emscripten version 3.1.8 and there is no way to change that without access to source code. It was my understanding that minor versions were always backward compatible but it seems that's not true.

Is there any specific feature you need from Emscripten that's is not available in 3.1.8?

We can consider upgrading, although so far we only did that with major versions of Noesis.

Re: Emscripten version update

Posted: 10 Nov 2023, 12:06
by FrancoisRecisio
We didn't try to compile our project with Emscripten version 3.1.8, as our development for this target started at the beginning of 2023, and this version of Emscripten was released at the beginning of 2022.
Is there any specific feature you need from Emscripten that's is not available in 3.1.8?
However, we need at least version 3.1.32, as we're using the AudioWorklets feature.
I haven't checked in detail if we use other features added after this version yet.

Indeed, the minor versions of Emscripten don't necessarily seem to be compatible with each other, which is annoying.