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

ProtoBuf2.5.0 Mac M1 cpu make failed #8836

Closed
QinchengZhang opened this issue Jul 27, 2021 · 9 comments
Closed

ProtoBuf2.5.0 Mac M1 cpu make failed #8836

QinchengZhang opened this issue Jul 27, 2021 · 9 comments

Comments

@QinchengZhang
Copy link

What version of protobuf and what language are you using?
Version: v2.5.0
Language: C++

What operating system (Linux, Windows, ...) and version?
macOS Big Sur 11.5 (20G71)

What runtime / compiler are you using (e.g., python version or gcc version)
Apple clang version 12.0.5 (clang-1205.0.22.11)

What did you do?
Steps to reproduce the behavior:
./configure
sudo make && make install

What did you see instead?
fatal error: too many errors emitted, stopping now [-ferror-limit=]
9 warnings and 20 errors generated.
make[2]: *** [atomicops_internals_x86_gcc.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).

Anything else we should know about your project / environment

@tianhong-1
Copy link

help! me too

@fowles
Copy link
Member

fowles commented Jul 27, 2021

This is a fairly old release. Does this issue persist on 3.17.x ?

@tianhong-1
Copy link

This is a fairly old release. Does this issue persist on 3.17.x ?

My project needs this version

@fowles
Copy link
Member

fowles commented Jul 27, 2021

Unfortunately, supporting all old releases on new hardware and new toolchains is not a thing we likely to spend resources on.

@tianhong-1
Copy link

Unfortunately, supporting all old releases on new hardware and new toolchains is not a thing we likely to spend resources on.
thanks

@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

Does anyone have an idea?

@DapengShi
Copy link

DapengShi commented Aug 4, 2021

@xuexuelove
I meet the same question. To resolve it, I have added
#elif defined(__arm64__) #define GOOGLE_PROTOBUF_ARCH_ARM 1 #define GOOGLE_PROTOBUF_ARCH_64_BIT 1
before
#else #error Host architecture was not detected as supported by protobuf
in src/google/protobuf/stubs/platform_macros.h for version 2.5.0
, then I made install successfully. Maybe you can try it.

@rangareddy
Copy link

rangareddy commented Jul 20, 2023

Hi @DapengShi

I am able to resolve the issue with your comment. Thank you very much.

#elif defined(__arm64__)
#define GOOGLE_PROTOBUF_ARCH_ARM 1
#define GOOGLE_PROTOBUF_ARCH_64_BIT 1

@Pradeepshivaram
Copy link

Pradeepshivaram commented Apr 2, 2024

Hello @DapengShi

I can install it on the Mac M1 chip with your changes. Thanks a lot.

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

7 participants