Skip to content

Undefined scalbnf after switching to new emsdk 3.1.42 #19781

@Honya2000

Description

@Honya2000

Hello,
Today I switched to new emsdk 3.1.42 and unfortunatelly my project failed to compile now.
It throws error during linking:
wasm-ld: error: C:\Projects\emsdk\upstream\emscripten\cache\sysroot\lib\wasm32-emscripten\lto\libc.a(scalbnf.o): undefined symbol: scalbnf

The problem is i don't use any scalbnf in my project explicitly. But I'm using SDL2. And seems like SDL2 is using this function:

float
SDL_scalbnf(float x, int n)
{
#if defined(HAVE_SCALBNF)
return scalbnf(x, n);
#else
return (float)SDL_scalbn((double)x, n);
#endif
}

I cannot fix it in SDL2, because it is part of emsdk.

So what should i do now?

P.S. Previously i used emsdk 3.1.40 and everything was fine.

P.P.S in 3.1.41 and 3.1.42 release notes - no information about those changes. It just mentiones new LLVM version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions