Using emscripten on M1 mac

566 views
Skip to first unread message

Amit Sharma

unread,
Sep 25, 2021, 10:38:38 AM9/25/21
to emscripten-discuss
Hi Folks - 

I am unable to compile a library using emscripten on M1 ARM mac. 
On my older mac (intel based), I didn't had any issues. 

The issue is around unresolved linker errors. 
The specific library that I am trying to compile here is openframeworks. 
Can anyone please point me on how to go about debugging or fixing this issue. 
I haven't used emscripten much except superficially using the documentation from the tutorials. 


error: undefined symbol: _ZN24ofxEmscriptenSoundStreamC1Ev (referenced by top-level compiled C/C++ code) warning: Link with `-s LLD_REPORT_UNDEFINED` to get more information on undefined symbols warning: To disable errors for undefined symbols use `-s ERROR_ON_UNDEFINED_SYMBOLS=0` warning: __ZN24ofxEmscriptenSoundStreamC1Ev may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library error: undefined symbol: tessDeleteTess (referenced by top-level compiled C/C++ code) warning: _tessDeleteTess may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library error: undefined symbol: tessNewTess (referenced by top-level compiled C/C++ code) warning: _tessNewTess may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library Error: Aborting compilation due to previous error

Many thanks

Shlomi Fish

unread,
Sep 26, 2021, 9:07:14 AM9/26/21
to Amit Sharma, emscripte...@googlegroups.com
Hi Amit,

On Sat, 25 Sep 2021 07:38:38 -0700 (PDT)
Amit Sharma <amitsh...@gmail.com> wrote:

> Hi Folks -
>
> I am unable to compile a library using emscripten on M1 ARM mac.
> On my older mac (intel based), I didn't had any issues.
>
> The issue is around unresolved linker errors.
> The specific library that I am trying to compile here is openframeworks.
> Can anyone please point me on how to go about debugging or fixing this
> issue.
> I haven't used emscripten much except superficially using the documentation
> from the tutorials.
>
>
> *error: undefined symbol: _ZN24ofxEmscriptenSoundStreamC1Ev (referenced by
> top-level compiled C/C++ code) warning: Link with `-s LLD_REPORT_UNDEFINED`
> to get more information on undefined symbols warning: To disable errors for
> undefined symbols use `-s ERROR_ON_UNDEFINED_SYMBOLS=0` warning:
> __ZN24ofxEmscriptenSoundStreamC1Ev may need to be added to
> EXPORTED_FUNCTIONS if it arrives from a system library error: undefined
> symbol: tessDeleteTess (referenced by top-level compiled C/C++ code)
> warning: _tessDeleteTess may need to be added to EXPORTED_FUNCTIONS if it
> arrives from a system library error: undefined symbol: tessNewTess
> (referenced by top-level compiled C/C++ code) warning: _tessNewTess may
> need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
> Error: Aborting compilation due to previous error*
>

Can you share problematic code? See:
https://github.com/shlomif/how-to-share-code-online and
https://github.com/shlomif/writing-the-perfect-question .

> Many thanks
>



--

Shlomi Fish https://www.shlomifish.org/
“So, who the hell is Qoheleth?” - https://shlom.in/qoheleth

Reality to be commanded must be obeyed. Chuck Norris disobeyed reality, and
now he commands it.
https://www.shlomifish.org/humour/bits/facts/Chuck-Norris/

Please reply to list if it's a mailing list post - https://shlom.in/reply .

Amit Sharma

unread,
Sep 26, 2021, 10:49:01 PM9/26/21
to emscripten-discuss
Hi Shlomi - 

Please ignore the previous error. The make configuration was trying to build an executable instead of library.
But I am facing a new error. Seems something is broken 

 I was suggested by the project maintainer to use sdk-1.40.0-64bit. Like so:
./emsdk install sdk-1.40.0-64bit

However, this fails on M1 mac due to missing file error

Wondering how to go about fixing this error. 
thank you 
Am
Reply all
Reply to author
Forward
0 new messages