Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binaryen or LLVM versions not in sync for emscripten package #63176

Closed
3 tasks done
ryanpcmcquen opened this issue Oct 20, 2020 · 6 comments
Closed
3 tasks done

Binaryen or LLVM versions not in sync for emscripten package #63176

ryanpcmcquen opened this issue Oct 20, 2020 · 6 comments
Assignees
Labels
outdated PR was locked due to age stale No recent activity

Comments

@ryanpcmcquen
Copy link

Bug report

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.

  • ran brew update and can still reproduce the problem?
  • ran brew doctor, fixed all issues and can still reproduce the problem?
  • ran 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

What you were trying to do (and why)

Compile my project using Homebrew's emscripten package.

What happened (include command output)

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)

What you expected to happen

I expected a .wasm file to be generated.

Step-by-step reproduction instructions (by running 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:
emscripten-ports/SDL2_mixer#2

@alebcay
Copy link
Member

alebcay commented Oct 20, 2020

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).

@alebcay
Copy link
Member

alebcay commented Oct 21, 2020

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.

@BrewTestBot
Copy link
Member

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@BrewTestBot BrewTestBot added the stale No recent activity label Nov 26, 2020
@ryanpcmcquen
Copy link
Author

Tied to #63183.

@alebcay
Copy link
Member

alebcay commented Nov 27, 2020

@ryanpcmcquen, #63183 has been merged after some further changes. If you have a chance, could you please try to reproduce your issue again?

@alebcay
Copy link
Member

alebcay commented Nov 27, 2020

I attempted to reproduce the issue described in the original steps (building https://github.com/ryanpcmcquen/basque) and the compilation seems to be successful. Closing this for now, but please shout if something is still amiss.

@alebcay alebcay closed this as completed Nov 27, 2020
@BrewTestBot BrewTestBot added the outdated PR was locked due to age label Dec 28, 2020
@Homebrew Homebrew locked as resolved and limited conversation to collaborators Dec 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age stale No recent activity
Projects
None yet
Development

No branches or pull requests

3 participants