Facebook Open Platform编译FAQ




Facebook Open Platform编译FAQ

2022-07-20 20:33:18 网络知识 官方管理员

facebookopenplatform在编译中会碰到一些问题,给大家汇总一下,可能不全,但基本都是我在编译中碰到的,希望对大家有帮助

1:下载源码:http://developers.facebook.com/fbopen/

2:根据readme的说明,把fbml所需的软件下载到dependencies目录下

3:fbml的php扩展的编译,本身有个脚本,不过一般情况下都不能顺利通过那脚本编译成功

错误提示1:

gconvert.c:48:2:error:#errorGNUlibiconvnotinusebutincludediconv.hisfromlibiconv

解决办法

修改build-all.py

'glib-2.14.6.tar.gz':("./configure","make","sudomakeinstall"),

改成

'glib-2.14.6.tar.gz':("./configure--with-libiconv=gnu","make","sudomakeinstall"),

错误提示2:

nspr4-lpthread-ldl-L../../dist/bin-lmozjs-L/usr/local/lib-lgtk-x11-2.0-lgdk-x11-2.0-latk-1.0-lgdk_pixbuf-2.0-lm-lpangocairo-1.0-lpango-1.0-lcairo-lgobject-2.0-lgmodule-2.0-ldl-lglib-2.0-L/usr/local/lib-lcairo-Wl,--version-script-Wl,../../build/unix/gnu-ld-scripts/components-version-script-Wl,-Bsymbolic-ldl-lm

../../dist/lib/libgkconcvs_s.a(nsCanvasRenderingContext2D.o)(.text+0xa47):Infunction`nsCanvasRenderingContext2D::Destroy()':

:undefinedreferenceto`XFreePixmap'

../../dist/lib/libgkconcvs_s.a(nsCanvasRenderingContext2D.o)(.text+0x141a):Infunction`nsCanvasRenderingContext2D::SetDimensions(int,int)':

:undefinedreferenceto`XRenderFindStandardFormat'

../../dist/lib/libgkconcvs_s.a(nsCanvasRenderingContext2D.o)(.text+0x1440):Infunction`nsCanvasRenderingContext2D::SetDimensions(int,int)':

:undefinedreferenceto`XListPixmapFormats'

../../dist/lib/libgkconcvs_s.a(nsCanvasRenderingContext2D.o)(.text+0x1467):Infunction`nsCanvasRenderingContext2D::SetDimensions(int,int)':

:undefinedreferenceto`XFree'

../../dist/lib/libgkconcvs_s.a(nsCanvasRenderingContext2D.o)(.text+0x149d):Infunction`nsCanvasRenderingContext2D::SetDimensions(int,int)':

:undefinedreferenceto`XCreatePixmap'

collect2:ldreturned1exitstatus

gmake[3]:***[libgklayout.so]Error1

gmake[3]:Leavingdirectory`/usr/home/yunfeng/facebook/facebook/fb-open-platform/libfbml-1.2.0/dependencies/mozilla/layout/build'

gmake[2]:***[libs]Error2

gmake[2]:Leavingdirectory`/usr/home/yunfeng/facebook/facebook/fb-open-platform/libfbml-1.2.0/dependencies/mozilla/layout'

gmake[1]:***[tier_9]Error2

gmake[1]:Leavingdirectory`/usr/home/yunfeng/facebook/facebook/fb-open-platform/libfbml-1.2.0/dependencies/mozilla'

make:***[default]Error2

解决办法:

修改dependencies/mozilla/layout/build/Makefile.inifdef

MOZ_ENABLE_GTK2EXTRA_DSO_LDOPTS+=$(MOZ_GTK2_LIBS)\$(NULL)

改成ifdefMOZ_ENABLE_GTK2EXTRA_DSO_LDOPTS+=$(MOZ_GTK2_LIBS)\-L/usr/X11R6/lib-lX11-lXrender\$(NULL)

这个错误一般发生在firefox编译的时候,我一般都手动解压缩firefox软件,然后修改Makefile.in,然后在build-all.py中屏蔽解压缩firefox的语句就行

错误提示3:

Infileincludedfromjs/jsarena.c:49:

js/jsbit.h:173:error:sizeofarray'js_static_assert_line_173'isnegative

make[1]:***[js/jsarena.o]Error1

make:***[src]Error2

解决办法:

修改src/js/jsbit.h第173行

S_STATIC_ASSERT(sizeof(unsignedlonglong)==sizeof(JSUword));

改成

S_STATIC_ASSERT(sizeof(unsignedlong)==sizeof(JSUword));

这个错误发生在firefox编译成功后,进行fbml的编译时候发生的,如果你用build-all.py编译,不想进行前面的编译,可以根据脚本屏蔽前面的编译。


发表评论:

最近发表
网站分类
标签列表