Skip to content

ProtoBuf2.5.0 Mac M1 cpu make failed #8836

Closed
@QinchengZhang

Description

@QinchengZhang

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

Activity

tianhong-1

tianhong-1 commented on Jul 27, 2021

@tianhong-1

help! me too

fowles

fowles commented on Jul 27, 2021

@fowles
Contributor

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

tianhong-1

tianhong-1 commented on Jul 27, 2021

@tianhong-1

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

My project needs this version

fowles

fowles commented on Jul 27, 2021

@fowles
Contributor

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

tianhong-1

tianhong-1 commented on Jul 27, 2021

@tianhong-1

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

tianhong-1

tianhong-1 commented on Jul 27, 2021

@tianhong-1

./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

DapengShi commented on Aug 4, 2021

@DapengShi

@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

rangareddy commented on Jul 20, 2023

@rangareddy

Hi @DapengShi

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

vi src/google/protobuf/stubs/platform_macros.h

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

Add the above code before the following line:

#else
#error Host architecture was not detected as supported by protobuf
#endif
Screenshot 2024-10-10 at 9 50 12 AM
Pradeepshivaram

Pradeepshivaram commented on Apr 2, 2024

@Pradeepshivaram

Hello @DapengShi

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

mrtisttt

mrtisttt commented on Sep 27, 2024

@mrtisttt

It works. Thanks~

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @fowles@elharo@rangareddy@Pradeepshivaram@QinchengZhang

        Issue actions

          ProtoBuf2.5.0 Mac M1 cpu make failed · Issue #8836 · protocolbuffers/protobuf