apothecary icon indicating copy to clipboard operation
apothecary copied to clipboard

add -r flag

Open themancalledjakob opened this issue 1 year ago • 3 comments

Produce a relocatable object as output (partial linking). Necessary for latest emsdk.

themancalledjakob avatar Nov 15 '22 14:11 themancalledjakob

I tried that, but I still get this error:

_html5audio_context_create @ fontsExample.js:1
fontsExample.js:1 Uncaught RuntimeError: null function or function signature mismatch
    at af_autofitter_load_glyph (fontsExample.wasm:0xec14a)
    at FT_Load_Glyph (fontsExample.wasm:0x180bb)
    at ofTrueTypeFont::load(std::__2::__fs::filesystem::path const&, int, bool, bool, bool, float, int) (fontsExample.wasm:0x231bb)
    at ofApp::setup() (fontsExample.wasm:0xdb2bd)
    at ofNode::onParentOrientationChanged(glm::qua<float, (glm::qualifier)0>&) (fontsExample.wasm:0x7a675)
    at std::__2::__function::__func<std::__2::shared_ptr<of::priv::Function<ofKeyEventArgs, std::__2::recursive_mutex>> ofEvent<ofKeyEventArgs, std::__2::recursive_mutex>::make_function<ofMainLoop>(ofMainLoop*, void (ofMainLoop::*)(ofKeyEventArgs&), int)::'lambda'(void const*, ofKeyEventArgs&), std::__2::allocator<std::__2::shared_ptr<of::priv::Function<ofKeyEventArgs, std::__2::recursive_mutex>> ofEvent<ofKeyEventArgs, std::__2::recursive_mutex>::make_function<ofMainLoop>(ofMainLoop*, void (ofMainLoop::*)(ofKeyEventArgs&), int)::'lambda'(void const*, ofKeyEventArgs&)>, bool (void const*, ofKeyEventArgs&)>::operator()(void const*&&, ofKeyEventArgs&) (fontsExample.wasm:0x1487c)
    at ofEvent<ofEventArgs, std::__2::recursive_mutex>::notify(ofEventArgs&) (fontsExample.wasm:0x339fc)
    at ofCoreEvents::notifySetup() (fontsExample.wasm:0x825f8)
    at ofxAppEmscriptenWindow::loop() (fontsExample.wasm:0xc8cbd)
    at std::__2::__function::__func<void (*)(), std::__2::allocator<void (*)()>, void ()>::operator()() (fontsExample.wasm:0xba02f)

It only works for me with -s USE_FREETYPE=1 and PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/freetype/lib/%

Jonathhhan avatar Feb 17 '23 02:02 Jonathhhan

hmmm.. so that would actually ignore the precompiled library. could it be, that the freetype lib in $OF_ROOT/libs/freetype/lib/emscripten/ was compiled with a different emsdk than you used to compile fontsExample? That would explain the function signature mismatch, I think.

themancalledjakob avatar Feb 21 '23 19:02 themancalledjakob

@themancalledjakob it was the same version. we actually had a fix for this, but since it is working with the prebuild lib it is not needed anymore (would still be nice to fix the oflib for that): https://github.com/openframeworks/openFrameworks/pull/6764

Jonathhhan avatar Feb 21 '23 21:02 Jonathhhan