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

[grpc] 1.68 Build on Windows produce huge lib files #43454

Open
magnesj opened this issue Jan 24, 2025 · 3 comments
Open

[grpc] 1.68 Build on Windows produce huge lib files #43454

magnesj opened this issue Jan 24, 2025 · 3 comments
Assignees
Labels
depends:upstream-changes Waiting on a change to the upstream project

Comments

@magnesj
Copy link

magnesj commented Jan 24, 2025

When building grpc 1.68 using default settings on Windows produce huge lib files. In the workflow we are using, the lib file is too big to fit into the cache for vcpkg on GitHub Actions. This causes very long build times, as grpc has to build from source on every run.

Here is a listing of file sizes compared to other libraries we build.

Image

Proposed solution

Reduce file size on disk.

Describe alternatives you've considered

No response

Additional context

No response

@magnesj magnesj added the category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist label Jan 24, 2025
@JonLiu1993 JonLiu1993 added depends:upstream-changes Waiting on a change to the upstream project and removed category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist labels Jan 26, 2025
@JonLiu1993
Copy link
Member

@magnesj, Thanks for your issue, The upstream should decide whether to delete so many lib files generated by grpc. I noticed that you have submitted an issue upstream. Let's track it in the issue grpc/grpc#38560.

@magnesj
Copy link
Author

magnesj commented Jan 28, 2025

Using dumpbin on Windows shows that there are large debug sections in grpc.lib the release build folder. I am using vcpkg.json and the triplet x64-windows-release

Here is our vcpkg.json https://github.com/OPM/ResInsight/blob/dev/vcpkg.json

Any hints on how to avoid debug symbols in release builds?

c:\gitroot\ResInsight\ThirdParty\vcpkg\buildtrees\grpc\x64-windows-rel>dumpbin grpc.lib
Microsoft (R) COFF/PE Dumper Version 14.42.34436.0
Copyright (C) Microsoft Corporation.  All rights reserved.


Dump of file grpc.lib

File Type: LIBRARY

  Summary

         860 .CRT$XCU
          10 .CRT$XDU
        4AC0 .bss
      801230 .chks64
        AA81 .data
        B382 .data$r
       4BF73 .data$rs
    2B7861C8 .debug$S
    3237733C .debug$T
       3ABDD .drectve
      142D40 .pdata
       EDB33 .rdata
       8C510 .rdata$r
        7C4A .text$di
      F6098D .text$mn
       83505 .text$x
           C .text$yd
         2E5 .tls$
        ADF8 .voltbl
      24AAAA .xdata
        C6C8 .xdata$x

Snapshot of the Release and Debug folders sorted by file size

Image

@magnesj
Copy link
Author

magnesj commented Jan 28, 2025

Here is a minimal project having only grpc as a dependency.
https://github.com/magnesj/minimal-grpc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
depends:upstream-changes Waiting on a change to the upstream project
Projects
None yet
Development

No branches or pull requests

2 participants