Skip to content

Commit

Permalink
Fix build with -DCLR_CMAKE_USE_SYSTEM_BROTLI=true
Browse files Browse the repository at this point in the history
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: #110751
  • Loading branch information
omajid committed Dec 18, 2024
1 parent efb8a8f commit aa6a70b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/native/libs/System.IO.Compression.Native/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ if (NOT CLR_CMAKE_USE_SYSTEM_ZLIB)
endif()

if (CLR_CMAKE_USE_SYSTEM_BROTLI)
find_library(BROTLIDEC brotlidec REQUIRED)
find_library(BROTLIENC brotlienc REQUIRED)
list(APPEND ${BROTLI_LIBRARIES} ${BROTLIDEC} ${BROTLIENC})

if (CLR_CMAKE_HOST_FREEBSD)
set(CMAKE_REQUIRED_INCLUDES ${CROSS_ROOTFS}/usr/local/include)
endif()
Expand Down

0 comments on commit aa6a70b

Please sign in to comment.