[Interest] WASM build Error: Bad relocation type

Jason H jhihn at gmx.com
Fri May 28 16:30:14 CEST 2021


> Ah see, you have to read the fine print: https://doc.qt.io/qt-5/wasm.html is the authoritative documentation. I made that clearer on the wiki now; apologies for the confusion.
> 
> fastcomp (the older fork-of-llvm compiler) is long since history, except if you are using an older version of Qt and want to match the emsdk version Qt was developed with. If you are using Qt 5.15 then emsdk 1.39.8 the recommended version.
> 
> I’m not sure what’s going on with the “bad relocation” error, I would try upgrading to emsdk 1.39.8 first.


Despite the rumors to the contrary, I can follow directions. :-)

jason at Jasons-MacBook-Pro emsdk % ./emsdk install 1.39.8
Installing SDK 'sdk-releases-upstream-9e60f34accb4627d7358223862a7e74291886ab6-64bit'..
Skipped installing node-14.15.5-64bit, already installed.
Skipped installing python-3.9.2-1-64bit, already installed.
Skipped installing releases-upstream-9e60f34accb4627d7358223862a7e74291886ab6-64bit, already installed.
All SDK components already installed: 'sdk-releases-upstream-9e60f34accb4627d7358223862a7e74291886ab6-64bit'.
jason at Jasons-MacBook-Pro emsdk % ./emsdk activate --embedded 1.39.8
embedded mode is now the only mode available
Setting the following tools as active:
   node-14.15.5-64bit
   python-3.9.2-1-64bit
   releases-upstream-9e60f34accb4627d7358223862a7e74291886ab6-64bit

Next steps:
- To conveniently access emsdk tools from the command line,
  consider adding the following directories to your PATH:
    /Users/jason/Projects/emsdk
    /Users/jason/Projects/emsdk/node/14.15.5_64bit/bin
    /Users/jason/Projects/emsdk/upstream/emscripten
- This can be done for the current shell by running:
    source "/Users/jason/Projects/emsdk/emsdk_env.sh"
- Configure emsdk in your bash profile by running:
    echo 'source "/Users/jason/Projects/emsdk/emsdk_env.sh"' >> $HOME/.bash_profile


However I blew away the build dir and did a full rebuild now and got:
wasm-ld: error: initial memory too small, 21088512 bytes needed

Command line contains: "--initial-memory=16777216 --no-entry --global-base=1024"

Progress! :-) How do I change the memory setting [in QtCreator]? According to something I read on the internet, 
wasm {
	QMAKE_TOTAL_MEMORY=21233664
}

Should fix it. But the commandline --inital-memory didn't change. Help?





More information about the Interest mailing list