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

Too large grpc.lib file on Windows #38560

Closed
magnesj opened this issue Jan 24, 2025 · 2 comments
Closed

Too large grpc.lib file on Windows #38560

magnesj opened this issue Jan 24, 2025 · 2 comments

Comments

@magnesj
Copy link

magnesj commented Jan 24, 2025

What version of gRPC and what language are you using?

1.68 c++

What operating system (Linux, Windows,...) and version?

Windows 11
MSVC 17.12.4

What runtime / compiler are you using (e.g. python version or version of gcc)

MSVC 17.12.4

What did you do?

Created a build of grpc using vcpkg

What did you expect to see?

A generated file that can fit into build cache on GitHub Action.

What did you see instead?

A very large lib-file that was rejected by the build cache on GitHub Action.

Anything else we should know about your project / environment?

Issue reported in vcpkg microsoft/vcpkg#43454

File size on disk for some libraries in the same build:

Image

@veblush
Copy link
Contributor

veblush commented Jan 28, 2025

I'm unfamiliar with the specifics of how vcpkg builds grpc.lib (and I should mention that vcpkg isn't something we maintain). Could you investigate the contents of those library files? I'm particularly interested in whether they might include debugging symbols.

@magnesj
Copy link
Author

magnesj commented Jan 28, 2025

Thanks for your reply.

You are right, the output from dumpbin indicates a large section with debug info. I have instructed vcpkg to build only release, but this does clearly not work as expected. Do you have any recommendations for a static release build on Windows?

We have use grpc for some years now and the binary size of the lib file has increased significantly lately.

Here is the vcpkg build configuration
https://github.com/microsoft/vcpkg/blob/master/ports/grpc/portfile.cmake

Output from dumpbin

c:\gitroot\ResInsight\build\vcpkg_installed\x64-windows\lib>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
    2B846640 .debug$S
    323D5760 .debug$T
       3ABDD .drectve
      142D40 .pdata
       EE577 .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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants