[Interest] WASM build Error: Bad relocation type

Morten Sørvig Morten.Sorvig at qt.io
Fri May 28 15:49:48 CEST 2021

> On 24 May 2021, at 15:59, Jason H <jhihn at gmx.com> wrote:
>> I have retried with:
>> `./emsdk activate sdk-fastcomp-1.38.27-64bit`
>> I'll keep looking into this.
> So, It's a bit confusing why fastcomp is mentioned, if it isn't supported?

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.


> Anyway, I can't get past the
> wasm-ld: error: test-ui.js_qml_plugin_import.o: Bad relocation type:
> shared:ERROR: '...'
> message. I know it's not your message (it's wasm-ld's)  but that import.o is generated by Qt.
> I wonder if it has to do with the way I am using QML_ELEMENT imports?
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> https://lists.qt-project.org/listinfo/interest

More information about the Interest mailing list