-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
[libflac] Fix WASM build by disabling stack protector via feature #37086
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 tasks
Feature
|
MonicaLiu0311
approved these changes
Mar 4, 2024
fwcd
added a commit
to fwcd/vcpkg
that referenced
this pull request
Mar 5, 2024
…crosoft#37086) This fixes the `wasm32-emscripten` build of `libflac`, which would previously fail with <details> <summary>Linking Errors</summary> ``` [59/61] : && /opt/homebrew/Cellar/emscripten/3.1.54/libexec/emcc -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return -Wcast-align -Wnested-externs -Wshadow -Wundef -Wmissing-declarations -Winline -DNDEBUG -O3 -DNDEBUG microbench/CMakeFiles/benchmark_residual.dir/benchmark_residual.c.o microbench/CMakeFiles/benchmark_residual.dir/util.c.o -o microbench/benchmark_residual.js src/libFLAC/libFLAC.a -lrt -lm <path to vcpkg>/installed/wasm32-emscripten-release/lib/libogg.a && : FAILED: microbench/benchmark_residual.js : && /opt/homebrew/Cellar/emscripten/3.1.54/libexec/emcc -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return -Wcast-align -Wnested-externs -Wshadow -Wundef -Wmissing-declarations -Winline -DNDEBUG -O3 -DNDEBUG microbench/CMakeFiles/benchmark_residual.dir/benchmark_residual.c.o microbench/CMakeFiles/benchmark_residual.dir/util.c.o -o microbench/benchmark_residual.js src/libFLAC/libFLAC.a -lrt -lm <path to vcpkg>/installed/wasm32-emscripten-release/lib/libogg.a && : wasm-ld: error: microbench/CMakeFiles/benchmark_residual.dir/benchmark_residual.c.o: undefined symbol: __stack_chk_guard wasm-ld: error: microbench/CMakeFiles/benchmark_residual.dir/benchmark_residual.c.o: undefined symbol: __stack_chk_guard wasm-ld: error: microbench/CMakeFiles/benchmark_residual.dir/benchmark_residual.c.o: undefined symbol: __stack_chk_fail wasm-ld: error: microbench/CMakeFiles/benchmark_residual.dir/benchmark_residual.c.o: undefined symbol: __stack_chk_guard wasm-ld: error: microbench/CMakeFiles/benchmark_residual.dir/benchmark_residual.c.o: undefined symbol: __stack_chk_guard wasm-ld: error: microbench/CMakeFiles/benchmark_residual.dir/benchmark_residual.c.o: undefined symbol: __stack_chk_fail ``` </details> The stack protector flag is [documented here](https://github.com/xiph/flac/blob/66152791d828e06321e6f92611062118562e7db0/CMakeLists.txt#L21) and is [unsupported in Emscripten](emscripten-core/emscripten#17030). ### Checklist - [x] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md). - [x] SHA512s are updated for each updated download. - [x] The "supports" clause reflects platforms that may be fixed by this new version. - [x] Any fixed [CI baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt) entries are removed from that file. - [x] Any patches that are no longer applied are deleted from the port's directory. - [x] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [x] Only one version is added to each modified port's versions file.
This was referenced Mar 5, 2024
vicroms
pushed a commit
that referenced
this pull request
Mar 6, 2024
A small follow-up to #37086, which unintentionally disabled the stack protector on non-WASM platforms. This adds it to the set of default features (on all non-WASM platforms), which should fix this. - [x] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md). - [x] SHA512s are updated for each updated download. - [x] The "supports" clause reflects platforms that may be fixed by this new version. - [x] Any fixed [CI baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt) entries are removed from that file. - [x] Any patches that are no longer applied are deleted from the port's directory. - [x] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [x] Only one version is added to each modified port's versions file.
fwcd
added a commit
to fwcd/vcpkg
that referenced
this pull request
Mar 6, 2024
A small follow-up to microsoft#37086, which unintentionally disabled the stack protector on non-WASM platforms. This adds it to the set of default features (on all non-WASM platforms), which should fix this. - [x] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md). - [x] SHA512s are updated for each updated download. - [x] The "supports" clause reflects platforms that may be fixed by this new version. - [x] Any fixed [CI baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt) entries are removed from that file. - [x] Any patches that are no longer applied are deleted from the port's directory. - [x] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [x] Only one version is added to each modified port's versions file.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
category:port-feature
The issue is with a library, which is requesting new capabilities that didn’t exist
info:reviewed
Pull Request changes follow basic guidelines
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes the
wasm32-emscripten
build oflibflac
, which would previously fail withLinking Errors
The stack protector flag is documented here and is unsupported in Emscripten.
Checklist
./vcpkg x-add-version --all
and committing the result.