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

[protobuf] Should not build static libraries for x86-windows #149

Closed
ras0219-msft opened this issue Oct 12, 2016 · 8 comments
Closed

[protobuf] Should not build static libraries for x86-windows #149

ras0219-msft opened this issue Oct 12, 2016 · 8 comments
Labels
category:port-bug The issue is with a library, which is something the port should already support

Comments

@ras0219-msft
Copy link
Contributor

No description provided.

@ras0219-msft ras0219-msft added the category:port-bug The issue is with a library, which is something the port should already support label Oct 12, 2016
@KindDragon
Copy link
Contributor

Why static?

@ras0219-msft
Copy link
Contributor Author

ras0219-msft commented Oct 12, 2016

Sorry, the title isn't clear enough. The bug is that static libraries are currently being built when using the x86-windows triplet. That triplet should receive DLLs; the x86-windows-static triplet should receive static libraries.

The currently most robust way to test for whether to build static or DLL is the VCPKG_LIBRARY_LINKAGE property, as seen in https://github.com/Microsoft/vcpkg/blob/master/ports/zlib/portfile.cmake. This variable will be made available via the include(${CMAKE_TRIPLET_FILE}) directive, which pulls in the appropriate triplets\<tripletname>.cmake.

@ras0219-msft ras0219-msft changed the title [protobuf] Builds static libraries for x86-windows [protobuf] Should not build static libraries for x86-windows Oct 13, 2016
@KindDragon
Copy link
Contributor

KindDragon commented Oct 13, 2016

I remembered why I did it. I specifically build protobuf static library, otherwise, it was impossible to build grpc because of protocolbuffers/protobuf#2219

@ras0219-msft
Copy link
Contributor Author

Given the general response in the protobuf thread, I'd be happy to apply protocolbuffers/protobuf#2227 locally if you'd be willing to submit a PR here with the diff for it as a patch (https://patch-diff.githubusercontent.com/raw/google/protobuf/pull/2227.diff).

@dzenanz
Copy link
Contributor

dzenanz commented Jan 12, 2017

protocolbuffers/protobuf#2227 has been merged on Dec 16th and protocolbuffers/protobuf#2219 was fixed on Dec 23rd. Can we get grpc #535 building, either static or DLLs?

@KindDragon
Copy link
Contributor

IDK, maybe better wait for the release with this commit or apply commit as the patch to latest protobuf release.

@jozefizso
Copy link
Contributor

Does protobuf support DLL linkage?

@KindDragon
Copy link
Contributor

Yes

dempo93 pushed a commit to dempo93/vcpkg that referenced this issue Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support
Projects
None yet
Development

No branches or pull requests

4 participants