Skip to content

Instantly share code, notes, and snippets.

@rajkrrsingh
Created November 27, 2016 10:57
Show Gist options
  • Star 44 You must be signed in to star a gist
  • Fork 20 You must be signed in to fork a gist
  • Save rajkrrsingh/77f3c4d20c109c96a3e9b36c224c6b3d to your computer and use it in GitHub Desktop.
Save rajkrrsingh/77f3c4d20c109c96a3e9b36c224c6b3d to your computer and use it in GitHub Desktop.
Steps to Install google protobuf on Mac
$wget https://github.com/google/protobuf/releases/download/v2.5.0/protobuf-2.5.0.tar.bz2
$tar xvf protobuf-2.5.0.tar.bz2
$cd protobuf-2.5.0
$./configure CC=clang CXX=clang++ CXXFLAGS='-std=c++11 -stdlib=libc++ -O3 -g' LDFLAGS='-stdlib=libc++' LIBS="-lc++ -lc++abi"
$make -j 4
$sudo make install
$protoc --version
@tianhong-1
Copy link

tianhong-1 commented Jul 27, 2021

Anyone got this working on Apple silicon?

No works

@tianhong-1
Copy link

Failed on mac big sur, exception like this:
./google/protobuf/stubs/atomicops_internals_macosx.h:158:43: error: unknown type name 'Atomic64'; did you mean 'Atomic32'?
Atomic64 increment) {
^~~~~~~~
Atomic32
Does anyone have an idea?

me too

@tianhong-1
Copy link

Failed on mac big sur, exception like this:
./google/protobuf/stubs/atomicops_internals_macosx.h:158:43: error: unknown type name 'Atomic64'; did you mean 'Atomic32'?
Atomic64 increment) {
^~~~~~~~
Atomic32
Does anyone have an idea?

Have you solved it?

@tianhong-1
Copy link

./google/protobuf/stubs/atomicops_internals_macosx.h:157:52: error: unknown type name 'Atomic64'; did you mean 'Atomic32'?
inline Atomic64 NoBarrier_AtomicIncrement(volatile Atomic64* ptr,
^~~~~~~~
Atomic32

@valiantljk
Copy link

Thanks

@lijunldn
Copy link

lijunldn commented Aug 28, 2021

Thanks! It worked on my macOS Catalina v10.16.7

@chenchun
Copy link

Failed on mac big sur, exception like this:
./google/protobuf/stubs/atomicops_internals_macosx.h:158:43: error: unknown type name 'Atomic64'; did you mean 'Atomic32'?
Atomic64 increment) {
^~~~~~~~
Atomic32
Does anyone have an idea?

Have you solved it?

I find it worked following protocolbuffers/protobuf#8836 (comment)

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