[cairo] how to build on 32 bit over a 64 bit system

suzuki toshiya mpsuzuki at hiroshima-u.ac.jp
Mon Sep 20 11:05:41 UTC 2021


Dear Mr. Alfano,

Who told you this method for cross building? According to the error message,

> /usr/include/X11/extensions/Xrender.h:186:16: note: originally defined here

Looking at the pathname of this header file, the host header file (for 64 bit
system) is included during the compilation, so the method you were told could
be incorrect. Please show your error message to the person telling you do such,
and ask the question what's wrong.

In my understanding, today, getting a sufficiently powerful machine and run
a VM which you can install a 32 bit Linux natively, it would be the easiest
way to build 32 bit cairo on 64 bit machine with smallest headache. If you
are going to build so big library for a VM, cross build would be unavoidable,
but I think cairo is not so big. Or, extracting a precompiled binaries from
the binary packages for 32 bit Linux would be still easier, I think.

Regards,
mpsuzuki

On 2021/09/20 19:17, Francesco Alfano wrote:
> I have to compile libcairo-1.14.2 in linux in 32 but format, on a 64 bit linux system.
> 
> I have tried the following commands:
> # ./autogen.sh --host = i386-pc-linux-gnu --build = i386-linux CFLAGS = -m32
> # ./configure --prefix = "/ usr / work / libcairo-1.14.2 / compiled /" --host = i386-pc-linux-gnu --build = i386-linux CFLAGS = "- m32 -O"
> 
> but, after I run make, the compilation returns me as an error:
> In file included from cairo-xlib-private.h: 40: 0,
>                   from cairo-xlib-display.c: 40:
> cairo-xlib-xrender-private.h: 106: 16: error: redefinition of 'struct _XLinearGradient'
>   typedef struct _XLinearGradient {
>                  ^
> In file included from cairo-xlib-xrender.h: 45: 0,
>                   from cairo-xlib-xrender-private.h: 53,
>                   from cairo-xlib-private.h: 40,
>                   from cairo-xlib-display.c: 40:
> /usr/include/X11/extensions/Xrender.h:186:16: note: originally defined here
>   typedef struct _XLinearGradient {
>                  ^
> In file included from cairo-xlib-private.h: 40: 0,
>                   from cairo-xlib-display.c: 40:
> cairo-xlib-xrender-private.h: 109: 3: error: conflicting types for 'XLinearGradient'
>   } XLinearGradient;
> 
> How can  build on 32 bit over a 64 bit system ?
> 
> 
> 
> 
> 
> 


More information about the cairo mailing list