Need help compiling gpgme fat

David Shaw dshaw at
Sat Mar 11 20:47:52 CET 2006

On Sat, Mar 11, 2006 at 08:07:58PM +0100, Stéphane Corthésy wrote:

> >Here's how to do it - edit (not config.h) and remove this:
> >
> >  /* Defined if the host has big endian byte ordering */
> >  #undef BIG_ENDIAN_HOST
> >
> >and this:
> >
> >  /* Defined if the host has little endian byte ordering */
> >
> >Then add this:
> >
> I finally solved it like that: I modified config.h and added
> #include <machine/endian.h>
>     #define BIG_ENDIAN_HOST 1
>     #undef BIG_ENDIAN_HOST
>     #define LITTLE_ENDIAN_HOST 1
>   #else
>     #error Unsupported endianness
>   #endif
> #else
>   #error Endianness macros are undefined!
> #endif
> Maybe it's portable for other platforms?

No.  There is no guarantee that any of machine/endian.h, BIG_ENDIAN,
or LITTLE_ENDIAN exists.  If any of those are missing, that code will
break.  There are safe ways to do this in autoconf.

> I don't need to disable asm, do I? I didn't and it worked.

On ppc it will work, since there aren't ppc asm modules in the code
(it uses straight C).  On i386, there are asm modules, so if you
compile the fat binary on ppc, it'll work, but if you compile the fat
binary on i386 configure will detect the i386 and use the asm modules
which would break ppc.  --disable-asm fixes all that that and makes
the MPI code processor agnostic.

> BTW, is it better or not to enable memory-guard and noexecstack? Why  
> aren't they enabled by default?

Experimental and gcc specific.

> >Let me know if this works for you.
> It probably does, as it solves the endiannes problem, and doesn't use  
> any special lib.
> I'll see that tomorrow.

Ok, let me know.


More information about the Gnupg-devel mailing list