Open sheonny opened 1 year ago
Somebody (most likely your CMAKE_TOOLCHAIN_FILE
) is incorrectly adding the internal emscripten include directory to the include path?
What is CMAKE_TOOLCHAIN_FILE
and where is it coming from? is the to official emscripten cmake toolchain file?
What is the full failing command line? (The emcc/em++ command that caused that error?)
The headers in question should be includable just fine, but from emscripten/cache/sysroot/include
(where they live in the sysroot) not from emscripten/system/include
(where they live in the source tree)
cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=/emsdk/upstream/emscripten/cmake/Modules /Platform/Emscripten.cmake -DVTK_DIR=/work/vtk-v9.1.0-wasm-build /work/examples/ReadOBJ/
emscripten cmake toolchain file is /emsdk/upstream/emscripten/cmake/Modules
/Platform/Emscripten.cmake
If the header is not imported, this error will not occur, but I need it
You can and should include the header but you need to fix your include path. Can you share the full failing command line ? (that should be part of the output of the failing ninja command, If you are not sure you can just share the full output of the build that fails)
command line:
cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DVTK_DIR=/work/vtk-v9.1.0-wasm-build /work/examples/ReadOBJ/
output:
cmake --build .
output:
options:
list(APPEND emscripten_options "--bind" "-g3" "SHELL:-s EXPORT_NAME=vtkApp" "SHELL:-s ALLOW_MEMORY_GROWTH=1" "SHELL:-s ASSERTIONS=1" "SHELL:-s DEMANGLE_SUPPORT=1" "SHELL:-s EMULATE_FUNCTION_POINTER_CASTS=0" "SHELL:-s ERROR_ON_UNDEFINED_SYMBOLS=0" "SHELL:-s MODULARIZE=1" "SHELL:-s USE_PTHREADS=0" "SHELL:-s WASM=1" "SHELL:-s EXPORTED_FUNCTIONS=\"['_main', '_stop']\"" "SHELL:-s EXTRA_EXPORTED_RUNTIME_METHODS=\"['ccall', 'cwrap']\"" "SHELL:-s ENVIRONMENT=web" "SHELL:--preload-file ./ferrari-f1-race-car.obj" )
remarks:
Successfully build in version 1.39.10 of emscripten!!!
Can you copy and paste the full terminal output, rather than attaching an image? ( Its much less usefull as an imagine because it can't be copied/pasted/searched. Also the image cuts of the actual command line so I can't actually see where the bad include is being added).
There emcc
command which is cut off in your image will likely contain -I/emsdk/upstream/emscripten/system/include
. To fix this build error you will need to find out where that is being added and prevent it or remove it.
[root:/work/examples/ReadOBJ/build] 5s # cmake --build .
[1/2] Building CXX object CMakeFiles/ReadOBJ.dir/ReadOBJ.cxx.o
FAILED: CMakeFiles/ReadOBJ.dir/ReadOBJ.cxx.o
/emsdk/upstream/emscripten/em++ -DGLEW_STATIC -Dkiss_fft_scalar=double -DvtkRenderingCore_AUTOINIT_INCLUDE=\"/work/examples/ReadOBJ/build/CMakeFiles/vtkModuleAutoInit_ef581ebbf3812c41155eb6cbf7fd17d1.h\" -isystem /work/vtk-v9.1.0-wasm-build/Common/Color -isystem /work/src/Common/Color -isystem /work/vtk-v9.1.0-wasm-build/Common/Core -isystem /work/src/Common/Core -isystem /work/vtk-v9.1.0-wasm-build/Utilities/KWIML -isystem /work/src/Utilities/KWIML -isystem /work/vtk-v9.1.0-wasm-build/Utilities/KWSys -isystem /work/src/Utilities/KWSys -isystem /work/vtk-v9.1.0-wasm-build/Common/DataModel -isystem /work/src/Common/DataModel -isystem /work/vtk-v9.1.0-wasm-build/Common/Math -isystem /work/src/Common/Math -isystem /work/vtk-v9.1.0-wasm-build/ThirdParty/kissfft/vtkkissfft -isystem /work/src/ThirdParty/kissfft/vtkkissfft -isystem /work/vtk-v9.1.0-wasm-build/ThirdParty/kissfft -isystem /work/src/ThirdParty/kissfft -isystem /work/vtk-v9.1.0-wasm-build/Common/Transforms -isystem /work/src/Common/Transforms -isystem /work/vtk-v9.1.0-wasm-build/IO/Geometry -isystem /work/src/IO/Geometry -isystem /work/vtk-v9.1.0-wasm-build/Common/ExecutionModel -isystem /work/src/Common/ExecutionModel -isystem /work/vtk-v9.1.0-wasm-build/IO/Core -isystem /work/src/IO/Core -isystem /work/vtk-v9.1.0-wasm-build/IO/Legacy -isystem /work/src/IO/Legacy -isystem /work/vtk-v9.1.0-wasm-build/ThirdParty/jsoncpp/vtkjsoncpp -isystem /work/src/ThirdParty/jsoncpp/vtkjsoncpp -isystem /work/vtk-v9.1.0-wasm-build/ThirdParty/jsoncpp/vtkjsoncpp/json -isystem /work/vtk-v9.1.0-wasm-build/ThirdParty/jsoncpp -isystem /work/src/ThirdParty/jsoncpp -isystem /work/vtk-v9.1.0-wasm-build/Interaction/Style -isystem /work/src/Interaction/Style -isystem /work/vtk-v9.1.0-wasm-build/Rendering/Core -isystem /work/src/Rendering/Core -isystem /work/vtk-v9.1.0-wasm-build/Filters/Core -isystem /work/src/Filters/Core -isystem /work/vtk-v9.1.0-wasm-build/Common/Misc -isystem /work/src/Common/Misc -isystem /work/vtk-v9.1.0-wasm-build/Rendering/FreeType -isystem /work/src/Rendering/FreeType -isystem /work/vtk-v9.1.0-wasm-build/ThirdParty/freetype/vtkfreetype -isystem /work/src/ThirdParty/freetype/vtkfreetype -isystem /work/src/ThirdParty/freetype/vtkfreetype/include -isystem /work/vtk-v9.1.0-wasm-build/ThirdParty/freetype/vtkfreetype/include -isystem /work/vtk-v9.1.0-wasm-build/ThirdParty/freetype -isystem /work/src/ThirdParty/freetype -isystem /work/vtk-v9.1.0-wasm-build/ThirdParty/zlib/vtkzlib -isystem /work/src/ThirdParty/zlib/vtkzlib -isystem /work/vtk-v9.1.0-wasm-build/ThirdParty/zlib -isystem /work/src/ThirdParty/zlib -isystem /work/vtk-v9.1.0-wasm-build/Rendering/OpenGL2 -isystem /work/src/Rendering/OpenGL2 -isystem /work/vtk-v9.1.0-wasm-build/Filters/General -isystem /work/src/Filters/General -isystem /work/vtk-v9.1.0-wasm-build/Rendering/UI -isystem /work/src/Rendering/UI -isystem /work/vtk-v9.1.0-wasm-build/ThirdParty/glew/vtkglew -isystem /work/src/ThirdParty/glew/vtkglew -isystem /work/vtk-v9.1.0-wasm-build/ThirdParty/glew -isystem /work/src/ThirdParty/glew -isystem /emsdk/upstream/emscripten/system/include --bind -g3 -s EXPORT_NAME=vtkApp -s ALLOW_MEMORY_GROWTH=1 -s ASSERTIONS=1 -s DEMANGLE_SUPPORT=1 -s EMULATE_FUNCTION_POINTER_CASTS=0 -s ERROR_ON_UNDEFINED_SYMBOLS=0 -s MODULARIZE=1 -s USE_PTHREADS=0 -s WASM=1 -s "EXPORTED_FUNCTIONS=['_main', '_stop']" -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ccall', 'cwrap']" -s ENVIRONMENT=web --preload-file ./ferrari-f1-race-car.obj -O3 -s FULL_ES3=1 -s MIN_WEBGL_VERSION=2 -s MAX_WEBGL_VERSION=2 -s USE_SDL=2 -std=gnu++11 -MD -MT CMakeFiles/ReadOBJ.dir/ReadOBJ.cxx.o -MF CMakeFiles/ReadOBJ.dir/ReadOBJ.cxx.o.d -o CMakeFiles/ReadOBJ.dir/ReadOBJ.cxx.o -c /work/examples/ReadOBJ/ReadOBJ.cxx
em++: warning: linker setting ignored during compilation: 'EXPORT_NAME' [-Wunused-command-line-argument]
em++: warning: linker setting ignored during compilation: 'ALLOW_MEMORY_GROWTH' [-Wunused-command-line-argument]
em++: warning: linker setting ignored during compilation: 'ASSERTIONS' [-Wunused-command-line-argument]
em++: warning: linker setting ignored during compilation: 'DEMANGLE_SUPPORT' [-Wunused-command-line-argument]
em++: warning: linker setting ignored during compilation: 'EMULATE_FUNCTION_POINTER_CASTS' [-Wunused-command-line-argument]
em++: warning: linker setting ignored during compilation: 'ERROR_ON_UNDEFINED_SYMBOLS' [-Wunused-command-line-argument]
em++: warning: linker setting ignored during compilation: 'MODULARIZE' [-Wunused-command-line-argument]
em++: warning: linker setting ignored during compilation: 'WASM' [-Wunused-command-line-argument]
em++: warning: linker setting ignored during compilation: 'EXPORTED_FUNCTIONS' [-Wunused-command-line-argument]
em++: warning: linker setting ignored during compilation: 'EXTRA_EXPORTED_RUNTIME_METHODS' [-Wunused-command-line-argument]
em++: warning: linker setting ignored during compilation: 'ENVIRONMENT' [-Wunused-command-line-argument]
em++: warning: linker setting ignored during compilation: 'FULL_ES3' [-Wunused-command-line-argument]
em++: warning: linker setting ignored during compilation: 'MIN_WEBGL_VERSION' [-Wunused-command-line-argument]
em++: warning: linker setting ignored during compilation: 'MAX_WEBGL_VERSION' [-Wunused-command-line-argument]
em++: warning: linker flag ignored during compilation: '--bind' [-Wunused-command-line-argument]
em++: warning: linker flag ignored during compilation: '--preload-file' [-Wunused-command-line-argument]
In file included from /work/examples/ReadOBJ/ReadOBJ.cxx:12:
In file included from /emsdk/upstream/emscripten/system/include/emscripten.h:1:
In file included from /emsdk/upstream/emscripten/system/include/emscripten/emscripten.h:29:
/emsdk/upstream/emscripten/system/include/emscripten/version.h:8:2: error: "Including files directly from the emscripten source tree is not supported. Please use the cache/sysroot/include directory".
#error "Including files directly from the emscripten source tree is not supported. Please use the cache/sysroot/include directory".
^
1 error generated.
em++: error: '/emsdk/upstream/bin/clang++ -target wasm32-unknown-emscripten -fignore-exceptions -fvisibility=default -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -DEMSCRIPTEN -I/emsdk/upstream/emscripten/cache/sysroot/include/SDL2 --sysroot=/emsdk/upstream/emscripten/cache/sysroot -Xclang -iwithsysroot/include/compat -DGLEW_STATIC -Dkiss_fft_scalar=double -DvtkRenderingCore_AUTOINIT_INCLUDE="/work/examples/ReadOBJ/build/CMakeFiles/vtkModuleAutoInit_ef581ebbf3812c41155eb6cbf7fd17d1.h" -isystem /work/vtk-v9.1.0-wasm-build/Common/Color -isystem /work/src/Common/Color -isystem /work/vtk-v9.1.0-wasm-build/Common/Core -isystem /work/src/Common/Core -isystem /work/vtk-v9.1.0-wasm-build/Utilities/KWIML -isystem /work/src/Utilities/KWIML -isystem /work/vtk-v9.1.0-wasm-build/Utilities/KWSys -isystem /work/src/Utilities/KWSys -isystem /work/vtk-v9.1.0-wasm-build/Common/DataModel -isystem /work/src/Common/DataModel -isystem /work/vtk-v9.1.0-wasm-build/Common/Math -isystem /work/src/Common/Math -isystem /work/vtk-v9.1.0-wasm-build/ThirdParty/kissfft/vtkkissfft -isystem /work/src/ThirdParty/kissfft/vtkkissfft -isystem /work/vtk-v9.1.0-wasm-build/ThirdParty/kissfft -isystem /work/src/ThirdParty/kissfft -isystem /work/vtk-v9.1.0-wasm-build/Common/Transforms -isystem /work/src/Common/Transforms -isystem /work/vtk-v9.1.0-wasm-build/IO/Geometry -isystem /work/src/IO/Geometry -isystem /work/vtk-v9.1.0-wasm-build/Common/ExecutionModel -isystem /work/src/Common/ExecutionModel -isystem /work/vtk-v9.1.0-wasm-build/IO/Core -isystem /work/src/IO/Core -isystem /work/vtk-v9.1.0-wasm-build/IO/Legacy -isystem /work/src/IO/Legacy -isystem /work/vtk-v9.1.0-wasm-build/ThirdParty/jsoncpp/vtkjsoncpp -isystem /work/src/ThirdParty/jsoncpp/vtkjsoncpp -isystem /work/vtk-v9.1.0-wasm-build/ThirdParty/jsoncpp/vtkjsoncpp/json -isystem /work/vtk-v9.1.0-wasm-build/ThirdParty/jsoncpp -isystem /work/src/ThirdParty/jsoncpp -isystem /work/vtk-v9.1.0-wasm-build/Interaction/Style -isystem /work/src/Interaction/Style -isystem /work/vtk-v9.1.0-wasm-build/Rendering/Core -isystem /work/src/Rendering/Core -isystem /work/vtk-v9.1.0-wasm-build/Filters/Core -isystem /work/src/Filters/Core -isystem /work/vtk-v9.1.0-wasm-build/Common/Misc -isystem /work/src/Common/Misc -isystem /work/vtk-v9.1.0-wasm-build/Rendering/FreeType -isystem /work/src/Rendering/FreeType -isystem /work/vtk-v9.1.0-wasm-build/ThirdParty/freetype/vtkfreetype -isystem /work/src/ThirdParty/freetype/vtkfreetype -isystem /work/src/ThirdParty/freetype/vtkfreetype/include -isystem /work/vtk-v9.1.0-wasm-build/ThirdParty/freetype/vtkfreetype/include -isystem /work/vtk-v9.1.0-wasm-build/ThirdParty/freetype -isystem /work/src/ThirdParty/freetype -isystem /work/vtk-v9.1.0-wasm-build/ThirdParty/zlib/vtkzlib -isystem /work/src/ThirdParty/zlib/vtkzlib -isystem /work/vtk-v9.1.0-wasm-build/ThirdParty/zlib -isystem /work/src/ThirdParty/zlib -isystem /work/vtk-v9.1.0-wasm-build/Rendering/OpenGL2 -isystem /work/src/Rendering/OpenGL2 -isystem /work/vtk-v9.1.0-wasm-build/Filters/General -isystem /work/src/Filters/General -isystem /work/vtk-v9.1.0-wasm-build/Rendering/UI -isystem /work/src/Rendering/UI -isystem /work/vtk-v9.1.0-wasm-build/ThirdParty/glew/vtkglew -isystem /work/src/ThirdParty/glew/vtkglew -isystem /work/vtk-v9.1.0-wasm-build/ThirdParty/glew -isystem /work/src/ThirdParty/glew -isystem /emsdk/upstream/emscripten/system/include -g3 -O3 -std=gnu++11 -MD -MT CMakeFiles/ReadOBJ.dir/ReadOBJ.cxx.o -MF CMakeFiles/ReadOBJ.dir/ReadOBJ.cxx.o.d -c /work/examples/ReadOBJ/ReadOBJ.cxx -o CMakeFiles/ReadOBJ.dir/ReadOBJ.cxx.o' failed (returned 1)
ninja: build stopped: subcommand failed.
So you can see the problem in the em++
command. It includes -isystem /emsdk/upstream/emscripten/system/include
which is incorrect. Its not clear to me how that is getting added, but it must be coming from cmake somewhere. You need to track that down and remove it somehow.
Perhaps grep all your sources for "system/include"?
Looking at the VTK software you are trying to build it looks like they have a recent change to CMake/patches/99/FindOpenGL.cmake
which tries to fix this issue: https://gitlab.kitware.com/vtk/vtk/-/commit/f199bdb19fdb20281959f175549e6cc289b95eeb
Looks like you maybe need to get that patch.
@sheonny, we've fixed this on VTK side recently. You've two options:
Okay, thank you very much! Now there is a new error! ` cmake --build . [1/2] Building CXX object CMakeFiles/ReadUnknownTypeXMLFile.dir/ReadUnknownTypeXMLFile.cxx.o em++: warning: linker setting ignored during compilation: 'EXPORT_NAME' [-Wunused-command-line-argument] em++: warning: linker setting ignored during compilation: 'ALLOW_MEMORY_GROWTH' [-Wunused-command-line-argument] em++: warning: linker setting ignored during compilation: 'ASSERTIONS' [-Wunused-command-line-argument] em++: warning: linker setting ignored during compilation: 'DEMANGLE_SUPPORT' [-Wunused-command-line-argument] em++: warning: linker setting ignored during compilation: 'EMULATE_FUNCTION_POINTER_CASTS' [-Wunused-command-line-argument] em++: warning: linker setting ignored during compilation: 'ERROR_ON_UNDEFINED_SYMBOLS' [-Wunused-command-line-argument] em++: warning: linker setting ignored during compilation: 'MODULARIZE' [-Wunused-command-line-argument] em++: warning: linker setting ignored during compilation: 'WASM' [-Wunused-command-line-argument] em++: warning: linker setting ignored during compilation: 'INITIAL_MEMORY' [-Wunused-command-line-argument] em++: warning: linker setting ignored during compilation: 'MAXIMUM_MEMORY' [-Wunused-command-line-argument] em++: warning: linker setting ignored during compilation: 'TOTAL_MEMORY' [-Wunused-command-line-argument] em++: warning: linker setting ignored during compilation: 'FULL_ES3' [-Wunused-command-line-argument] em++: warning: linker setting ignored during compilation: 'MIN_WEBGL_VERSION' [-Wunused-command-line-argument] em++: warning: linker setting ignored during compilation: 'MAX_WEBGL_VERSION' [-Wunused-command-line-argument] em++: warning: linker flag ignored during compilation: '--bind' [-Wunused-command-line-argument] em++: warning: linker flag ignored during compilation: '--preload-file' [-Wunused-command-line-argument] ports:INFO: retrieving port: sdl2 from https://github.com/libsdl-org/SDL/archive/release-2.24.2.zip ports:INFO: unpacking port: sdl2 cache:INFO: generating port: sysroot/lib/wasm32-emscripten/thinlto/libSDL2.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/thinlto/libSDL2.a" for subsequent builds) system_libs:INFO: compiled 115 inputs cache:INFO: - ok em++: warning: argument unused during compilation: '-lembind' [-Wunused-command-line-argument] [2/2] Linking CXX executable ReadUnknownTypeXMLFile.js cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/thinlto/libembind-rtti.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/thinlto/libembind-rtti.a" for subsequent builds) system_libs:INFO: compiled 1 inputs cache:INFO: - ok cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/thinlto/libGL-webgl2-full_es3.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/thinlto/libGL-webgl2-full_es3.a" for subsequent builds) system_libs:INFO: compiled 4 inputs cache:INFO: - ok cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/thinlto/libal.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/thinlto/libal.a" for subsequent builds) system_libs:INFO: compiled 1 inputs cache:INFO: - ok cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/thinlto/libhtml5.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/thinlto/libhtml5.a" for subsequent builds) system_libs:INFO: compiled 2 inputs cache:INFO: - ok cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/thinlto/libstubs-debug.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/thinlto/libstubs-debug.a" for subsequent builds) system_libs:INFO: compiled 2 inputs cache:INFO: - ok cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/thinlto/libnoexit.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/thinlto/libnoexit.a" for subsequent builds) system_libs:INFO: compiled 1 inputs cache:INFO: - ok cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/thinlto/libc-debug.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/thinlto/libc-debug.a" for subsequent builds) system_libs:INFO: compiled 1000 inputs cache:INFO: - ok cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/thinlto/libdlmalloc.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/thinlto/libdlmalloc.a" for subsequent builds) system_libs:INFO: compiled 2 inputs cache:INFO: - ok cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/thinlto/libcompiler_rt.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/thinlto/libcompiler_rt.a" for subsequent builds) system_libs:INFO: compiled 175 inputs cache:INFO: - ok cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/thinlto/libc++.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/thinlto/libc++.a" for subsequent builds) system_libs:INFO: compiled 48 inputs cache:INFO: - ok cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/thinlto/libc++abi-debug.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/thinlto/libc++abi-debug.a" for subsequent builds) system_libs:INFO: compiled 15 inputs cache:INFO: - ok cache:INFO: generating system library: sysroot/lib/wasm32-emscripten/thinlto/libsockets.a... (this will be cached in "/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/thinlto/libsockets.a" for subsequent builds) system_libs:INFO: compiled 21 inputs cache:INFO: - ok wasm-ld: warning: function signature mismatch: vtkexpat_XML_GetCurrentLineNumber
defined as (i32) -> i32 in /work/vtk-v9.1.0-wasm-build/lib/libvtkIOXMLParser-9.1.a(vtkXMLParser.cxx.o) defined as (i32) -> i64 in /work/vtk-v9.1.0-wasm-build/lib/libvtkexpat-9.1.a(xmlparse.c.o)
wasm-ld: warning: function signature mismatch: vtkexpat_XML_GetCurrentColumnNumber
defined as (i32) -> i32 in /work/vtk-v9.1.0-wasm-build/lib/libvtkIOXMLParser-9.1.a(vtkXMLParser.cxx.o) defined as (i32) -> i64 in /work/vtk-v9.1.0-wasm-build/lib/libvtkexpat-9.1.a(xmlparse.c.o)
wasm-ld: warning: function signature mismatch: time
defined as (i32) -> i32 in /emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/thinlto/libc-debug.a(emscripten_time.o) defined as (i32) -> i64 in lto.tmp
wasm-ld: warning: function signature mismatch: vtkexpat_XML_GetCurrentByteIndex
defined as (i32) -> i32 in /work/vtk-v9.1.0-wasm-build/lib/libvtkIOXMLParser-9.1.a(vtkXMLParser.cxx.o) defined as (i32) -> i64 in /work/vtk-v9.1.0-wasm-build/lib/libvtkexpat-9.1.a(xmlparse.c.o) warning: undefined symbol: pthread_attr_setscope (referenced by top-level compiled C/C++ code) em++: warning: warnings in JS library compilation [-Wjs-compiler] em++: warning: running limited binaryen optimizations because DWARF info requested (or indirectly required) [-Wlimited-postlink-optimizations]
'wasm ld: warning: function signature mismatch' caused a running error; options:
"--bind" "-g3" "SHELL:-s EXPORT_NAME=vtkApp" "SHELL:-s ALLOW_MEMORY_GROWTH=1" "SHELL:-s ASSERTIONS=1" "SHELL:-s DEMANGLE_SUPPORT=1" "SHELL:-s EMULATE_FUNCTION_POINTER_CASTS=0" "SHELL:-s ERROR_ON_UNDEFINED_SYMBOLS=0" "SHELL:-s MODULARIZE=1" "SHELL:-s USE_PTHREADS=0" "SHELL:-s WASM=1" "SHELL:-s INITIAL_MEMORY=200MB" "SHELL:-s MAXIMUM_MEMORY=512MB" "SHELL:-s TOTAL_MEMORY=512MB" "SHELL:-s DISABLE_EXCEPTION_CATCHING=0" "SHELL:--preload-file ./Bones.vtp" "SHELL:--no-heap-copy" "SHELL:-flto=thin"
Browser error:
Import header file `
include
include <emscripten/html5.h>
Compile Command:
cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} -DVTK_DIR=/work/vtk-v9.1.0-wasm-build /work/examples/ReadOBJ/error:
error "Including files directly from the emscripten source tree is not supported. Please use the cache/sysroot/include directory".
` If don't import these two header files, there's no problem why?