Google Protobuf will not build under ARM64

What steps will reproduce the problem?
1. Build Google protobuf code for ARM64 target

What is the expected output? What do you see instead?
I expected it to buid cleanly, instead I hit the "#error Host architecture was not detected as supported by protobuf" preprocessor macro.

What version of the product are you using? On what operating system?
I'm using protobuf-2.5.0 on MacOSX building for iOS 64-bit. 
 
 
I have a workaround. It build without error but I DIDN'T TEST IT ON A REAL DEVICE.
Could someone test it and tell us if it's ok ?

In platform_macros.h, Replace
#else
#error Host architecture was not detected as supported by protobuf
#endif

By:
#elif defined(__aarch64__)
#define GOOGLE_PROTOBUF_ARCH_ARM 1
#define GOOGLE_PROTOBUF_ARCH_64_BIT 1
#else
#error Host architecture was not detected as supported by protobuf
#endif

I checked on device (iPhone 5s). It works fine with this workaround.

 
文章来源:https://code.google.com/p/protobuf/issues/detail?id=575
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值