Hi again,

Another problem that I can add here is this:-

/home/esyishh/protobuf-2.5.0/src/google/protobuf/stubs/atomicops.h:81: 
error: 'intptr_t' does not name a type

I get this error when i am compiling protocol buffer generated cpp code 
with my powerpc-eabi-g++ compiler. It was strange as it didnt complain of a 
missing header file, so I checked online.
intptr_t is supposed to be defined in stdint.h. 
http://www.cplusplus.com/reference/cstdint/
The cpp reference (link above) says this about the intptr_t:-
*Optional:* These typedefs may not be defined in some library 
implementations.
Notice that some types are optional (and thus, with no portability 
guarantees)

Any light at the end of the tunnel is fading for me. Is there still hope 
that I will be able to use protocol buffers in my ppc target platform?

Regards,
Safi

On Wednesday, June 19, 2013 11:20:23 AM UTC+3, Safi Ali wrote:
>
> Hi there,
>
> Lets start with some background. I'm building on an x86_64 linux server, 
> and the target platform is powerpc. So far I have generated the cpp files 
> from my proto files (on the linux machine using protoc) and now im trying 
> to compile the cpp code for powerpc platform.
>  
> Im using the "powerpc-eabi-g++" compiler, and the problem is that as soon 
> as i start compiling I get this error:-
>
> In file included from 
> /home/esyishh/protobuf-2.5.0/src/google/protobuf/stubs/atomicops.h:59,
>                  from 
> /home/esyishh/protobuf-2.5.0/src/google/protobuf/stubs/once.h:81,
>                  from list_ue.pb.cc:10:
> /home/esyishh/protobuf-2.5.0/src/google/protobuf/stubs/platform_macros.h:61:2:
>  
> error: #error Host architecture was not detected as supported by protobuf
>
> When I check the contents of platform_macros.h file, it has the following 
> platforms supported:-
>
> #if defined(_M_X64) || defined(__x86_64__)
> #define GOOGLE_PROTOBUF_ARCH_X64 1
> #define GOOGLE_PROTOBUF_ARCH_64_BIT 1
> #elif defined(_M_IX86) || defined(__i386__)
> #define GOOGLE_PROTOBUF_ARCH_IA32 1
> #define GOOGLE_PROTOBUF_ARCH_32_BIT 1
> #elif defined(__QNX__)
> #define GOOGLE_PROTOBUF_ARCH_ARM_QNX 1
> #define GOOGLE_PROTOBUF_ARCH_32_BIT 1
> #elif defined(__ARMEL__)
> #define GOOGLE_PROTOBUF_ARCH_ARM 1
> #define GOOGLE_PROTOBUF_ARCH_32_BIT 1
> #elif defined(__MIPSEL__)
> #define GOOGLE_PROTOBUF_ARCH_MIPS 1
> #define GOOGLE_PROTOBUF_ARCH_32_BIT 1
> #elif defined(__pnacl__)
> #define GOOGLE_PROTOBUF_ARCH_32_BIT 1
> #elif defined(__ppc__)
> #define GOOGLE_PROTOBUF_ARCH_PPC 1
> #define GOOGLE_PROTOBUF_ARCH_32_BIT 1
> #else
> #error Host architecture was not detected as supported by protobuf
> #endif
>
> So I get the idea that ppc *is *supported. Here is what my compiler says:-
> -> echo | powerpc-eabi-g++ -E -dM - | grep -i ppc
> #define _ARCH_PPC 1
> #define __PPC__ 1
> #define __PPC 1
> #define PPC 1
>
> I thought that it was simply a problem with lowercase Vs uppercase so I 
> tried to modify the platform_macros.h file and now it contains something 
> like this:-
> #elif defined(__PPC__)  //changed ppc from lower case to uppercase to 
> match the compiler
> #define GOOGLE_PROTOBUF_ARCH_PPC 1
> #define GOOGLE_PROTOBUF_ARCH_32_BIT 1
>
> and then the compilation goes further but then I end up into some missing 
> header files issues. Before I try to dig deeper, I wanted to get some 
> advice from you guys.
>
> Do you think this problem is related to the fact that I didnt compile 
> protocol buffer libraries for powerpc & instead I just compiled them for 
> the build host environment (x86_64). 
> Would compiling protocol buffers for powerpc architecture help? (I tried 
> doing that but ran once again into 'undefined reference' issues, so 
> probably i will need to tweak the makefile a bit).
>
> Regards,
> Safi
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to