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

Build fails with -DCLR_CMAKE_USE_SYSTEM_BROTLI=true #110751

Open
omajid opened this issue Dec 16, 2024 · 4 comments
Open

Build fails with -DCLR_CMAKE_USE_SYSTEM_BROTLI=true #110751

omajid opened this issue Dec 16, 2024 · 4 comments
Assignees
Labels
area-System.IO.Compression untriaged New issue has not been triaged by the area owner

Comments

@omajid
Copy link
Member

omajid commented Dec 16, 2024

Description

Building the runtime with system brotli fails in the main branch

Reproduction Steps

$ git rev-parse HEAD
efb8a8fe6263cb66c154576c859523e885dc5a24
$ git branch -lv
* main efb8a8fe626 [browser] Speed up `WasmBuildTests` by using the compression switch (#110645)
$ ./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                                                                                                                                                                           
                                                                                                                                                                                                                                                                                                                             
  ld.lld: error: undefined symbol: BrotliDecoderDecompress                                                                                                    
  >>> referenced by entrypoints.c                                                                                                                             
  >>>               entrypoints.c.o:(s_compressionNative) in archive ../libs-native/System.IO.Compression.Native/libSystem.IO.Compression.Native.a       
                                                                                                                                                                                                                                                                                                                             
  ld.lld: error: undefined symbol: BrotliDecoderDecompressStream                                                                                              
  >>> referenced by entrypoints.c                                                                                                                             
  >>>               entrypoints.c.o:(s_compressionNative) in archive ../libs-native/System.IO.Compression.Native/libSystem.IO.Compression.Native.a          
                                                                                                                                                                                                                                                                                                                             
  ld.lld: error: undefined symbol: BrotliDecoderDestroyInstance                                                                                                                                                                                                                                                              
  >>> referenced by entrypoints.c                                                                                                                                                                                                                                                                                            
  >>>               entrypoints.c.o:(s_compressionNative) in archive ../libs-native/System.IO.Compression.Native/libSystem.IO.Compression.Native.a                                                                                                                                                                           
                                                                                                                                                                                                                                                                                                                             
  ld.lld: error: undefined symbol: BrotliDecoderIsFinished                                                                                                                                                                                                                                                                   
  >>> referenced by entrypoints.c                                                                                                                                                                                                                                                                                            
  >>>               entrypoints.c.o:(s_compressionNative) in archive ../libs-native/System.IO.Compression.Native/libSystem.IO.Compression.Native.a                                                                                                                                                                           
                                                                                                                                                                                                                                                                                                                             
  ld.lld: error: undefined symbol: BrotliEncoderCompress                                                                                                      
  >>> referenced by entrypoints.c                                                                                                                             
  >>>               entrypoints.c.o:(s_compressionNative) in archive ../libs-native/System.IO.Compression.Native/libSystem.IO.Compression.Native.a                                                                                                                                                                           
                                                                                                                                                              
  ld.lld: error: undefined symbol: BrotliEncoderCompressStream                                                                                                
  >>> referenced by entrypoints.c                                                                                                                             
  >>>               entrypoints.c.o:(s_compressionNative) in archive ../libs-native/System.IO.Compression.Native/libSystem.IO.Compression.Native.a                                                                                                                                                                           
                                                                                                                                                                                                                                                                                                                             
  ld.lld: error: undefined symbol: BrotliEncoderCreateInstance                                                                                                
  >>> referenced by entrypoints.c                                                                                                                             
  >>>               entrypoints.c.o:(s_compressionNative) in archive ../libs-native/System.IO.Compression.Native/libSystem.IO.Compression.Native.a                                                                                                                                                                           
                                                                                                                                                              
  ld.lld: error: undefined symbol: BrotliEncoderDestroyInstance                                                                                               
  >>> referenced by entrypoints.c                                                                                                                             
  >>>               entrypoints.c.o:(s_compressionNative) in archive ../libs-native/System.IO.Compression.Native/libSystem.IO.Compression.Native.a        
                                              
  ld.lld: error: undefined symbol: BrotliEncoderHasMoreOutput 
  >>> referenced by entrypoints.c
  >>>               entrypoints.c.o:(s_compressionNative) in archive ../libs-native/System.IO.Compression.Native/libSystem.IO.Compression.Native.a
   
  ld.lld: error: undefined symbol: BrotliEncoderMaxCompressedSize
  >>> referenced by entrypoints.c
  >>>               entrypoints.c.o:(s_compressionNative) in archive ../libs-native/System.IO.Compression.Native/libSystem.IO.Compression.Native.a
   
  ld.lld: error: undefined symbol: BrotliEncoderSetParameter    
  >>> referenced by entrypoints.c
  >>>               entrypoints.c.o:(s_compressionNative) in archive ../libs-native/System.IO.Compression.Native/libSystem.IO.Compression.Native.a
  clang++-19: error: linker command failed with exit code 1 (use -v to see invocation)                                                                        
  make[2]: *** [Corehost.Static/CMakeFiles/singlefilehost.dir/build.make:1303: Corehost.Static/singlefilehost] Error 1                                        
  make[1]: *** [CMakeFiles/Makefile2:2191: Corehost.Static/CMakeFiles/singlefilehost.dir/all] Error 2      

Expected behavior

Build works

Actual behavior

Linker fails to assemble an executable

Regression?

Yes. This was working some time ago.

Known Workarounds

No response

Configuration

  • This is main branch of dotnet/runtime
  • Fedora 41 on x64 (aka x86_64)

Other information

No response

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Dec 16, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Dec 16, 2024
@omajid
Copy link
Member Author

omajid commented Dec 16, 2024

cc @tmds

@tmds
Copy link
Member

tmds commented Dec 16, 2024

#109105 got closed when #109707 was merged. That makes #109707 a likely suspect for this regression.

@jkotas jkotas added area-System.IO.Compression and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Dec 16, 2024
@jkotas
Copy link
Member

jkotas commented Dec 16, 2024

cc @jkoritzinsky

Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-io-compression
See info in area-owners.md if you want to be subscribed.

@jkoritzinsky jkoritzinsky self-assigned this Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.IO.Compression untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

No branches or pull requests

4 participants