How to set up Assimp for Qt6 MinGW 64-bit
-
@8Observer8 said in How to set up Assimp for Qt6 MinGW 64-bit:
Now I have the next error :-1: error: [Makefile:69: .\load-with-assimp-wasm-opengles2-qt6-cpp.js] Error 1
Please post the actual error
-
@8Observer8 There should be more in the "Compile Output" tab.
-
Compiler output:
wasm-ld: error: E:/libs/assimp-5.2.5/build/lib\libassimp.a(AssbinLoader.cpp.o): undefined symbol: uncompress wasm-ld: error: E:/libs/assimp-5.2.5/build/lib\libassimp.a(Compression.cpp.o): undefined symbol: inflateInit_ wasm-ld: error: E:/libs/assimp-5.2.5/build/lib\libassimp.a(Compression.cpp.o): undefined symbol: inflateInit2_ wasm-ld: error: E:/libs/assimp-5.2.5/build/lib\libassimp.a(Compression.cpp.o): undefined symbol: inflate wasm-ld: error: E:/libs/assimp-5.2.5/build/lib\libassimp.a(Compression.cpp.o): undefined symbol: inflate wasm-ld: error: E:/libs/assimp-5.2.5/build/lib\libassimp.a(Compression.cpp.o): undefined symbol: inflate wasm-ld: error: E:/libs/assimp-5.2.5/build/lib\libassimp.a(Compression.cpp.o): undefined symbol: inflateReset wasm-ld: error: E:/libs/assimp-5.2.5/build/lib\libassimp.a(Compression.cpp.o): undefined symbol: inflateSetDictionary wasm-ld: error: E:/libs/assimp-5.2.5/build/lib\libassimp.a(Compression.cpp.o): undefined symbol: inflateEnd wasm-ld: error: E:/libs/assimp-5.2.5/build/lib\libassimp.a(Compression.cpp.o): undefined symbol: inflateEnd wasm-ld: error: E:/libs/assimp-5.2.5/build/lib\libassimp.a(Compression.cpp.o): undefined symbol: inflateInit2_ wasm-ld: error: E:/libs/assimp-5.2.5/build/lib\libassimp.a(unzip.c.o): undefined symbol: get_crc_table wasm-ld: error: E:/libs/assimp-5.2.5/build/lib\libassimp.a(unzip.c.o): undefined symbol: crc32 wasm-ld: error: E:/libs/assimp-5.2.5/build/lib\libassimp.a(Compression.cpp.o): undefined symbol: inflate wasm-ld: error: E:/libs/assimp-5.2.5/build/lib\libassimp.a(unzip.c.o): undefined symbol: crc32 em++: error: 'C:/emsdk/upstream/bin\wasm-ld.exe -o .\load-with-assimp-wasm-opengl2-qt6-cpp.wasm C:/Qt/6.7.0/wasm_singlethread/lib/libQt6BundledFreetype.a C:/Qt/6.7.0/wasm_singlethread/lib/libQt6BundledLibpng.a main.obj load-with-assimp-wasm-opengl2-qt6-cpp.js_plugin_import.obj -LE:/libs/assimp-5.2.5/build/lib E:/libs/assimp-5.2.5/build/lib\libassimp.a C:/Qt/6.7.0/wasm_singlethread/lib/objects-Release/QWasmIntegrationPlugin_resources_1/.rcc/qrc_wasmfonts_init.cpp.o C:/Qt/6.7.0/wasm_singlethread/lib/objects-Release/QWasmIntegrationPlugin_resources_2/.rcc/qrc_wasmwindow_init.cpp.o C:/Qt/6.7.0/wasm_singlethread/lib/objects-Release/Gui_resources_1/.rcc/qrc_qpdf_init.cpp.o C:/Qt/6.7.0/wasm_singlethread/lib/objects-Release/Gui_resources_2/.rcc/qrc_gui_shaders_init.cpp.o C:/Qt/6.7.0/wasm_singlethread/plugins/platforms/libqwasm.a C:/Qt/6.7.0/wasm_singlethread/plugins/iconengines/libqsvgicon.a C:/Qt/6.7.0/wasm_singlethread/plugins/imageformats/libqgif.a C:/Qt/6.7.0/wasm_singlethread/plugins/imageformats/libqico.a C:/Qt/6.7.0/wasm_singlethread/plugins/imageformats/libqjpeg.a C:/Qt/6.7.0/wasm_singlethread/lib/libQt6BundledLibjpeg.a C:/Qt/6.7.0/wasm_singlethread/plugins/imageformats/libqsvg.a C:/Qt/6.7.0/wasm_singlethread/lib/libQt6Svg.a C:/Qt/6.7.0/wasm_singlethread/lib/objects-Release/Widgets_resources_1/.rcc/qrc_qstyle_init.cpp.o C:/Qt/6.7.0/wasm_singlethread/lib/objects-Release/Widgets_resources_2/.rcc/qrc_qstyle1_init.cpp.o C:/Qt/6.7.0/wasm_singlethread/lib/objects-Release/Widgets_resources_3/.rcc/qrc_qstyle_fusion_init.cpp.o C:/Qt/6.7.0/wasm_singlethread/lib/objects-Release/Widgets_resources_4/.rcc/qrc_qmessagebox_init.cpp.o C:/Qt/6.7.0/wasm_singlethread/lib/libQt6OpenGLWidgets.a C:/Qt/6.7.0/wasm_singlethread/lib/libQt6OpenGL.a C:/Qt/6.7.0/wasm_singlethread/lib/libQt6Widgets.a C:/Qt/6.7.0/wasm_singlethread/lib/libQt6Gui.a C:/Qt/6.7.0/wasm_singlethread/lib/libQt6BundledHarfbuzz.a C:/Qt/6.7.0/wasm_singlethread/lib/libQt6BundledFreetype.a C:/Qt/6.7.0/wasm_singlethread/lib/libQt6BundledLibpng.a C:/Qt/6.7.0/wasm_singlethread/lib/libQt6Core.a C:/Qt/6.7.0/wasm_singlethread/lib/libQt6BundledZLIB.a C:/Qt/6.7.0/wasm_singlethread/lib/libQt6BundledPcre2.a -LC:\emsdk\upstream\emscripten\cache\sysroot\lib\wasm32-emscripten --whole-archive -lfetch -lembind-rtti --no-whole-archive -lGL-webgl2 -lal -lhtml5 -lstubs-debug -lnoexit -lc-debug -ldlmalloc -lcompiler_rt -lc++-noexcept -lc++abi-debug-noexcept -lsockets -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr C:\Users\8OBSER~1\AppData\Local\Temp\tmp1971j9eilibemscripten_js_symbols.so --export-if-defined=main --export-if-defined=__start_em_asm --export-if-defined=__stop_em_asm --export-if-defined=__start_em_lib_deps --export-if-defined=__stop_em_lib_deps --export-if-defined=__start_em_js --export-if-defined=__stop_em_js --export-if-defined=__main_argc_argv --export-if-defined=fflush --export=emscripten_stack_get_end --export=emscripten_stack_get_free --export=emscripten_stack_get_base --export=emscripten_stack_get_current --export=emscripten_stack_init --export=__cxa_demangle --export=stackSave --export=stackRestore --export=stackAlloc --export=__errno_location --export=malloc --export=free --export=__wasm_call_ctors --export-table -z stack-size=5242880 --initial-memory=52428800 --no-entry --max-memory=2147483648 --stack-first' failed (returned 1) mingw32-make: *** [Makefile:69: .\load-with-assimp-wasm-opengl2-qt6-cpp.js] Error 1 15:05:07: The process "C:\Qt\Tools\mingw1120_64\bin\mingw32-make.exe" exited with code 2. Error while building/deploying project load-with-assimp-wasm-opengl2-qt6-cpp (kit: WebAssembly Qt 6.7.0 (single-threaded)) When executing step "Make"
-
I created the same topics on Assimp discussions: https://github.com/assimp/assimp/discussions/5515 and Stack Overflow: https://stackoverflow.com/questions/78230555/how-to-set-up-assimp-for-qt6-mingw-64-bit-to-run-on-webassembly
-
@8Observer8 Would be good to get the very first error, but it looks like a library is not found or is incompatible
-
Botje wrote the next comment on StackOverflow:
Those are functions from zlib.
-
@8Observer8 libassimp depends on zlib, so if there is no zlip it will not work
-
@jsulm I built zlib with these commands:
cd zlib-1.3.1 && mkdir build && cd build
emcmake cmake ..
emmake makelibz.a
(245 KB) was generated.I set up it like this:
LIBS += -L"E:\libs\zlib-1.3.1\lib" LIBS += -lz
Now it compiles. But I think Assimp must include
zlib
. A size oflibassimp.a
is 89.3 MB.I have this error now:
I had a problem with loading models from Qt Resources with Assimp: Loading a 3D model from Qt Resources. Assimp Error: No suitable reader found for the file format of file I decided do not use Qt Resources to solve that problem. But now I don't know how to solve it for WASM.
-
Botje wrote the next comment on Stack Overflow:
libassimp.a does not contain zlib. If you inspect the makefile generated by cmake you will see it just collects all the object files and does not add libz in any way. That is reserved for the final step where your application links to libassimp.a, because other dependencies might also need zlib and if each brings its own copy you get conflicts.
-