Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Struggling with building runtime on Linux for c++

53 views
Skip to first unread message

Brian Sassone

unread,
Feb 14, 2025, 5:03:30 AMFeb 14
to Protocol Buffers
Is it possible to build the runtime as a static lib? If so, how do I do this with bazel?  There is no applicable target and this build system is not something I'm familiar with.

Tried using cmake, but that brings up a whole slew of other issues. Sigh.

I've compiled all kinds of 3rdparty packages on various OS's and have never struggled like this. Very frustrating.

-b

Brian Sassone

unread,
Feb 14, 2025, 10:32:49 AMFeb 14
to Protocol Buffers
Better luck today using top of tree. Branch 29.3 build seems broken in various ways. Here's what worked using cmake:

cd protobuf
mkdir build
cd build
cmake \
    -Dprotobuf_BUILD_TESTS=OFF \
    -Dprotobuf_BUILD_EXAMPLES=OFF \
    -Dprotobuf_BUILD_SHARED_LIBS=OFF \
    -DCMAKE_CXX_STANDARD=17 \
    ..
make

Brian Sassone

unread,
Feb 14, 2025, 11:47:23 AMFeb 14
to Protocol Buffers
Now on to linking.... 98 independent absl static libs? Really? Would it not be possible to simply combine the ones protobuf is dependent on?  

In another post there was a mention about this being "bad practice". In who's world is it bad practice to make it easy to use a third party library?
Reply all
Reply to author
Forward
0 new messages