-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Fix build with -DCLR_CMAKE_USE_SYSTEM_BROTLI=true #110816
Fix build with -DCLR_CMAKE_USE_SYSTEM_BROTLI=true #110816
Conversation
88f19ab
to
5e42b11
Compare
find_library(BROTLIDEC brotlidec REQUIRED) | ||
find_library(BROTLIENC brotlienc REQUIRED) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move these into Compression.Native/CMakeLists.txt and add the two libraries to the BROTLI_LIBRARIES variable? That would keep all of the brotli handling together.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the updated change look okay?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait, this doesn't work at all :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, because src/native/corehost/apphost/static/CMakeLists.txt only includes NATIVE_LIBS
runtime/src/native/corehost/apphost/static/CMakeLists.txt
Lines 183 to 185 in d7e85d9
# additional requirements for System.IO.Compression.Native | |
include(${CLR_SRC_NATIVE_DIR}/libs/System.IO.Compression.Native/extra_libs.cmake) | |
append_extra_compression_libs(NATIVE_LIBS) |
Should it include BROTLI_LIBRARIES
under a CLR_CMAKE_USE_SYSTEM_BROTL
conditional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The BROTLI_LIBRARIES
values should be propagated up to the static apphost due to
target_link_libraries(System.IO.Compression.Native-Static PUBLIC ${BROTLI_LIBRARIES}) |
and
target_link_libraries(System.IO.Compression.Native-Static PUBLIC ${BROTLI_LIBRARIES}) |
You can change it back to how it was before to unblock and I can investigate later.
5e42b11
to
aa6a70b
Compare
Currently, this fails on Fedora 41: $ ./build.sh --cmakeargs -DCLR_CMAKE_USE_SYSTEM_BROTLI=true /p:FullAssemblySigningSupported=false ... [100%] Linking CXX executable singlefilehost ld.lld: error: undefined symbol: BrotliDecoderCreateInstance >>> referenced by entrypoints.c >>> entrypoints.c.o:(s_compressionNative) in archive ../libs-native/System.IO.Compression.Native/libSystem.IO.Compression.Native.a This seems to be a regression introduced when this bit was accidentally dropped: https://github.com/dotnet/runtime/pull/109707/files#diff-7a160e52815fdd808d9415ada41dd5b1748826b27c78277e14f4adcf1ce61511 Fix the build by re-introducing it. Fixes: dotnet#110751
aa6a70b
to
6acd94c
Compare
Currently, this fails on Fedora 41:
This seems to be a regression introduced when this bit was accidentally dropped:
https://github.com/dotnet/runtime/pull/109707/files#diff-7a160e52815fdd808d9415ada41dd5b1748826b27c78277e14f4adcf1ce61511
Fix the build by re-introducing it.
Fixes: #110751