当前位置: 移动技术网 > 科技>操作系统>Linux > Facebook Open Platform编译FAQ

Facebook Open Platform编译FAQ

2019年03月24日  | 移动技术网科技  | 我要评论
1:下载源码:http://developers.facebook.com/fbopen/

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

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

错误提示1:

gconvert.c:48:2: error: #error gnu libiconv not in use but included iconv.h is from libiconv

解决办法:
修改build-all.py
'glib-2.14.6.tar.gz': ("./configure", "make", "sudo make install"),

改成

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


错误提示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): in function `nscanvasrenderingcontext2d::destroy()':
: undefined reference to `xfreepixmap'
../../dist/lib/libgkconcvs_s.a(nscanvasrenderingcontext2d.o)(.text+0x141a): in function `nscanvasrenderingcontext2d::setdimensions(int, int)':
: undefined reference to `xrenderfindstandardformat'
../../dist/lib/libgkconcvs_s.a(nscanvasrenderingcontext2d.o)(.text+0x1440): in function `nscanvasrenderingcontext2d::setdimensions(int, int)':
: undefined reference to `xlistpixmapformats'
../../dist/lib/libgkconcvs_s.a(nscanvasrenderingcontext2d.o)(.text+0x1467): in function `nscanvasrenderingcontext2d::setdimensions(int, int)':
: undefined reference to `xfree'
../../dist/lib/libgkconcvs_s.a(nscanvasrenderingcontext2d.o)(.text+0x149d): in function `nscanvasrenderingcontext2d::setdimensions(int, int)':
: undefined reference to `xcreatepixmap'
collect2: ld returned 1 exit status
gmake[3]: *** [libgklayout.so] error 1
gmake[3]: leaving directory `/usr/home/yunfeng/facebook/facebook/fb-open-platform/libfbml-1.2.0/dependencies/mozilla/layout/build'
gmake[2]: *** [libs] error 2
gmake[2]: leaving directory `/usr/home/yunfeng/facebook/facebook/fb-open-platform/libfbml-1.2.0/dependencies/mozilla/layout'
gmake[1]: *** [tier_9] error 2
gmake[1]: leaving directory `/usr/home/yunfeng/facebook/facebook/fb-open-platform/libfbml-1.2.0/dependencies/mozilla'
make: *** [default] error 2

解决办法:

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

moz_enable_gtk2extra_dso_ldopts += $(moz_gtk2_libs) \ $(null)

改成ifdef moz_enable_gtk2extra_dso_ldopts += $(moz_gtk2_libs) \ -l/usr/x11r6/lib -lx11 -lxrender \ $(null)

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


错误提示3:


in file included from js/jsarena.c:49:
js/jsbit.h:173: error: size of array 'js_static_assert_line_173' is negative
make[1]: *** [js/jsarena.o] error 1
make: *** [src] error 2

解决办法:

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

s_static_assert(sizeof(unsigned long long) == sizeof(jsuword));

改成

s_static_assert(sizeof(unsigned long) == sizeof(jsuword));

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

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网