Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.
brew update and can still reproduce the problem?brew doctor, fixed all issues and can still reproduce the problem?brew gist-logs <formula> (where <formula> is the name of the formula that failed) and included the output link?Gist: https://gist.github.com/fd7cb87288b364bb0d18767416261e91
Compile my project using Homebrew's emscripten package.
Command output
位 emcc -s USE_SDL=2 -s USE_SDL_IMAGE=2 -s USE_SDL_MIXER=2 -s USE_SDL_TTF=2 -Wall -Wextra -std=c99 source/basque.c '-Wl,-rpath,$ORIGIN' $(/usr/local/Cellar/emscripten/2.0.emscripten sdl-config called with /usr/local/Cellar/emscripten/2.0.7/libexec/system/bin/sdl-config --cflags --libs
cache:INFO: generating port: libSDL2.a... (this will be cached in "/usr/local/Cellar/emscripten/2.0.7/libexec/cache/wasm/libSDL2.a" for subsequent builds)
cache:INFO: - ok
cache:INFO: generating port: libSDL2_image.a... (this will be cached in "/usr/local/Cellar/emscripten/2.0.7/libexec/cache/wasm/libSDL2_image.a" for subsequent builds)
cache:INFO: - ok
cache:INFO: generating port: libfreetype.a... (this will be cached in "/usr/local/Cellar/emscripten/2.0.7/libexec/cache/wasm/libfreetype.a" for subsequent builds)
cache:INFO: - ok
cache:INFO: generating port: libSDL2_ttf.a... (this will be cached in "/usr/local/Cellar/emscripten/2.0.7/libexec/cache/wasm/libSDL2_ttf.a" for subsequent builds)
cache:INFO: - ok
cache:INFO: generating system library: libogg.a... (this will be cached in "/usr/local/Cellar/emscripten/2.0.7/libexec/cache/wasm/libogg.a" for subsequent builds)
root:INFO: building port: ogg
cache:INFO: - ok
cache:INFO: generating system library: libvorbis.a... (this will be cached in "/usr/local/Cellar/emscripten/2.0.7/libexec/cache/wasm/libvorbis.a" for subsequent builds)
root:INFO: building port: vorbis
cache:INFO: - ok
cache:INFO: generating port: libSDL2_mixer_ogg.a... (this will be cached in "/usr/local/Cellar/emscripten/2.0.7/libexec/cache/wasm/libSDL2_mixer_ogg.a" for subsequent builds)
root:INFO: building port: sdl2_mixer
cache:INFO: - ok
emcc: warning: ignoring unsupported linker flag: -rpath [-Wlinkflags]
cache:INFO: generating system library: libgl.a... (this will be cached in "/usr/local/Cellar/emscripten/2.0.7/libexec/cache/wasm/libgl.a" for subsequent builds)
cache:INFO: - ok
cache:INFO: generating system library: libc.a... (this will be cached in "/usr/local/Cellar/emscripten/2.0.7/libexec/cache/wasm/libc.a" for subsequent builds)
cache:INFO: - ok
cache:INFO: generating system library: libcompiler_rt.a... (this will be cached in "/usr/local/Cellar/emscripten/2.0.7/libexec/cache/wasm/libcompiler_rt.a" for subsequent builds)
cache:INFO: - ok
cache:INFO: generating system library: libc++-noexcept.a... (this will be cached in "/usr/local/Cellar/emscripten/2.0.7/libexec/cache/wasm/libc++-noexcept.a" for subsequent builds)
cache:INFO: - ok
cache:INFO: generating system library: libc++abi-noexcept.a... (this will be cached in "/usr/local/Cellar/emscripten/2.0.7/libexec/cache/wasm/libc++abi-noexcept.a" for subsequent builds)
cache:INFO: - ok
cache:INFO: generating system library: libdlmalloc.a... (this will be cached in "/usr/local/Cellar/emscripten/2.0.7/libexec/cache/wasm/libdlmalloc.a" for subsequent builds)
cache:INFO: - ok
cache:INFO: generating system library: libpthread_stub.a... (this will be cached in "/usr/local/Cellar/emscripten/2.0.7/libexec/cache/wasm/libpthread_stub.a" for subsequent builds)
cache:INFO: - ok
cache:INFO: generating system library: libc_rt_wasm.a... (this will be cached in "/usr/local/Cellar/emscripten/2.0.7/libexec/cache/wasm/libc_rt_wasm.a" for subsequent builds)
cache:INFO: - ok
cache:INFO: generating system library: libsockets.a... (this will be cached in "/usr/local/Cellar/emscripten/2.0.7/libexec/cache/wasm/libsockets.a" for subsequent builds)
cache:INFO: - ok
error: undefined symbol: __invoke_i32_$struct_FT_CMap_ClassRec__i8_$struct_FT_CharMapRec__$struct_FT_CMapRec_* (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: ___invoke_i32_$struct_FT_CMap_ClassRec__i8_$struct_FT_CharMapRec__$struct_FT_CMapRec_* may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: __invoke_i32_$struct_FT_Outline__$struct_FT_Outline_Funcs__i8* (referenced by top-level compiled C/C++ code)
warning: ___invoke_i32_$struct_FT_Outline__$struct_FT_Outline_Funcs__i8* may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: __invoke_i32_i8_$struct_FT_ValidatorRec_ (referenced by top-level compiled C/C++ code)
warning: ___invoke_i32_i8_$struct_FT_ValidatorRec_ may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: __invoke_void_$struct_FT_ValidatorRec__i8_i8_i32 (referenced by top-level compiled C/C++ code)
warning: ___invoke_void_$struct_FT_ValidatorRec__i8_i8_i32 may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: __invoke_void_$struct_gray_TWorker_* (referenced by top-level compiled C/C++ code)
warning: ___invoke_void_$struct_gray_TWorker_* may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: emscripten_longjmp_jmpbuf (referenced by top-level compiled C/C++ code)
warning: _emscripten_longjmp_jmpbuf may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
Error: Aborting compilation due to previous errors
emcc: error: '/usr/local/opt/node@12/bin/node /usr/local/Cellar/emscripten/2.0.7/libexec/src/compiler.js /var/folders/mh/r7jf7pqj7fbc3267y21r4vsck30y5r/T/tmp0mx2lggd.txt' failed (1)
I expected a .wasm file to be generated.
brew install commands)git clone [email protected]:ryanpcmcquen/basque.git
cd basque
brew install emscripten
emcc -s USE_SDL=2 -s USE_SDL_IMAGE=2 -s USE_SDL_MIXER=2 -s USE_SDL_TTF=2 -Wall -Wextra -std=c99 source/basque.c
A .wasm is generated with the same command using the upstream version of emsdk:
https://github.com/emscripten-core/emsdk
Here's the issue I logged against upstream originally:
https://github.com/emscripten-ports/SDL2_mixer/issues/2
Looks like we'll have to track the DEPS file described at https://github.com/emscripten-core/emscripten/blob/master/docs/packaging.md for LLVM. binaryen and emscripten tend to track pretty closely with releases, so we shouldn't track binaryen (or else this would be problematic, as we only ship tagged releases of binaryen in the formula, not any random revisions).
I managed to reproduce your error via your reproduction instructions with the current version of emscripten that we ship; it seemed to build fine after the changes to emscripten in #63183. Hopefully that should do the trick.
Most helpful comment
I managed to reproduce your error via your reproduction instructions with the current version of
emscriptenthat we ship; it seemed to build fine after the changes toemscriptenin #63183. Hopefully that should do the trick.