"Could not auto-detect platform"

40 views
Skip to first unread message

liu.x...@gmail.com

unread,
Jan 15, 2019, 5:13:30 AM1/15/19
to grpc.io
Hello, everyone,

I am right now doing the cross compilation according to this discussion: https://github.com/grpc/grpc/issues/9719 

and when I do 'make', I got errors like below, What's wrong with this?  THX a lot.

liu@liu-VirtualBox:~/Downloads/grpc$ make HAS_PKG_CONFIG=false CC=arm-none-eabi-gcc CXX=arm-none-eabi-g++ RANLIB=arm-none-eabi-gcc-ranlib LD=arm-none-eabi-ld LDXX=arm-none-eabi-g++ AR=arm-none-eabi-gcc-ar PROTOBUF_CONFIG_OPTS="--host=arm-none-eabi --with-protoc=/usr/local/bin/protoc" static




[MAKE]   Generating cache.mk

[CXX]    Compiling src/core/lib/gpr/alloc.cc

In file included from include/grpc/support/port_platform.h:22:0,

                 from src/core/lib/gpr/alloc.cc:19:

include/grpc/impl/codegen/port_platform.h:357:2: error: #error "Could not auto-detect platform"

 #error "Could not auto-detect platform"

  ^

include/grpc/impl/codegen/port_platform.h:392:2: error: #warning "GPR_PLATFORM_STRING not auto-detected" [-Werror=cpp]

 #warning "GPR_PLATFORM_STRING not auto-detected"

  ^

In file included from include/grpc/support/port_platform.h:22:0,

                 from src/core/lib/gpr/alloc.cc:19:

include/grpc/impl/codegen/port_platform.h:442:2: error: #error Must define exactly one of GPR_GCC_ATOMIC, GPR_GCC_SYNC, GPR_WINDOWS_ATOMIC

 #error Must define exactly one of GPR_GCC_ATOMIC, GPR_GCC_SYNC, GPR_WINDOWS_ATOMIC

  ^

include/grpc/impl/codegen/port_platform.h:446:2: error: #error Must define exactly one of GPR_ARCH_32, GPR_ARCH_64

 #error Must define exactly one of GPR_ARCH_32, GPR_ARCH_64

  ^

include/grpc/impl/codegen/port_platform.h:452:2: error: #error Must define exactly one of GPR_CPU_LINUX, GPR_CPU_POSIX, GPR_WINDOWS, GPR_CPU_IPHONE, GPR_CPU_CUSTOM

 #error Must define exactly one of GPR_CPU_LINUX, GPR_CPU_POSIX, GPR_WINDOWS, GPR_CPU_IPHONE, GPR_CPU_CUSTOM

  ^

include/grpc/impl/codegen/port_platform.h:458:2: error: #error Must define exactly one of GPR_MSVC_TLS, GPR_GCC_TLS, GPR_PTHREAD_TLS, GPR_CUSTOM_TLS

 #error Must define exactly one of GPR_MSVC_TLS, GPR_GCC_TLS, GPR_PTHREAD_TLS, GPR_CUSTOM_TLS

  ^

cc1plus: all warnings being treated as errors

Makefile:2968: recipe for target '/home/liu/Downloads/grpc/objs/opt/src/core/lib/gpr/alloc.o' failed

make: *** [/home/liu/Downloads/grpc/objs/opt/src/core/lib/gpr/alloc.o] Error 1


Reply all
Reply to author
Forward
0 new messages