[Interest] WASM build Error: Bad relocation type

Lorn Potter lorn.potter at gmail.com
Sat May 22 05:24:50 CEST 2021


HI,

On 20/5/21 6:27 AM, Jason H wrote:
> I was giving QtC 4.15 a spin today and saw the prompt for WebAssembly. It had been a while since I last tried it and wanted to check it out again. I configured it, adjusted my project, but errored during build at:
> 
> wasm-ld: error: test-ui.js_qml_plugin_import.o: Bad relocation type:
> shared:ERROR: '/Users/jason/Projects/emsdk/upstream/bin/wasm-ld -o /var/folders/sp/2twrspnd5tz9w2m09nldl0yr0000gp/T/emscripten_temp_mzJVeK/test-ui.wasm [snipped command]'
> 
> `file test-ui.js_qml_plugin_import.o` gives:
> test-ui.js_plugin_import.o: WebAssembly (wasm) binary module version 0x1 (MVP)

This tells me there is some binary miss match of some sort.

> 
> I'm not sure what to do no >
> I made sure I activated the right version (per https://wiki.qt.io/Qt_for_WebAssembly) (1.39.8)


I just tested an empty qml swipe app on my mac, and is working for me.

When you activated this, did you include the --embedded argument to emsdk?
If so, this is incompatible with QtCreator.

Also, I have found in recent emsdk, when I switch emscripten versions, I 
have had to install the new version before activate.

Other than that, I an not real sure...


> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> https://lists.qt-project.org/listinfo/interest
> 

-- 
Lorn Potter
Freelance Qt Developer. Platform Maintainer Qt WebAssembly, Maintainer 
QtSensors
Author, Hands-on Mobile and Embedded Development with Qt 5



More information about the Interest mailing list