Opened 10 months ago
Last modified 4 months ago
#69179 assigned enhancement
protobuf3-cpp: include static libraries
Reported by: | ChrisDodd (Chris Dodd) | Owned by: | mascguy (Christopher Nielsen) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | achernya (Alex Chernyakhovsky) | |
Port: | protobuf3-cpp |
Description
It seems this port only comes with dynamic libraries -- the static libraries are missing?
Change History (3)
comment:1 Changed 10 months ago by ryandesign (Ryan Carsten Schmidt)
Owner: | set to mascguy |
---|---|
Status: | new → assigned |
Summary: | protobuf3-cpp does not include static libraries → protobuf3-cpp: include static libraries |
Type: | defect → enhancement |
comment:2 Changed 4 months ago by achernya (Alex Chernyakhovsky)
Is there a workaround that can be used in the short term to get a libprotobuf.a via macports?
comment:3 Changed 4 months ago by ryandesign (Ryan Carsten Schmidt)
Cc: | achernya added |
---|
If you just want a static libprotobuf.a to use for your own purposes, and you want to use MacPorts to build it, you could edit the protobuf3-cpp portfile (sudo port edit protobuf3-cpp
), change -DBUILD_SHARED_LIBS:BOOL=ON
to -DBUILD_SHARED_LIBS:BOOL=OFF
, forcibly uninstall the protobuf3-cpp port if you already have it installed (sudo port -f uninstall protobuf3-cpp
), then install it from source (sudo port -s install protobuf3-cpp
). Hopefully this works and the port then contains libprotobuf.a which you can copy to wherever you need it. Be sure to uninstall this nonstandard protobuf3-cpp port, undo your edits to the portfile, and reinstall the standard one right away or you will cause problems for ports that depend on protobuf3-cpp.
Because protobuf3-cpp uses CMake. Read comment:ticket:65788:5 to learn why that causes this problem.