Fedora下 DriectFB 开发手记(4)

升级开发环境
yum install xinetd telnet-server samba samba-common samba-client make gcc tftp-server patch gettext libtool gcc-c++ nfs-utils autoconf automake libtool gperf bison flex gtk-doc xorg-x11-util-macros

编译参考:

1.check out source

2.install flex bison gperf libtool libicu-dev

3../WebKit/WebKitTools/Scripts/build-webkit --gtk --debug

4. error
Warning: not running gtk-docize.
configure.ac:14: installing `autotools/config.guess'
configure.ac:14: installing `autotools/config.sub'
automake: cannot open < gtk-doc.make: No such file or directory
Failed to setup build environment using 'autotools'!

5. sudo apt-get install gtk-doc-tools libjpeg62-dev libxml2-dev libenchant-dev libsqlite3-dev libxslt1-dev libgstreamer-plugins-base0.10-dev

6.wget & build & install without-gnom

7. ./WebKit/WebKitTools/Scripts/build-webkit --gtk --debug

Here comes part of the output:

Calling configure in /home/zheqiduo/WebKit/WebKitBuild/Release

checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking how to create a ustar tar archive... gnutar
checking for native Win32... no
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking if supports -fvisibility=hidden -fvisibility-inlines-hidden... yes
checking for pkg-config... /usr/bin/pkg-config
checking for perl... /usr/bin/perl
checking for bison... /usr/bin/bison
checking for mv... /bin/mv
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for a BSD-compatible install... /usr/bin/install -c
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for working volatile... yes
checking for ANSI C header files... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for dlfcn.h... yes
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking dependency style of g++... (cached) gcc3
checking how to run the C++ preprocessor... g++ -E
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for bash... /bin/bash
checking if dolt supports this host... yes, replacing libtool
checking for flex... /usr/bin/flex
checking for gawk... (cached) mawk
checking for gperf... /usr/bin/gperf
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for jpeg_destroy_decompress in -ljpeg... yes
checking for jpeglib... yes
checking for libpng12... yes
checking the target windowing system... x11
checking for Hildon UI extensions... no
checking for GLIB... yes
checking for glib-genmarshal... /usr/bin/glib-genmarshal
checking for glib-mkenums... /usr/bin/glib-mkenums
checking which Unicode backend to use... icu
checking for icu-config... /usr/bin/icu-config
checking for LIBXML... yes
checking for PANGO... yes
checking for ENCHANT... yes
checking for CAIRO... yes
checking for GTK... yes
checking for XT... yes
checking whether to do a debug build... no
checking whether to enable optimized builds... yes
checking whether to enable Dashboard support... yes
checking whether to enable support for 3D Transforms... no
checking whether to enable HTML5 Channel Messaging support... no
checking whether to enable JavaScript debugger/profiler support... yes
checking whether to enable HTML5 offline web applications support... yes
checking whether to enable HTML5 client-side session and persistent storage support... yes
checking whether to enable HTML5 client-side database storage support... yes
checking whether to enable icon database support... yes
checking whether to enable HTML5 video support... yes
checking whether to enable XPath support... yes
checking whether to enable XSLT support... yes
checking whether to enable geolocation support... no
checking whether to enable gnomekeyring support... no
checking whether to enable SVG support... yes
checking whether to enable WML support... no
checking whether to enable Web Workers support... yes
checking whether to enable support for SVG animation... yes
checking whether to enable support for filters... no
checking whether to enable support for SVG fonts... yes
checking whether to enable support for SVG foreign objects... yes
checking whether to enable SVG as Image support... yes
checking whether to enable support for SVG use element... yes
checking whether to enable code coverage support... no
checking whether to enable optimized memory allocator... yes
checking whether to enable JIT compilation... yes
checking the font backend to use... freetype
checking for LIBSOUP... yes
checking for FREETYPE... yes
checking for SQLITE3... yes
checking for LIBXSLT... yes
checking for GSTREAMER... yes
checking whether to build gtk-doc documentation... no
checking for gtkdoc-check... /usr/bin/gtkdoc-check
configure: creating ./config.status
config.status: creating GNUmakefile
config.status: creating WebKit/gtk/webkit-1.0.pc
config.status: creating WebKit/gtk/webkit/webkitversion.h
config.status: creating WebKit/gtk/docs/GNUmakefile
config.status: creating WebKit/gtk/docs/version.xml
config.status: creating autotoolsconfig.h
config.status: executing depfiles commands
config.status: executing libtool commands

WebKit was configured with the following options:

Build configuration:
Enable debugging (slow)                                  : no
Enable GCC build optimization                            : yes
Code coverage support                                    : no
Unicode backend                                          : icu
Font backend                                             : freetype
Optimized memory allocator                               : yes
Features:
3D Transforms                                            : no
JIT compilation                                          : yes
Dashboard support                                        : yes
Filters support                                          : no
Geolocation support                                      : no
GNOME Keyring support                                    : no
JavaScript debugger/profiler support                     : yes
HTML5 offline web applications support                   : yes
HTML5 channel messaging support                          : no
HTML5 client-side session and persistent storage support : yes
HTML5 client-side database storage support               : yes
HTML5 video element support                              : yes
Icon database support                                    : yes
SVG support                                              : yes
SVG animation support                                    : yes
SVG fonts support                                        : yes
SVG foreign object support                               : yes
SVG as image support                                     : yes
SVG use element support                                  : yes
WML support                                              : no
Web Workers support                                      : yes
XPATH support                                            : yes
XSLT support                                             : yes
GTK+ configuration:
GDK target                                               : x11
Hildon UI extensions                                     : no

GTK+ 编译 官方参考

从哪里下载 webkit 源代码?

Warning: not running gtk-docize
yum install gtk-doc

没有./configure文件?在gtk 下如何编译?
./--with-webkit-target=directfb --without-x

什么是 ICU,如何得到源代码?
(ICU)International Components for Unicode Library

交叉编译 Webkit (基于 GTK + DFB )

很巧的是当初在intel打工时,也是做这个项目,只是没见过博主。

细节的地方做了些改动和纠错

DirectFB用的命令是:

./configure -host=arm-linux --prefix=$ROOTFS_DIR/usr --with-gfxdrivers=none --enable-sdl=no  --disable-x11 "CFLAGS=-I$ROOTFS_DIR/usr/include" "LIBS=-L$ROOTFS_DIR/usr/lib -lz -ljpeg"  && make && make install

glib-2.12.0:
export ARCH=arm
CC=$ARCH-linux-gcc
echo ac_cv_type_long_long=yes>>$ARCH-linux.cache
echo glib_cv_long_long_format=ll>>$ARCH-linux.cache
echo glib_cv_stack_grows=no>>$ARCH-linux.cache
echo glib_cv_uscore=no>>$ARCH-linux.cache
echo ac_cv_func_posix_getpwuid_r=yes>>$ARCH-linux.cache
./configure --prefix=$ROOTFS_DIR/usr --cache-file=$ARCH-linux.cache --build= i686-pc-linux-gnu --target=$ARCH-linux --host=$ARCH-linux && make && make install
glib在做configure时,如果还遇到test xxx过不去,打开configure,查找相应的符号XXX,输入
echo XXX=no>>$ARCH-linux.cache no和yes看情况选吧

cairo-1.4.2
export ARCH=arm
CC=$ARCH-linux-gcc
export CFLAGS="-I$ROOTFS_DIR/usr/include"
export LDFLAGS="-L$ROOTFS_DIR/usr/lib"

 ./configure --prefix=$ROOTFS_DIR/usr --enable-directfb --disable-xlib --disable-win32 --enable-png --enable-freetype --enable-pdf --enable-ps --build= i686-pc-linux-gnu --target=$ARCH-linux --host=$ARCH-linux && make && make install

pango-1.16.2:
export ARCH=arm
CC=$ARCH-linux-gcc
export LDFLAGS="-L$ROOTFS_DIR/usr/lib -Wl,-rpath=$ROOTFS_DIR/usr/lib"
export FREETYPE_CONFIG=$ROOTFS_DIR/usr/bin/freetype-config

./configure --prefix=$ROOTFS_DIR/usr --build= i686-pc-linux-gnu --with-arch=$ARCH --without-x --target=$ARCH-linux --host=$ARCH-linux && make && make install
pango还是有点问题,字体显示还不正常。

 

webkit的地方有一点改动

./configure --prefix=$ROOTFS_DIR/usr --with-target=directfb --without-x --build=i686-pc-linux-gnu --target=$ARCH-linux --host=$ARCH-linux CFLAGS=-I$ROOTFS_DIR/usr/include  CPPFLAGS=-I$ROOTFS_DIR/usr/include

icu_config=$ROOTFS_DIR/usr && make && make install

1.可能出现缺少X11的头文件,搜索下缺少的X11的文件,复制到$ROOTFS_DIR/usr/include下。
2.出现失败信息关于 “u_charType_3_6”, 打开 libJavaScriptCore.la(跟autogen.sh 同一目录下),在dependency_libs 行最末尾添加-licui18n。
继续make
make install
编译完成了在Program/.lib目录下运行./Gtklauncher,就可以看到浏览器窗口了。

几点心得:

1.出问题多重启,很多莫名其妙的问题,重启后就解决了

2.哪个模块遍布过去,删掉该模块和相关的模块,重装。

3.路径问题很麻烦,要搞清本地路径和遍到arm上路径。

4.如果出现C compiler cannot create XXX 等错误,是因为c编译器来回换出现的问题,重新登陆一个终端,如果还有这样的问题,重启就可以解决。

终于在离职前一天编完了,把这段时间工作画上一个句号。虽然后续工作还有很多,已经和我无关了。webkit今后也许不会再接触了。今后会不会再做it,会不会在上海,我也不知道。人生有太多不确定了,自己无法把握,索性就飘啊飘吧。



icu4c

终于可以从来看到官方下载地址喽


编译 sqlite 因为选择的版本不对
编译 libxt-dev 需要 yum install xorg-x11-util-macros
编译 libxt-dev Package requirements(sm ice x11 xproto kbproto) were not met
ftp://ftp.x.org/pub/X11R7.1/src/lib/libX11-X11R7.1-1.0.1.tar.gz


下载编译所需要的代码

libgtk2.0-dev (>= 2.10)
libpango1.0-dev (>= 1.16)

libjpeg62-dev
libpng12-dev

以上gtk相关参考前一篇文章
另:
本想使用最新的 gtk+ 可惜编译遇到了一些问题,这里只记录最新的gtk+相关的一些下载地址
+/2.21/gtk+-2.21.4.tar.gz
ftp://ftp.remotesensing.org/pub/libtiff/tiff-4.0.0beta6.tar.gz

libtiff

gdk-pixbuff

webkit依赖的库
libicu-dev

libxslt-dev

libsoup2.4-dev (>= 2.27.4) (*)

libsqlite3-dev

libxt-dev

autotools-dev

libgstreamer-plugins-base0.10-dev

libenchant-dev

libgail-dev

libgeoclue-dev


webkit依赖库下载

ftp://ftp.gnome.org/pub/GNOME/sources/libxslt/1.1/libxslt-1.1.19.tar.gz








编译 webkit
cd icu
cd
cd source

./configure --prefix=$PREFIX --enable-static --enable-shared

make -j2

make -j2 install

cd ..

cd ..

cd libxslt-1.1.19

./configure --prefix=$PREFIX --without-crypto --with-libxml

make -j2

make -j2 install

cd ..

cd libsoup-2.31.2

./configure --prefix=$PREFIX --disable-glibtest --without-gnome --disable-ssl

make -j2

make -j2 install

cd ..

cd sqlite-3.6.23.1

./configure --prefix=$PREFIX

make -j2

make -j2 install

cd ..

cd libXt-1.0.8

./autogen.sh --prefix=$PREFIX

./configure --prefix=$PREFIX

make -j2

make -j2 install

cd ..

cd enchant-1.6.0

./configure --prefix=$PREFIX

make -j2

make -j2 install

cd ..

cd gail-1.22.3

make -j2

make -j2 install

cd ..

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wwpygz.html