Bug 3626

Summary: building cairo-native failed on ubuntu 11.10
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Chen Qi <Qi.Chen>
Component: graphicsAssignee: Saul Wold <sgw>
Status: RESOLVED NOTABUG QA Contact:
Severity: normal    
Priority: Medium CC: hongxu.jia, kai.kang, liang.li2, liezhi.yang, meta.mr.watcher, meta.watcher, sgw, yi.zhao
Version: unspecified   
Target Milestone: 1.4   
Hardware: x86   
OS: x86   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---
Attachments:
Description Flags
Building cairo-native on ubuntu failed none

Description Chen Qi 2012-12-20 13:40:20 UTC
Created attachment 987 [details]
Building cairo-native on ubuntu failed

Building cairo-native failed on ubuntu 11.10.
I tried to build a core-image-sato-sdk image for qemux86, but it failed when building cairo-native.

branch: master
commit: 2a9c574fd8b0800199b6569b6abf02634801013d

Part of the log:
| /home/chenqi/poky/build/tmp/work/x86_64-linux/cairo-native/1.12.8-r0/cairo-1.12.8/src/.libs/libcairo.so: undefined reference to `XShmDetach'
| /home/chenqi/poky/build/tmp/work/x86_64-linux/cairo-native/1.12.8-r0/cairo-1.12.8/src/.libs/libcairo.so: undefined reference to `png_create_read_struct@PNG12_0'
| /home/chenqi/poky/build/tmp/work/x86_64-linux/cairo-native/1.12.8-r0/cairo-1.12.8/src/.libs/libcairo.so: undefined reference to `png_set_packswap@PNG12_0'
| ../../util/cairo-script/.libs/libcairo-script-interpreter.so: undefined reference to `FcNameParse'
| /home/chenqi/poky/build/tmp/work/x86_64-linux/cairo-native/1.12.8-r0/cairo-1.12.8/src/.libs/libcairo.so: undefined reference to `FcPatternGetBool'
| collect2: ld returned 1 exit status
| make[4]: *** [cairo-sphinx] Error 1

The detailed log is in attachment. 

Does anybody ever encountered the same problem? 

[P.S. I built the image from clean.]
Comment 1 Chen Qi 2012-12-20 13:45:34 UTC
Some more information.

As the log states:
src/.libs/libcairo.so: undefined reference to `FcPatternGetBool'

I inspected libcairo.so with objdump. Here's the result.

chenqi@chenqi-Vostro-2420:~/poky/build/tmp/work/x86_64-linux/cairo-native/1.12.8-r0/cairo-1.12.8/src/.libs$ objdump libcairo.so -t | grep FcPatternGetBool
0000000000000000       F *UND*	0000000000000000              FcPatternGetBool
chenqi@chenqi-Vostro-2420:~/poky/build/tmp/work/x86_64-linux/cairo-native/1.12.8-r0/cairo-1.12.8/src/.libs$ objdump libcairo.so -T | grep FcPatternGetBool
0000000000000000      DF *UND*	0000000000000000              FcPatternGetBool
Comment 2 Saul Wold 2012-12-20 15:50:10 UTC
Can you verify if this is using the new version of libpng?  It seems that it picked up png12, but we are using png15 now.
Comment 3 Chen Qi 2012-12-26 02:13:36 UTC
(In reply to comment #2)
> Can you verify if this is using the new version of libpng?  It seems that it
> picked up png12, but we are using png15 now.

The problem is caused by the upgrading of libpng from 12 to 15. 
It seems that after the upgrading, we need to clean a large part of the sstate cache to make a build success.
I cleaned all sstate cache and built a core-image-sato from clean. 
Everything is OK.
So I changed the status of this bug to 'RESOLVED [NOTABUG]'.