Apparently (via private correspondence), using "machine/endian.h"
instead of "mach/endian.h" worked -- so i added that to the list of
"endianness-detection headers".

I dunno if there's some sort of FAQ on xcompiling protobuf, but there
is a general problem that the protoc_c compiler must be runnable on
the *build* platform versus the libprotobuf-c library, that must be
running on the *host* platform.  (I use "build" to be the machine you
are compiling on, and "host" for the machine you are planning on
running code on)

My package cannot be dual-targetted like that -- and i am doubtful
that automake can handle it -- highly doubtful.

So, you have to build protobuf-c twice, once targetted to your build
env (to get protoc-c) and again targetted to your host env (to get
libprotobuf-c).  This mess propagates up the chain: you must compile
core protobuf twice too, even tho you don't need it on your host
env.... sigh.

Ideally, I guess, I'd add --disable-protoc-c and --disable-libprotobuf-
c to configure to minimize deps (so core protobuf needn't be compiled
at all for your host env).
Patches welcome, or maybe i'll just do it :)

- dave

On Mar 3, 4:30 pm, [email protected] wrote:
> Without the actual config.log it's hard to tell what's going on.  You
> may send it to me privately if you want.
>
> If you have a working <endian.h> or <mach/endian.h>, we shouldn't need
> to run a test program.  but i have never written an iphone app, so i
> have really no idea if they have such a header.
>
> If they don't have any tests that don't require running a program, i
> could probably add a hack to allow the user to force it, or to disable
> the little-endian optimizations (which turns the code portable).
>
> - dave
>
> On Mar 3, 11:33 am, marc <[email protected]> wrote:
>
> > On Mar 3, 1:42 pm, Kenton Varda <[email protected]> wrote:
>
> > > Sorry, our implementation was designed for servers where binary footprint 
> > > is
> > > not a big deal.  Maybe try using protobuf-c?
>
> > Ok thanks.  Getting the following configure error.  Any workaround?
>
> > checking for little-endianness via runtime check... configure: error:
> > cannot run test program while cross compiling
> > See `config.log' for more details.
>
> > Marc
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to