Lack of IPC in Libc

119 views
Skip to first unread message

Changran Wang

unread,
Jun 8, 2021, 9:41:11 PM6/8/21
to emscripten-discuss
Hi! I am newbie to emscripten. When I use emmake to build a library, there are some errors that show lack of IPC libs. Then I check emsdk and find that there is a complete library of libc in the system folder, but the IPC target files is missing in libc.a of sysroot. Does emscripten not support IPC temporarily?  Or IPC can't run in wasm runtime?
```
error: undefined symbol: ftok (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: _ftok may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library error: undefined symbol: popen (referenced by top-level compiled C/C++ code) warning: _popen may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library error: undefined symbol: shmat (referenced by top-level compiled C/C++ code) warning: _shmat may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library error: undefined symbol: shmctl (referenced by top-level compiled C/C++ code) warning: _shmctl may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library error: undefined symbol: shmdt (referenced by top-level compiled C/C++ code) warning: _shmdt may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library error: undefined symbol: shmget (referenced by top-level compiled C/C++ code) warning: _shmget may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library error: undefined symbol: wordexp (referenced by top-level compiled C/C++ code) warning: _wordexp may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library error: undefined symbol: wordfree (referenced by top-level compiled C/C++ code) warning: _wordfree may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library Error: Aborting compilation due to previous errors
```

Floh

unread,
Jun 9, 2021, 7:44:56 AM6/9/21
to emscripten-discuss
My guess is that these functions are not supported by emscripten because they don't make much sense in a browser or WASI sandbox (running external native processes would be a security risk - I would also like to see some sort popen() functionality at least in WASI though). Such unsupported functions used to have empty stubs, but that might have changed with switching to MUSL.
Reply all
Reply to author
Forward
0 new messages