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

Francesco Alfano edacedpa at yahoo.it
Mon Sep 20 14:32:06 UTC 2021


I have installed the following packages, in the 32-bit version, and now 
I can compile:

|# yum install libX11-devel.i686 # yum install libXext-devel.i686 # yum 
install libXrender-devel.i686 # yum install freetype-devel.i686 # yum 
install pixman-devel.i686 # yum install fontconfig-devel.i686 # yum 
install libpng-devel.i686 # yum install libpng12-devel.i686 # yum 
install libxcb-devel.i686 # yum install glib2-devel.i686 # yum install 
librsvg2-devel.i686 librsvg2.i686 # yum install gdk-pixbuf2-devel.i686 # 
yum install pango-devel.i686 # yum install gtk2-devel.i686 |



Il 20/09/21 14:19, Francesco Alfano ha scritto:
> I have examined the config.log files both on a native 32-bit machine, 
> where the library compiles correctly, and on the 64-bit machine where 
> I am trying to compile the 32bit version.
> In the native 32bit machine config.log reports this 
> setting:ac_cv_func_XRenderCreateLinearGradient = yes,
> in the 64-bit machine ac_cv_func_XRenderCreateLinearGradient = no.
>
> Il 20/09/21 13:05, suzuki toshiya ha scritto:
>> 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 ?
>>>
>>>
>>>
>>>
>>>
>>>
>

-- 
--
Best Regards
Francesco Alfano
System Engineer
Phone: +39 (091) 409092
Fax:     +39 (091) 6766932
e-mail:  ced at reroberto.it
e-mail:  edacedpa at yahoo.it



More information about the cairo mailing list