Closed Jonathhhan closed 5 months ago
@Jonathhhan oh cool!! Yes also can you look into if any issues with the WASM files as well.
We were aware the .a / .bc formats were not going to work in the future. https://github.com/openframeworks/apothecary/releases/download/bleeding/openFrameworksLibs_bleeding_emscripten.tar.bz2
Many of the libs have been set to compile with the WASM format to fix a lot of these static lib and not runtime systems.
Do we need to make these .wasms / .o ?
At least freetype.wasm does not work:
wasm-ld: error: /mnt/c/Users/Jonat/Desktop/of_v20240306_linux64gcc6_release/libs/openFrameworksCompiled/lib/emscripten/libopenFrameworks.o: undefined symbol: FT_Init_FreeType
wasm-ld: error: /mnt/c/Users/Jonat/Desktop/of_v20240306_linux64gcc6_release/libs/openFrameworksCompiled/lib/emscripten/libopenFrameworks.o: undefined symbol: FT_New_Face
wasm-ld: error: /mnt/c/Users/Jonat/Desktop/of_v20240306_linux64gcc6_release/libs/openFrameworksCompiled/lib/emscripten/libopenFrameworks.o: undefined symbol: FT_Done_Face
wasm-ld: error: /mnt/c/Users/Jonat/Desktop/of_v20240306_linux64gcc6_release/libs/openFrameworksCompiled/lib/emscripten/libopenFrameworks.o: undefined symbol: FT_Set_Char_Size
wasm-ld: error: /mnt/c/Users/Jonat/Desktop/of_v20240306_linux64gcc6_release/libs/openFrameworksCompiled/lib/emscripten/libopenFrameworks.o: undefined symbol: FT_Outline_Decompose
wasm-ld: error: /mnt/c/Users/Jonat/Desktop/of_v20240306_linux64gcc6_release/libs/openFrameworksCompiled/lib/emscripten/libopenFrameworks.o: undefined symbol: FT_Get_Char_Index
wasm-ld: error: /mnt/c/Users/Jonat/Desktop/of_v20240306_linux64gcc6_release/libs/openFrameworksCompiled/lib/emscripten/libopenFrameworks.o: undefined symbol: FT_Load_Glyph
wasm-ld: error: /mnt/c/Users/Jonat/Desktop/of_v20240306_linux64gcc6_release/libs/openFrameworksCompiled/lib/emscripten/libopenFrameworks.o: undefined symbol: FT_Render_Glyph
wasm-ld: error: /mnt/c/Users/Jonat/Desktop/of_v20240306_linux64gcc6_release/libs/openFrameworksCompiled/lib/emscripten/libopenFrameworks.o: undefined symbol: FT_Get_Char_Index
wasm-ld: error: /mnt/c/Users/Jonat/Desktop/of_v20240306_linux64gcc6_release/libs/openFrameworksCompiled/lib/emscripten/libopenFrameworks.o: undefined symbol: FT_Get_Char_Index
wasm-ld: error: /mnt/c/Users/Jonat/Desktop/of_v20240306_linux64gcc6_release/libs/openFrameworksCompiled/lib/emscripten/libopenFrameworks.o: undefined symbol: FT_Get_Kerning
wasm-ld: error: /mnt/c/Users/Jonat/Desktop/of_v20240306_linux64gcc6_release/libs/openFrameworksCompiled/lib/emscripten/libopenFrameworks.o: undefined symbol: FT_Get_Char_Index
wasm-ld: error: /mnt/c/Users/Jonat/Desktop/of_v20240306_linux64gcc6_release/libs/openFrameworksCompiled/lib/emscripten/libopenFrameworks.o: undefined symbol: FT_Get_Char_Index
wasm-ld: error: /mnt/c/Users/Jonat/Desktop/of_v20240306_linux64gcc6_release/libs/openFrameworksCompiled/lib/emscripten/libopenFrameworks.o: undefined symbol: FT_Get_Kerning
It does not matter much in the case of freetype, because it is replaced by the emscripten lib since some time:
-s USE_FREETYPE=1
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/freetype/lib/%
Probably it would work compiled as an .o file, but I was not able to change the script accordingly... Is it possibly to compile cairo for Emscripten, too?
@danoli3 there are also some issues with libxml2 (tried the svgExample):
wasm-ld: error: /mnt/c/Users/Jonat/Desktop/of_v20240306_linux64gcc6_release/addons/obj/emscripten/Release/ofxSvg/src/ofxSvg.o: undefined symbol: pugi::xml_attribute::set_value(char const*)
wasm-ld: error: /mnt/c/Users/Jonat/Desktop/of_v20240306_linux64gcc6_release/addons/obj/emscripten/Release/ofxSvg/src/ofxSvg.o: undefined symbol: pugi::xpath_node_set::~xpath_node_set()
wasm-ld: error: /mnt/c/Users/Jonat/Desktop/of_v20240306_linux64gcc6_release/addons/obj/emscripten/Release/ofxSvg/src/ofxSvg.o: undefined symbol: pugi::xml_attribute::set_value(char const*)
wasm-ld: error: /mnt/c/Users/Jonat/Desktop/of_v20240306_linux64gcc6_release/addons/obj/emscripten/Release/ofxSvg/src/ofxSvg.o: undefined symbol: pugi::xpath_node_set::~xpath_node_set()
wasm-ld: error: /mnt/c/Users/Jonat/Desktop/of_v20240306_linux64gcc6_release/addons/obj/emscripten/Release/ofxSvg/src/ofxSvg.o: undefined symbol: pugi::xml_attribute::set_value(char const*)
wasm-ld: error: /mnt/c/Users/Jonat/Desktop/of_v20240306_linux64gcc6_release/addons/obj/emscripten/Release/ofxSvg/src/ofxSvg.o: undefined symbol: pugi::xpath_node_set::~xpath_node_set()
wasm-ld: error: /mnt/c/Users/Jonat/Desktop/of_v20240306_linux64gcc6_release/addons/obj/emscripten/Release/ofxSvg/src/ofxSvg.o: undefined symbol: pugi::xpath_node_set::~xpath_node_set()
wasm-ld: error: /mnt/c/Users/Jonat/Desktop/of_v20240306_linux64gcc6_release/addons/obj/emscripten/Release/ofxSvg/src/ofxSvg.o: undefined symbol: pugi::xpath_node_set::~xpath_node_set()
wasm-ld: error: /mnt/c/Users/Jonat/Desktop/of_v20240306_linux64gcc6_release/addons/obj/emscripten/Release/ofxSvg/src/ofxSvg.o: undefined symbol: pugi::xpath_node_set::~xpath_node_set()
wasm-ld: error: /mnt/c/Users/Jonat/Desktop/of_v20240306_linux64gcc6_release/libs/openFrameworksCompiled/lib/emscripten/libopenFrameworks.o: undefined symbol: pugi::xml_document::xml_document()
wasm-ld: error: /mnt/c/Users/Jonat/Desktop/of_v20240306_linux64gcc6_release/libs/openFrameworksCompiled/lib/emscripten/libopenFrameworks.o: undefined symbol: pugi::xml_node::xml_node()
wasm-ld: error: /mnt/c/Users/Jonat/Desktop/of_v20240306_linux64gcc6_release/libs/openFrameworksCompiled/lib/emscripten/libopenFrameworks.o: undefined symbol: pugi::xml_node::root() const
wasm-ld: error: /mnt/c/Users/Jonat/Desktop/of_v20240306_linux64gcc6_release/libs/openFrameworksCompiled/lib/emscripten/libopenFrameworks.o: undefined symbol: pugi::xml_document::xml_document()
wasm-ld: error: /mnt/c/Users/Jonat/Desktop/of_v20240306_linux64gcc6_release/libs/openFrameworksCompiled/lib/emscripten/libopenFrameworks.o: undefined symbol: pugi::xml_document::load_string(char const*, unsigned int)
wasm-ld: error: /mnt/c/Users/Jonat/Desktop/of_v20240306_linux64gcc6_release/libs/openFrameworksCompiled/lib/emscripten/libopenFrameworks.o: undefined symbol: pugi::xml_parse_result::operator bool() const
wasm-ld: error: /mnt/c/Users/Jonat/Desktop/of_v20240306_linux64gcc6_release/libs/openFrameworksCompiled/lib/emscripten/libopenFrameworks.o: undefined symbol: pugi::xml_node::root() const
wasm-ld: error: /mnt/c/Users/Jonat/Desktop/of_v20240306_linux64gcc6_release/libs/openFrameworksCompiled/lib/emscripten/libopenFrameworks.o: undefined symbol: pugi::xml_node::root() const
wasm-ld: error: /mnt/c/Users/Jonat/Desktop/of_v20240306_linux64gcc6_release/libs/openFrameworksCompiled/lib/emscripten/libopenFrameworks.o: undefined symbol: pugi::xml_node::operator==(pugi::xml_node const&) const
wasm-ld: error: /mnt/c/Users/Jonat/Desktop/of_v20240306_linux64gcc6_release/libs/openFrameworksCompiled/lib/emscripten/libopenFrameworks.o: undefined symbol: pugi::xml_node::print(std::__2::basic_ostream<char, std::__2::char_traits<char>>&, char const*, unsigned int, pugi::xml_encoding, unsigned int) const
wasm-ld: error: /mnt/c/Users/Jonat/Desktop/of_v20240306_linux64gcc6_release/libs/openFrameworksCompiled/lib/emscripten/libopenFrameworks.o: undefined symbol: pugi::xml_document::xml_document()
wasm-ld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
Just a guess, but maybe all .wasm
/ .bc
libs need to be compiled as .a
/ .o
since Emscripten 3.1.52?
Yeah you can see our original discussion here: https://github.com/openframeworks/apothecary/issues/326
libopenFrameworks.o: undefined symbol: FT_Init_FreeType
this looks like it hasn't linked to the freetype code at all.
Cairo is possible to add, however will definitely need our locally compiled FreeType as a dependancy, will have a look later seems like those XML bugs are still related to pugs
/ofxSvg.o: undefined symbol: pugi::xml_attribute::set_value(char const*)
I will merge this code once finished with Actions changes on bleeding currently
@danoli3 thanks.
Might have to rebase your commit sorry!
@Jonathhhan yeah just fetch from upstream, then rebase your commit ontop of bleeding tip
Needs to be compiled as an
.o
file instead of a.bc
file since Emscripten 3.1.52. See: https://github.com/emscripten-core/emscripten/issues/21128