Intro
This guide is based in the wiki GTK on DirectFB for Embedded Systems from the DirectFB site, but it uses the latest packages available to this date. The first version of this guide used some unstable packages whilst this version uses only stable ones, but since I haven’t been to test it properly this guide is not present in mentioned wiki. Hopefully, once this procedure becomes stable and tested a bit more, the wiki will be updated.
I tested this procedure in a STMicroelectronics ST40 processor (SH architecture). If you’re using this processor, this is the configuration I have:
- Board: STB7109 cut 3.0, also called cocoref_gold_7109
- Linux distribution: STLinux 2.2
- DirectFB driver: stgfb-3.0_stm23_0008-4
Warnings
- This documentation assumes you already have DirectFB install in $PREFIX/usr. Change it accordingly to your installation.
- This documentation is still a work in progress, some steps of this procedure could be useless, ugly and/or dangerous
- The autotools are not very user-friendly when cross-compiling, thus, several configure files and Makefile (that are generated by the autotools) have to be edited by hand.
- GTK+ and all the packages underneath need a considerable amount of space and processor. If your embedded device provides a hard-drive/compact-flash or a big flash and supports hardware accelerated graphics you can use GTK+ without problems.
Requirements
Typically, when developing applications for an embedded system a cross-toolchain is needed. If you already have a cross-toolchain you don’t have to worry about building it yourself. Otherwise, a well known resource for building one is http://www.kegel.com/crosstool
When developing for embedded systems, there are very few Linux distributions or packages that contain all the required software for building GTK+, therefore you have to build everything from scratch.
The order in which the packages are compiled is important since some of them won’t compile without the others. The packages, their versions and the order used for building GTK+ are the following:
- glib-2.15.4
- atk-1.23.5
- freetype-2.3.7
- zlib-1.2.3
- libxml2-2.6.30
- fontconfig-2.6.0
- libpng-1.2.29
- cairo-1.6.4
- pango-1.21.3
- gtk+-2.12.11
Environment configuration
Suppose that the libraries will be installed in /opt/oe/STM/STLinux-2.2/devkit/sh4/target/usr/local ( /opt/oe/STM/STLinux-2.2/devkit/sh4/target is the root fs of the target) and that the cross-toolchain (compiler, linker…) is in your path.
Set the following environment variables that will make our life easier:
$ export PREFIX=/opt/oe/STM/STLinux-2.2/devkit/sh4/target/usr/local
$ export LD_LIBRARY_PATH=$PREFIX/lib
$ export PKG_CONFIG_PATH=$LD_LIBRARY_PATH/pkgconfig
$ export COMPILER=sh4-linux-gcc
$ export HOST=sh4-linux
$ export BUILD=i386-linux
Compiling the requirements
Glib 2.15.4
Edit the “configure” file:
Search for the texts “cannot run test program while cross compiling” and “cross-compiling”. Remove the following code that appe
ars a couple of lines below the searched texts:
{ (exit 1); exit 1; };
Configure, compile and install:
$ ./configure --build=$BUILD --host=$HOST --prefix=$PREFIX
--disable-largefile --disable-selinux --disable-gtk-doc --disable-man
$ make
$ make install
Atk 1.23.5
Configure, compile and install:
$ ./configure --host=$HOST --build=$BUILD --prefix=$PREFIX --disable-glibtest --disable-gtk-doc
$ make
$ make install
Freetype 2.3.7
Configure, compilie and install:
$ ./configure --host=$HOST --build=$BUILD --prefix=$PREFIX
$ make
$ make install
Zlib 1.2.3
Configure, compilie and install:
$ CC=$COMPILER ./configure --prefix=$PREFIX --shared
$ make
$ make install
libxml2 2.6.30
Configure, compilie and install:
$ ./configure --host=$HOST --build=$BUILD --prefix=$PREFIX --without-debug
$ make
$ make install
Fontconfig 2.6.0
Configure, compile and install:
$ ./configure --build=$BUILD --host=$HOST --prefix=$PREFIX
--with-freetype-config=$PREFIX/bin/freetype-config --enable-libxml2 --with-arch=sh4
--disable-docs
$ make
$ make install
libpng 1.2.29
Edit the “configure” file:
Set to ‘yes’ the following variable:
ac_cv_lib_z_zlibVersion=yes
Configure, compile and install:
$ ./configure --host=$HOST --build=$BUILD --prefix=$PREFIX
$ make
$ make install
Cairo 1.6.4
Configure, compile and install:
$ directfb_CFLAGS="-I$PREFIX/../include/directfb"
directfb_LIBS="$PREFIX/../lib/libdirectfb.so
$PREFIX/../lib/libdirect.so
$PREFIX/../lib/libfusion.so"
png_CFLAGS="-I$PREFIX/include"
png_LIBS=$PREFIX/lib/libpng12.so
FONTCONFIG_CFLAGS="-I$PREFIX/include/fontconfig"
FONTCONFIG_LIBS=$PREFIX/lib/libfontconfig.so
FREETYPE_CFLAGS="-I$PREFIX/include/freetype2"
FREETYPE_LIBS=$PREFIX/lib/libfreetype.so
./configure --host=$HOST --build=$BUILD --prefix=$PREFIX
--enable-directfb=yes --without-x --disable-xlib
--disable-xlib-xrender --disable-win32 --enable-pdf=no
--enable-ps=no --enable-png
$ make
$ make install
Pango 1.21.3
Set to ‘true’ the following variables:
have_cairo=true
have_cairo_png=true
have_cairo_freetype=true
Configure:
$ GLIB_CFLAGS="-I$PREFIX/include/glib-2.0 -I$PREFIX/lib/glib-2.0/include"
GLIB_LIBS="$PREFIX/lib/libglib-2.0.so
$PREFIX/lib/libgmodule-2.0.so
$PREFIX/lib/libgobject-2.0.so
$PREFIX/lib/libfontconfig.so
$PREFIX/lib/libxml2.so
$PREFIX/lib/libfreetype.so"
CAIRO_CFLAGS="-I$PREFIX/include/cairo"
CAIRO_LIBS=$PREFIX/lib/libcairo.so
FONTCONFIG_CFLAGS="-I$PREFIX/include"
FONTCONFIG_LIBS=$PREFIX/lib/libfontconfig.so
FREETYPE_CFLAGS="-I$PREFIX/include/freetype2"
FREETYPE_LIBS=$PREFIX/lib/libfreetype.so
FREETYPE_CONFIG=$PREFIX/bin/freetype-config
./configure --host=$HOST --build=$BUILD --prefix=$PREFIX --without-x
Edit Makefile:
Delete from the SUBDIRS var the directory ‘examples’
Edit tests/Makefile:
Add GLIB_LIBS to the LIBS variable:
LIBS = $(GLIB_LIBS)
Compile and install:
$ make
$ make install
Compiling GTK+ 2.12.11
If DirectFB is in PREFIX/../,
edit the files directfb.pc, direct.pc and fusion.pc in PREFIX/../lib/pkgconfig
Set the prefix var to the following value:
prefix=/opt/oe/STM/STLinux-2.2/devkit/sh4/target/usr
Search for the texts “Can’t link to Pango”, “Can’t find cairo-ps.h” and “Can’t find cairo-pdf.h”.
Remove the following code that appears a couple of lines below the searched texts:
{ (exit 1); exit 1; };
Configure:
$ BASE_DEPENDENCIES_CFLAGS="-I$PREFIX/include
-I$PREFIX/lib/glib-2.0/include -I$PREFIX/include/glib-2.0
-I$PREFIX/include/pango-1.0
-I$PREFIX/include/cairo
-I$PREFIX/include/atk-1.0"
BASE_DEPENDENCIES_LIBS="-L$PREFIX/lib
$PREFIX/lib/libglib-2.0.so
$PREFIX/lib/libgobject-2.0.so $PREFIX/lib/libgmodule-2.0.so
$PREFIX/lib/libfontconfig.so $PREFIX/lib/libxml2.so"
GLIB_CFLAGS="-I$PREFIX/include
-I$PREFIX/lib/glib-2.0/include
-I$PREFIX/include/glib-2.0"
GLIB_LIBS="-L$PREFIX/lib
$PREFIX/lib/libglib-2.0.so
$PREFIX/lib/libgobject-2.0.so
$PREFIX/lib/libgmodule-2.0.so
$PREFIX/lib/libfontconfig.so
$PREFIX/lib/libxml2.so"
PANGO_CFLAGS="-I$PREFIX/include/pango-1.0"
PANGO_LIBS="-L$PREFIX/lib
$PREFIX/lib/libpango-1.0.so
$PREFIX/lib/libpangoft2-1.0.so
$PREFIX/lib/libpangocairo-1.0.so"
GDK_DEP_CFLAGS="-pthread -I$PREFIX/include/glib-2.0
-I$PREFIX/lib/glib-2.0/include
-I$PREFIX/include/pango-1.0
-I$PREFIX/include/cairo
-I$PREFIX/include
-D_REENTRANT -D_GNU_SOURCE
-I$PREFIX/../include
-I$PREFIX/../include/directfb"
GDK_DEP_LIBS="-L$PREFIX/lib -lpthread -ldl -lpangocairo-1.0
-lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lpng12 -lm
$PREFIX/../lib/libdirectfb.so
$PREFIX/../lib/libdirect.so
$PREFIX/../lib/libfusion.so"
GDK_PIXBUF_DEP_CFLAGS="-pthread -I$PREFIX/include/glib-2.0
-I$PREFIX/lib/glib-2.0/include
-I$PREFIX/include
-I$PREFIX/../include"
GDK_PIXBUF_DEP_LIBS="-L$PREFIX/lib
-lgmodule-2.0 -ldl -lgobject-2.0 -lglib-2.0 -lpng12 -lm"
GTK_DEP_CFLAGS="-pthread -I$PREFIX/include/glib-2.0
-I$PREFIX/lib/glib-2.0/include
-I$PREFIX/include/pango-1.0
-I$PREFIX/include/cairo
-I$PREFIX/include -D_REENTRANT -D_GNU_SOURCE
-I$PREFIX/../include/directfb
-I$PREFIX/include/atk-1.0
-I$PREFIX/../include"
GTK_DEP_LIBS="-L$PREFIX/lib
-lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lgobject-2.0 -lgmodule-2.0
-ldl -lglib-2.0 -lcairo -lpng12 -lm
$PREFIX/../lib/libdirectfb.so
$PREFIX/../lib/libdirect.so
$PREFIX/../lib/libfusion.so"
GDK_EXTRA_CFLAGS="-I$PREFIX/../include"
GDK_EXTRA_LIBS="-L$PREFIX/../lib -lz -lpthread -ldl
$PREFIX/../lib/libdirectfb.so
$PREFIX/../lib/libdirect.so
$PREFIX/../lib/libfusion.so"
./configure --host=$HOST --build=$BUILD --prefix=$PREFIX
--with-gdktarget=directfb --without-libtiff --without-libjpeg
--disable-glibtest --disable-largefile --disable-modules
--with-included-loaders=gif,png,xpm
Edit gtk/Makefile:
Add to the GTK_DEP_LIBS var the following value:
-lfontconfig -lfreetype
Remove the linking line of the rule gtk-query-immodules-2.0$(EXEEXT).
Warning: This means that we won’t have this command available in the target.
#$(LINK)
Dangerous/ugly step:
GTK needs a cairo-pdf/ps printing support for compiling,
but it’s unlikely that PDF/PS will be needed in an embedded system.
There is no flag to compile it without this setting.
There are some patches in development to solve this issue,
meanwhile it was compiled without the cairo-pdf support by doing
the following very ugly and dangerous step.
If you want to add to add PDF/PS support you can try Poppler.
Edit the files:
* gtk/gtkprintoperation.c
* gtk/gtkprintoperation-unix.c
* modules/printbackends/lpr/gtkprintbackendlpr.c
* modules/printbackends/file/gtkprintbackendfile.c
Comment the lines in all these files that contains the following includes or function calls:
#include
#include
cairo_pdf_surface_set_size()
cairo_pdf_surface_create()
cairo_ps_surface_create_for_stream()
Compile and install:
$ make
$ make install
That’s it. Feel free to contact for any comment/idea/hint if you have any problem or want to improve this procedure.
Additional notes
If you want to include libjpeg you new to remove the option –without-libjpeg and add it to the option –with-included-loaders=gif,png,xpm,jpeg
Hi,
Followed the New procedure .Some how getting stuck at gtk+ compilation…Ihave noticed a strange behavior.Weni configured it first it gave a different error for Pango not found .But when i tied to configure it sencond time .I got Glib error.Though it was identitfed the first time.
checking pkg-config is at least version 0.16… yes
checking for GLIB – version >= 2.13.5… no
*** Could not run GLIB test program, checking why…
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GLIB is incorrectly installed.
configure: error:
*** GLIB 2.13.5 or better is required. The latest version of
*** GLIB is always available from ftp://ftp.gtk.org/pub/gtk/.
Regards
Ali
Hi,
Check your env vars, specially PKG_CONFIG_PATH.
Sometimes when you get strange behaviour it’s better to untar the package and start again.
Regards.
Hi paguilar,
When i configing the cairo-1.6.4, i have the issue:
hecking zlib.h presence… yes
checking for zlib.h… yes
checking for sh4-linux-pkg-config… no
checking for pkg-config… /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0… yes
checking for pixman… no
configure: error: pixman >= 0.10.0 is required
(http://cairographics.org/releases/)
[root@sha-jasonliang cairo-1.6.4]# cd ../
And did you use the pixman package?
Thanks!
Hi Goralf,
I had this problem . I have installed pixman-0.11.2 to overcome this problem.
Regards
Ali
Hi,
It seems strange. I didn’t have this problem because pixman is included in all stable versions of Cairo like 1.6.4.
Regards.
Hi Paguliar,
Some strange problems with GTK+ are cropping up everytime.
May be if u dont mind can u explain it form the scrath ,I mean from the installation of STlinux and its package to the gtk+.That will be very kind of you.Because it’s been almost fortnight i m trying to get thing up and running.
regards
Hi Ali,
Thanks, i have solved the pixman issue.
Hi Goralf,
Did u successfully built and installed GTK+ also.If so pls shed some light on it.
Regards
Hi Ali,
I can explain you the installation of STLinux, but not in this post since it’s off-topic.
Meanwhile you can check the STLinux site for info on how to install/uninstall/updgrade it:
http://stlinux.com/docs/manual/
Graphics/video drivers in STLinux:
http://www.stlinux.com/docs/manual/distribution/distribution_guide9.php#1124413
Regards.
Hi Ali,
Yes, but don’t test.And what matters do you meet now?
Hi Peguliar / Goralf,
I am getting stuck at the configuration and build of GTk+ library. Something or other creeps up.May be i have to test it by clean the stlinux and the stgfb and reinstalling everthing from scratch.
I am getting this error.
checking pkg-config is at least version 0.16… yes
checking for GLIB – version >= 2.13.5… no
*** Could not run GLIB test program, checking why…
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GLIB is incorrectly installed.
configure: error:
*** GLIB 2.13.5 or better is required. The latest version of
*** GLIB is always available from ftp://ftp.gtk.org/pub/gtk/.
Did u cleaned everhting i mean even stlinux and stgfb package and re installed .
Regards
Ali
Hi Ali,
Yes, i changed to a new stlinux environment on another host.From your error msg, maybe that GLIB was installed with issue.
Hi,
Finally i was able to configure GTK+.But during build it’s giving error .
make gtk-update-icon-cache
make[3]: Entering directory `/opt/gtk+-2.12.11/gtk’
make[3]: `gtk-update-icon-cache’ is up to date.
make[3]: Leaving directory `/opt/gtk+-2.12.11/gtk’
no –force –ignore-theme-index
–source builtin_icons stock-icons > gtkbuiltincache.h.tmp &&
mv gtkbuiltincache.h.tmp gtkbuiltincache.h
/bin/sh: no: command not found
make[2]: *** [gtkbuiltincache.h] Error 127
make[2]: Leaving directory `/opt/gtk+-2.12.11/gtk’
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/gtk+-2.12.11′
make: *** [all] Error 2
Were am i messing ?
Regards
Hi,
GTK+ makefile is trying to run this statement on bash
$(gtk_update_icon_cache_program) –force –ignore-theme-index –source builtin_icons stock-icons > gtkbuiltincache.h.tmp
&& mv gtkbuiltincache.h.tmp gtkbuiltincache.h
where as :
gtk_update_icon_cache_program is set as no.
so there is error :
/bin/sh: no: command not found
what can be done to solve this issue.
Regards
Hi Peguliar,
You have asked to remove a line from the makefile for GTK+
“Remove the linking line of the rule gtk-query-immodules-2.0$(EXEEXT).
Can u explain what exactly and which line i should remove in the make file (gtk/Makefile:).
shall i remove this line :
(1) bin_PROGRAMS = gtk-query-immodules-2.0$(EXEEXT)
gtk-update-icon-cache$(EXEEXT)
or shall i remove this line :
(2) $(LINK) $(gtk_query_immodules_2_0_LDFLAGS)
$(gtk_query_immodules_2_0_OBJECTS)
$(gtk_query_immodules_2_0_LDADD) $(LIBS)
Regards
Hi Ali,
You should comment number (2) of your previous post where it links gtk-query-immodules
I didn’t have problems with gtk_update_icon_cache_program as you mention in comment #13. It seems that the first part of the command was removed. Check if you didn’t remove it by mistake.
Regards.
Hi Paguilar.
I was able to build the GTk+ package and install it in target ROOTFS.But when i booted the board over nfs and tried to run gtk-demo it gave an error.
————————————————————–
root@LDDE22_ALi:/# gtk-demo
gtk-demo: error while loading shared libraries: libgdk_pixbuf-2.0.so.0: cannot open shared object file: No such file or directory
————————————————————–
Regards
Hi Ali,
You can do:
I haven’t tested the second one, but it should work.
Regards,
Hi Paguliar,
I have done the chnages to .la files in $PERIX .And then did ldconfig -v .After that i ran the gtk-demo.some how i got this error.
———————————————————–
root@LDDE22_ALi:/# gtk-demo
=======================|DirectFB 1.0.0 ==========================
(c) 2001-2007 The DirectFB Organization (directfb.org)
(c) 2000-2004 Convergence (integrated media) GmbH
————————————————————
(*) DirectFB/Core: Single Application Core. (2007-12-07 13:08)
(*) Direct/Thread: Running ‘VT Switcher’ (CRITICAL, 310)…
(*) Direct/Thread: Running ‘LiRC Input’ (INPUT, 311)…
(*) DirectFB/Input: LIRC Device 0.2 (directfb.org)
(*) Direct/Thread: Running ‘PS/2 Input’ (INPUT, 316)…
(*) DirectFB/Input: IMPS/2 Mouse 1.0 (directfb.org)
(*) Direct/Thread: Running ‘Keyboard Input’ (INPUT, 317)…
(*) DirectFB/Input: Keyboard 0.9 (directfb.org)
(!) DirectFB/gfxdrivers/stgfx: FB file descriptor = 3
(*) DirectFB/Graphics: ST Microelectronics BDisp 0.99 (ST Microelectronics)
(*) DirectFB/Core/WM: Default 0.3 (directfb.org)
(gtk-demo:307): Gdk-CRITICAL **: gdk_drawable_set_colormap: assertion `cmap == NULL || gdk_drawable_get_depth (drawable) == cmap->visual->depth’ failed
(*) Direct/Thread: Running ‘EventBufferFeed’ (MESSAGING, 318)…
(gtk-demo:307): Pango-CRITICAL **: No fonts found:
This probably means that the fontconfig
library is not correctly configured. You may need to
edit the fonts.conf configuration file. More information
about fontconfig can be found in the fontconfig(3) manual
page and on http://fontconfig.org
(gtk-demo:307): Pango-CRITICAL **: No modules found:
No builtin or dynamically loaded modules were found.
PangoFc will not work correctly.
This probably means there was an error in the creation of:
‘/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/etc/pango/pango.modules’
You should create this file by running:
pango-querymodules > ‘/opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/etc/pango/pango.modules’
(gtk-demo:307): Pango-WARNING **: failed to find shape engine, expect ugly output. engine-type=’PangoRenderFc’, script=’latin’
(gtk-demo:307): Pango-CRITICAL **: No fonts found:
This probably means that the fontconfig
library is not correctly configured. You may need to
edit the fonts.conf configuration file. More information
about fontconfig can be found in the fontconfig(3) manual
page and on http://fontconfig.org
(gtk-demo:307): Gdk-DirectFB-WARNING **: gdk_display_request_selection_notification Unimplemented function
(gtk-demo:307): Gdk-DirectFB-WARNING **: gdk_window_set_keep_above() not implemented.
(gtk-demo:307): Gdk-DirectFB-WARNING **: gdk_window_set_keep_below() not implemented.
** (gtk-demo:307): WARNING **: Cannot find demo data file “appwindow.c”
——————————————————————-
and on the Tv i see a window bieng displayed .But with junk characters on windows.
what exactly is wrong here.
Regards
Ali
———————————————————–
***I was thinking u should allow files attachement on this blog .so that we can share snapshots of output display and other files as well. or some way to post images / pictures
————————————————————-
Hi Ali,
You have to create the pango.modules file:
Btw, check this post https://paguilar.org/?p=10
for formatting the code. In this way is easier to read it.
I’ll have a look at the attchmnt uploading. The default installation of the blog software doesn’t allow it. I have to search a plugin…
Regards.
Hi ,
I did the abouve suggested step .But it says file doss not exist.
———————————————————
root@LDDE22_ALi:~# pango-querymodules > /usr/local/etc/pango/pango.modules
-bash: /usr/local/etc/pango/pango.modules: No such file or directory
———————————————————-
The above link is asking user name and pwd!!!!!!!!!!
Regards
Ali
Hi Ali,
The pango-querymodules program works for me in the target.
If you only type the program name you should see in the terminal something like this:
Btw, I corrected the link in comment #20. Check it for formatting code.
Regards.
Hi Paguilar,
When i run the gtk-demo, i have the error:
root@goral:/root_STFAE# gtk-demo
gtk-demo: symbol lookup error: /usr/local/lib/libgtk-directfb-2.0.so.0: undefined symbol: g_hash_table_ref
root@goral:/root_STFAE#
Can you tell me what’s about this error?
Thanks!
Hi goralf,
This happens because when gtk-demo is executed it tries to load its shared libraries (glib, pango and so on), but the dynamic loader doesn’t know where they are.
You can solve doing this:
if this doesn’t work, add the /usr/local/lib directory to its path. This is done in the file /etc/ld.so.conf.
Regards.
Hi Paguilar,
I make sure the /usr/local/lib directory in it’s path.And i run the ldconfig -v on target,but the error is still.As the error msg, it seems that there is issue in the /usr/local/lib/libgtk-directfb-2.0.so.0 .
Hi Paguilar,
The following is the ldd msg:
root@goral:/root_STFAE# ldd -d /usr/local/bin/gtk-demo
undefined symbol: g_hash_table_ref (/usr/local/lib/libgtk-directfb-2.0.so.0)
undefined symbol: g_hash_table_unref (/usr/local/lib/libgtk-directfb-2.0.so.0)
libgdk_pixbuf-2.0.so.0 => /usr/local/lib/libgdk_pixbuf-2.0.so.0 (0x29584000)
libgdk-directfb-2.0.so.0 => /usr/local/lib/libgdk-directfb-2.0.so.0 (0x295b7000)
libgtk-directfb-2.0.so.0 => /usr/local/lib/libgtk-directfb-2.0.so.0 (0x2963d000)
libdirectfb-1.0.so.0 => /usr/lib/libdirectfb-1.0.so.0 (0x299fb000)
libfusion-1.0.so.0 => /usr/lib/libfusion-1.0.so.0 (0x29a6b000)
libdirect-1.0.so.0 => /usr/lib/libdirect-1.0.so.0 (0x29a83000)
libpthread.so.0 => /lib/libpthread.so.0 (0x29aa5000)
libpangocairo-1.0.so.0 => /usr/local/lib/libpangocairo-1.0.so.0 (0x29acd000)
libpangoft2-1.0.so.0 => /usr/local/lib/libpangoft2-1.0.so.0 (0x29ae8000)
libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0x29b22000)
libatk-1.0.so.0 => /usr/lib/libatk-1.0.so.0 (0x29b70000)
libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x29b9c000)
libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0x29bdd000)
libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x29bf0000)
libcairo.so.2 => /usr/local/lib/libcairo.so.2 (0x29c98000)
libpixman-1.so.0 => /usr/local/lib/libpixman-1.so.0 (0x29cf9000)
libpng12.so.0 => /usr/lib/libpng12.so.0 (0x29d3c000)
libfontconfig.so.1 => /usr/X11R7/lib/libfontconfig.so.1 (0x29d80000)
libxml2.so.2 => /usr/lib/libxml2.so.2 (0x29dc5000)
libdl.so.2 => /lib/libdl.so.2 (0x29f0b000)
libm.so.6 => /lib/libm.so.6 (0x29f1f000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x29faa000)
libz.so.1 => /usr/lib/libz.so.1 (0x2a02b000)
libc.so.6 => /lib/libc.so.6 (0x2a04c000)
/lib/ld-linux.so.2 (0x29556000)
libexpat.so.1 => /usr/lib/libexpat.so.1 (0x2a190000)
root@goral:/root_STFAE#
It seems that the glib path is wrong.
Hi goralf,
Check the version of your glib, I remember I had the same problem with other software (Swfdec) because I was not using the latest glib version. May be you linked GTK+ against the already provided glib located in /usr/lib instead of the new one that should be in /usr/local/lib.
Regards.
Hi Paguilar,
The version is same as yours.I find some libs path all is in /usr/lib(libpng12.so.0,libpng12.so.0,glib,libfontconfig.so.1,libfreetype.so.6 etc).
But some is right(libcairo.so.2,libpangoft2-1.0.so.0).
It’s so strange!
Hi Paguilar,
Which .la files in $PREFIX need to be modified?The .la files of subdir of $PREFIX need to be modified?
Thanks!
Hi Paguilar,
1) First of all the file (pango.modules)is not being created.I created the file manually in /usr/local/etc/pango/ directory and then executed the command
> “pango-querymodules > /usr/local/etc/pango/pango.modules”
2)Then i ran only the pango-querymodules :I go this output.The file does not have any contents except comments.
# Pango Modules file
# Automatically generated file, do not edit
#
# ModulesPath = /opt/STM/STLinux-2.2/devkit/sh4/target/usr/local/lib/pango/1.6.0/modules
#
3)and Morever The File contents of your pango.modules shows the path as “/opt/oe/STM…… “this path does not exist on the target
4)If u See the log when i m running thr GTK-demo .IT says font not found.
“(gtk-demo:311): Pango-CRITICAL **: No fonts found:”
and
“Pango-CRITICAL **: No modules found:”
Regards
Hi Paguliar,
I want to compile a small gtk program.How do i do that on my host can just post a smaple application and its build procedure for cocoref.
REgards
Hi Ali,
Can you show your msg while use ldd -d gtk-demo?
Thanks!
Hi,
THis is the msg i get when i run ldd -d gtk-demi.
Regards
Hi Ali,
I guess my error is caused by wrong glib path linked.And how you set the Environment?
Thanks!
Hi Goralf ,
My environment variable are set according to the procedure mentioned in this blog.Nothing unusual.
Regards
Hi Ali,
You set export PKG_CONFIG_PATH=$LD_LIBRARY_PATH/pkgconfig?
This may be not sutiable to libdirectfb.
Hi Goralf ,
Initialy from glib till pango i have set .
export PKG_CONFIG_PATH=$LD_LIBRARY_PATH/pkgconfig
Then at the time of gtk+ i have set updated the path to .
export PKG_CONFIG_PATH=$LD_LIBRARY_PATH/pkgconfig:$PREFIX/../lib/pkgconfig
Regards
Hi Ali,
Thanks, i will try this again.
Hi Ali,
I try this, but issue is still.I want to know how you set the .pc files and .la files when compiling GTK.
Thanks!
Hi ,
When i m installing font config .I m getting this warning.
***
*** Warning: fonts.cache not built
***
*** Generate this file manually on host system using fc-cache
***
Isn’t the fonts cache suppose to be built .Na dif it is not built how does my application load the cache?
Regards
Hi,
Sorry for the late reply, I was on holidays for a few days.
Regarding the linking problems that goralf had, I thought the following:
It’s better to leave the PKG_CONFIG_PATH env var as it’s set at the beginning:
and edit directfb.pc, direct.pc and fusion.pc as it’s described.
This could lead to some problems like the ones you’re having because all the packages that you already installed (glib, pango, cairo…) were installed in $PREFIX, not in /usr/local. Therefore, when you execute any GTK+ based app it would search the libs in $PREFIX, that doesn’t exist.
You can solve this by following the second option of comment #18 or (an ugly but quick option) by creating in your target a directory /opt/oe/STM/STLinux-2.2/devkit/sh4 and then a logical link:
In this way anything that searches for $PREFIX will be found. This is NOT a clean way to do it, it’s just useful for a quick test. It’s much better if you edit the .la files.
Hope this helps.
Regards.
Hi Ali,
The reason why my pango.modules have $PREFIX instead of /usr/local/… is described in comment #41.
In any case, pango-querymodules should give you a non-empty answer. You can try, just for testing, to copy your pango.modules from your host to the target. At this point you would see a nice output.
Just a thought: I think the only executable of pango-querymodules is the one that we install following this this procedure. Check that you’re executing this app and not another app that was provided by ST (I don’t remember if ST provides it in /usr).
Hope this helps.
Regards.
Hi
I solved the issue.That’s because i use the stfae tree, and the LD_LIBRARY_PATH in load_fb.sh is problem.I add the /usr/local/lib at the front of LD_LIBRARY_PATH.
Thank you for help!
Hi,
I m trying to generate font cahe by giving this command
$fc-cache -fs
I m getting error
_________________________________________________________
./fc-cache: symbol lookup error: ./fc-cache: undefined symbol: FcConfigGetCacheDirs
_________________________________________________________
regards
Hi Paguilar,
YOu have suggested to follow these steps before executing the gtk-demo application on target.
* Run in the target ldconfig -v
* Edit all the .la files in $PREFIX. Change all the paths that have PREFIX (/opt/…) to /usr/local/…
But we have also edit the libdirectfb.la and libfusion.la in $prefix/../lib while building gtk+. DO i have to change there path as well to /usr/local /lib from /opt/STM/../usr/local.lib
Regards
Hi Ali,
I’ve never used fc-cache in the target, so I’ve never had this problem.
If you created the ugly logical link that I mentioned in comment #41 you don’t need to change them because it will find them through this link.
Regards.
I use a 64bit AMD host pc to cross compile GTK+ for STi7109 target board.
I obtain the following error
/opt/STM/STLinux-2.2/devkit/sh4/lib/gcc/sh4-linux/4.1.1/../../../../sh4-linux/bin/ld: skipping incompatible /opt/STM/STLinux-2.2/devkit/sh4/target/usr/lib/libpangoft2-1.0.so when searching for -lpangoft2-1.0
/opt/STM/STLinux-2.2/devkit/sh4/lib/gcc/sh4-linux/4.1.1/../../../../sh4-linux/bin/ld: skipping incompatible /opt/STM/STLinux-2.2/devkit/sh4/target/usr/lib/libpangoft2-1.0.so when searching for -lpangoft2-1.0
/opt/STM/STLinux-2.2/devkit/sh4/lib/gcc/sh4-linux/4.1.1/../../../../sh4-linux/bin/ld: skipping incompatible /opt/STM/STLinux-2.2/devkit/sh4/target/usr/lib/libpangoft2-1.0.so when searching for -lpangoft2-1.0
/opt/STM/STLinux-2.2/devkit/sh4/lib/gcc/sh4-linux/4.1.1/../../../../sh4-linux/bin/ld: cannot find -lpangoft2-1.0
collect2: ld a retourné 1 code d’état d’exécution
It seems that this error occurs because the needed library was compiled on a 32bit system.
If its the case what should I do?
regards khaled
Hi Khaled,
It seems that libpangoft2-1.0.so was compiled for an arch that is different from the one that you are compiling for.
If this is the case, as you said, you would need to compile the whole chain (or at least pango) for the same arch: make sure that you are using the same compiler for all packages and installing them in the right path checking that the environment vars are correctly set.
Another problem could be that the linker is looking for pango in the wrong path. This can be fixed setting the LD_CONFIG_PATH and PKG_CONFIG_PATH to the path in which you’re actually installing GTK+.
Regards,
Pingback: Websites tagged "pthread" on Postsaver
Hi,
I have a couple of lingering problems with gtk-demo:
1. Gdk-CRITICAL **: gdk_drawable_set_colormap:
Is a colormap required? I am using RGB16.
2. Pango-CRITICAL **: No fonts found
a) why when I do: pango-querymodules > …
respond with “does not export Pango API” in all cases?
lib/pango/1.6.0/modules/pango-basic-fc.so does not export Pango module API
b) why does the fc-cache -fv
respond 0 fonts in all cases?
/etc/fonts: caching, new cache contents: 0 fonts, 2 dirs
/etc/fonts/conf.avail: caching, new cache contents: 0 fonts, 0 dirs
/etc/fonts/conf.d: caching, new cache contents: 0 fonts, 0 dirs
/root/.fonts: caching, new cache contents: 0 fonts, 2 dirs
/conf.avail: caching, new cache contents: 0 fonts, 0 dirs
/conf.d: caching, new cache contents: 0 fonts, 0 dirs
etc., etc,
Regards, david
Hi David,
Sorry for the late reply. I’ve been quite busy at work and at home.
1. IIRC, this is a problem regarding only the DirectFB backend of GDK. The main developer of DirectFB posted a patch for GTK+ 2.12.9 that fixes a lot of things. May be if you try it you could solve your problem.
2. I’ve never seen this problem before. You could check how you configured and installed Fontconfig and Pango and how you set the environment variables. May be the problem is more with Fontconfig (but it’s just a guess).
Hi Paguilar,
The following error occured when install GTK+. Do you know where might be the problem?
=========
make[4]: Entering directory `/usr/gtk/src/gtk+-2.12.11/modules/input’
/bin/sh ../../mkinstalldirs /usr/gtk/etc/gtk-2.0
../../gtk/gtk-query-immodules-2.0 > /usr/gtk/etc/gtk-2.0/gtk.immodules
../../gtk/gtk-query-immodules-2.0: symbol lookup error: /usr/gtk/lib/libcairo.so.2: undefined symbol: direct_config
make[4]: *** [install-data-hook] Error 127
make[4]: Leaving directory `/usr/gtk/src/gtk+-2.12.11/modules/input’
make[3]: *** [install-data-am] Error 2
make[3]: Leaving directory `/usr/gtk/src/gtk+-2.12.11/modules/input’
make[2]: *** [install-am] Error 2
make[2]: Leaving directory `/usr/gtk/src/gtk+-2.12.11/modules/input’
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/usr/gtk/src/gtk+-2.12.11/modules’
make: *** [install-recursive] Error 1
=========
Regards,
Kimi
Hi Kimi,
Normally gtk-query-immodules-2.0 is not needed in an embedded system, so you can comment it:
Remove the linking line of the rule gtk-query-immodules-2.0$(EXEEXT).
If you still have problems or simply you want to have that program you can add the DirectFB linking flags -ldirectfb -ldirect -lfusion and their path, but I’m not sure this will be enough because I tried it some time ago and it didn’t work for me.
Regards.
I tried to use your instructions to build GTK+ on a MIPS architectuire (a NXP chipset).
Unfortunatelly i get stuck on cairo ./configure,
which reports:
configure: error: Cairo requires at least one font backend.
Please install freetype and fontconfig, then try again:
http://freetype.org/ http://fontconfig.org/
I took a peek on config.log and found the followings:
configure:27976: mipsel-linux-gcc -o conftest -g -O2 -I/rootfs/opt/gtkdfb/include/fontconfig conftest.c -lm /rootfs/opt/gtkdfb/lib/libfontconfig.so >&5
/work/stb/STB225/toolchain/tuxbuilder-1.0/mipsel-unknown-linux-gnu/cross/bin/../lib/gcc/mipsel-unknown-linux-gnu/4.2.1/../../../../mipsel-unknown-linux-gnu/bin/ld: warning: libfreetype.so.6, needed by /rootfs/opt/gtkdfb/lib/libfontconfig.so, not found (try using -rpath or -rpath-link)
/work/stb/STB225/toolchain/tuxbuilder-1.0/mipsel-unknown-linux-gnu/cross/bin/../lib/gcc/mipsel-unknown-linux-gnu/4.2.1/../../../../mipsel-unknown-linux-gnu/bin/ld: warning: libxml2.so.2, needed by /rootfs/opt/gtkdfb/lib/libfontconfig.so, not found (try using -rpath or -rpath-link)
/rootfs/opt/gtkdfb/lib/libfontconfig.so: undefined reference to `FT_Get_PS_Font_Info’
/rootfs/opt/gtkdfb/lib/libfontconfig.so: undefined reference to `xmlCreatePushParserCtxt’
/rootfs/opt/gtkdfb/lib/libfontconfig.so: undefined reference to `FT_Init_FreeType’
/rootfs/opt/gtkdfb/lib/libfontconfig.so: undefined reference to `FT_Get_Sfnt_Name’
/rootfs/opt/gtkdfb/lib/libfontconfig.so: undefined reference to `FT_Load_Glyph’
/rootfs/opt/gtkdfb/lib/libfontconfig.so: undefined reference to `FT_Done_Face’
/rootfs/opt/gtkdfb/lib/libfontconfig.so: undefined reference to `FT_Get_Char_Index’
/rootfs/opt/gtkdfb/lib/libfontconfig.so: undefined reference to `FT_Get_Sfnt_Table’
/rootfs/opt/gtkdfb/lib/libfontconfig.so: undefined reference to `xmlSAX2GetLineNumber’
/rootfs/opt/gtkdfb/lib/libfontconfig.so: undefined reference to `xmlParseChunk’
/rootfs/opt/gtkdfb/lib/libfontconfig.so: undefined reference to `FT_Has_PS_Glyph_Names’
/rootfs/opt/gtkdfb/lib/libfontconfig.so: undefined reference to `FT_Get_Glyph_Name’
/rootfs/opt/gtkdfb/lib/libfontconfig.so: undefined reference to `FT_Select_Charmap’
/rootfs/opt/gtkdfb/lib/libfontconfig.so: undefined reference to `xmlCtxtGetLastError’
/rootfs/opt/gtkdfb/lib/libfontconfig.so: undefined reference to `FT_Get_Next_Char’
/rootfs/opt/gtkdfb/lib/libfontconfig.so: undefined reference to `FT_Load_Sfnt_Table’
/rootfs/opt/gtkdfb/lib/libfontconfig.so: undefined reference to `FT_Done_FreeType’
/rootfs/opt/gtkdfb/lib/libfontconfig.so: undefined reference to `FT_Get_Sfnt_Name_Count’
/rootfs/opt/gtkdfb/lib/libfontconfig.so: undefined reference to `FT_Select_Size’
/rootfs/opt/gtkdfb/lib/libfontconfig.so: undefined reference to `FT_Get_X11_Font_Format’
/rootfs/opt/gtkdfb/lib/libfontconfig.so: undefined reference to `FT_Get_BDF_Property’
/rootfs/opt/gtkdfb/lib/libfontconfig.so: undefined reference to `xmlFreeParserCtxt’
/rootfs/opt/gtkdfb/lib/libfontconfig.so: undefined reference to `FT_Get_First_Char’
/rootfs/opt/gtkdfb/lib/libfontconfig.so: undefined reference to `FT_New_Face’
How do i fix this? Why doesn’t see the libfreetype.so.6 which is locate in the same lib file as all others (rootfs/opt/gtkdfb/lib)
Hi Iulian,
This is a bit strange if you use the same packages versions, did you double-check that your environment vars (specifically LD_LIBRARY_PATH) are correctly configured?
Hi paguilar,
all env’s are correct:
export PREFIX=/rootfs/opt/gtkdfb
export LD_LIBRARY_PATH=$PREFIX/lib
export PKG_CONFIG_PATH=$LD_LIBRARY_PATH/pkgconfig
all libs that i need are in $PREFIX/lib and all headers in $PREFIX/include
I finally managed to build Cairo, Pango and finally GTK
by setting CFLAGS and LDFLAGS.
I don’t know why your steps didn’t work in my case.
I must say that prior to embedded build i used your instructions to build the same packages on my PC (FC9) and i had no problem
Hi Panguilar ,
i need to cross compile mozilla for arm board . i have already cross compiled required libraries like gtk+2.12.9,glib,directfb,cairo etc.
could you tell me whether there is any difference with the mozilla source code , ie can i compile the general code from mozilla.org or there is specific tar ball for mozilla supporting frame buffer(my requirement is frame buffer must be supported) .
Hi,
For building Mozilla over DirectFB you can follow the procedure described in this link:
https://wiki.mozilla.org/Mobile/DFBPorting
Regards.
Hi paguilar,
Now I’m porting GTK for powerpc32.
When I make GTK, it get error:
powerpc-linux-gnu-gcc -g -O2 -Wall -o .libs/gtk-update-icon-cache updateiconcache.o -L/home/debian/ppc/lib ../gdk-pixbuf/.libs/libgdk_pixbuf-2.0.so -L/home/debian/ppc//lib /home/debian/ppc//lib/libgmodule-2.0.so -ldl /home/debian/ppc//lib/libgobject-2.0.so /home/debian/ppc//lib/libglib-2.0.so /home/debian/ppc/lib/libpng12.so -lz -lm -Wl,–rpath -Wl,/home/debian/ppc/lib -Wl,–rpath -Wl,/home/debian/ppc//lib
creating gtk-update-icon-cache
make[3]: Leaving directory `/home/debian/Software/gtk+-2.12.9/gtk’
/usr/bin/gtk-update-icon-cache –force –ignore-theme-index
–source builtin_icons stock-icons > gtkbuiltincache.h.tmp &&
mv gtkbuiltincache.h.tmp gtkbuiltincache.h
/usr/bin/gtk-update-icon-cache: error while loading shared libraries: /home/debian/ppc/lib/libgobject-2.0.so.0: ELF file data encoding not little-endian
make[2]: *** [gtkbuiltincache.h] Error 127
make[2]: Leaving directory `/home/debian/Software/gtk+-2.12.9/gtk’
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/debian/Software/gtk+-2.12.9′
make: *** [all] Error 2
Do you know this error? and how can I fix it?
Thank you very much!
Hi,
Normally when buuilding for an embedded system gtk-update-icon-cache is not needed, so you can comment the line in the gtk/Makefile when it tries to execute it:
Regards.
Can any one link me to the schematic of ic sti7109
mathad.chetan@gmail.com
hi,paguilar
I have built mozilla-dfb-src successfully according to the procedure discribed in https://wiki.mozilla.org/Mobile/DFBPorting
The content of my .directfbrc file is as the following:
wm=default
mode=800×600
depth=16
system=fbdev
I run the gtk-demo correctly!but when I run ./firefox under mozilla-dfb-src/dist/bin directory.My machine went dead,and I have to reboot
Did I miss anything?
do you have any ideas about that?
Thanks in advance!
Hi Richard,
I haven’t tried firefox under DirectFB so I’m afraid I cannot be of help.
It seems that display remains locked by DirectFB (pings and ssh should keep working). If gtk-demo runs correctly means that all the chain up to GTK+ works correctly. So it could be a firefox issue. May be a wrong snapshot?
You could ask in the DirectFB development mailing list.
Regards.
thanks paguilar,for your remind.
I’m trying to send a mail to DirectFB development mailing list.
Hi paguilar,
I am trying to build GTK for MIPS.
When i do a make for atk i get the following error:
make all-recursive
make[1]: Entering directory `/home/vinay/GTK_DFB/packages/packages_tar/atk-1.24.0′
Making all in atk
make[2]: Entering directory `/home/vinay/GTK_DFB/packages/packages_tar/atk-1.24.0/atk’
glib-genmarshal –prefix=atk_marshal ./atkmarshal.list –header >> xgen-gmh
&& (cmp -s xgen-gmh atkmarshal.h || cp xgen-gmh atkmarshal.h)
&& rm -f xgen-gmh xgen-gmh~
&& echo timestamp > stamp-atkmarshal.h
glib-genmarshal: error while loading shared libraries: /usr/local/Broadcom_GTK/lib/libglib-2.0.so.0: ELF file data encoding not little-endian
make[2]: *** [stamp-atkmarshal.h] Error 127
make[2]: Leaving directory `/home/vinay/GTK_DFB/packages/packages_tar/atk-1.24.0/atk’
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/vinay/GTK_DFB/packages/packages_tar/atk-1.24.0′
make: *** [all] Error 2
Please help me fix this error.
Thanks a lot .
Hi Vinay,
The problem is that Atk is using the libraries for your x86 host, not the ones for your mips target. Check that the environment variables are set correctly, specially LD_LIBRARY_PATH that must be set to your target’s rootfs.
Another cause of this problem could be that you’re using a different Atk version. It’s better if you use the ones described here. They’re a bit out-dated, but they work!
Regards.
Hi Paguilar,
I am trying to build GTK for MIPS.
When i do a make for atk i get the error what vinay was facing:
Mine LD_LIBRARY_PATH=/usr/local/GTK_APP for mips
Also i tried with the same version as mentioned above then also the same situation.
While cross compilig glib that threw an error for iconv and gettext not found.
Finally i cross compiled glib after cross compiling iconv and gettext.
Please help me
Hi Sachin,
Did you check that LD_LIBRARY_PATH=/usr/local/GTK_APP is the path where the libs for you target are?
Eg. the glib that you just installed should be there.
I hope this helps, otherwise I’m out of ideas at the moment.
I’ve never had the need to compile iconv and gettext, may be because they were already installed in the target.
Regards.
Hi Panguilar,
MY environment variables are,
export PREFIX=/usr/local/GTK_APP
export LD_LIBRARY_PATH=$PREFIX/lib
export PKG_CONFIG_PATH=$LD_LIBRARY_PATH/pkgconfig:$PKG_CONFIG_PATH
export COMPILER2=mips-linux-uclibc-gcc
export HOST=mips-linux-uclibc
export BUILD=i386-linux
export PKG_CONFIG=/usr/bin/pkg-config
In my case glib-genmarshal is of little endian type from /usr/bin of linux pc.
My LD_LIBRARY_PATH is /usr/local/GTK_APP/lib (which are all of big endian type).
If i set environment variable PATH to tool chaine:/usr/local/GTK_APP/bin that shows error as glib-genmarshal
cant execute binary file.
This problem seems to be obvious as I try to execute BIG ENDIAN binary in LITTLE ENDIAN machine .
I tried out aother way commenting “glib-genmarshal” in ATK Makefile . I did not face any problem.
I then tried compiling GTK and faced that problem saying “ELF file data encoding not LITTLE ENDIAN ” same as in the case of ATK.
Again in GTK I commented GEN_MARSHALL .
Finally I got error saying
/.libs/libgtk-directfb-2.0.so: undefined reference to `gtk_marshal_BOOLEAN__VOID’
I feel that All these errors are because of glib libraries .
Can you please help me in this regard
Thanks in advance.
Hey,
I have been trying to follow your guide but I keep running into the following when making ATK –
glib-genmarshal: error while loading shared libraries: /usr/TS7390GTKfb/lib/libglib-2.0.so.0: ELF file OS ABI invalid
This tells me that the host version of glib-genmarshal can’t read the libglib that I just built because its for the target.
So I set the PATH to the glib-genmarshal that was built while cross-compiling glib but the host can’t run that program because the binary is from ARM (my target board).
From the web the only solution I can find is to unset the LD_LIBRARY_PATH while making ATK – but that seems wrong to me because ATK would then pick up the host version of GLIB, not newly built target version – and also without having LD_LIBRAY_PATH set to the lib of my development area – $PREFIX/lib – the make doesn’t know where to pick up the other libraries – in my case libfusion.
Do you have a solution to this problem? I can only imagine that most would come across this if following the same procedure.
Any help is much appreciated.
Thanks,
Sean.
Hi Sean,
With atk-1.23.5 I didn’t have this problem. But I remember I have seen it before, although I don’t remember what I was compiling.
A workaround to this problem could be to comment the line that calls glib-genmarshal. It’s not nice, but it shouldn’t create any side-effect.
Another way for solving it is a bit tricky: start compiling atk as you are doing it, then when it gives the error move the sources to the target and let glib-genmarshal to execute, then take the sources back to the host and continue the compilation.
I used this procedure for compiling for the first time swfdec.
I hope this helps you.
Hi,
Thanks for your response to my question.
I finally got over this issue – I used different versions of some of the libraries – and specifically I used the latest versions of GLIB and ATK, which overcame this issue.
But I am having a similar issue with compiling the GTK+ library. I am getting the following error:
/usr/bin/gtk-update-icon-cache: error while loading shared libraries: libgobject-2.0.so.0: ……
From one of your previous posts I commented out the line in the makefile that is trying to do this operation and the make continued. But after this I got the following error, which I can’t fix:
/usr/bin/gdk-pixbuf-csource: error while loading shared libraries: /usr/TS7390GTK//lib/libgio-2.0.so.0: ELF file OS ABI invalid
So the problem now is with the gdk-pixbuf-csource binary of the host not being able to read the traget library.
Have you come across this, and the big question is, do you have a solution?
Thanks,
Sean.
Hi Sean,
It’s good to know that you solved the first problem.
libgio is a relatively new lib that is part of glib. The last time I compiled GTK+ it did not exist, so I cannot tell you much about it. I don’t know the consequences if you comment out that line. May be you can execute that command in the target and then come back with the result to the host: it’s the same idea that I described in comment #71.
I realized that it’s one year since this post so I have definitely to find some time to update this procedure.
Regards.
i am running WebKit browser with gtk+directfb backend while unning i am getting following error.
please can any one tell how to resolve this problem
GtkLauncher:1006): Gdk-CRITICAL **: gdk_drawable_set_colormap: assertion `cmap == NULL || gdk_drawable_get_depth (drawable) == cmap->visual->depth’ failed
(*) Direct/Thread: Started ‘EventBufferFeed’ (-1) [MESSAGING OTHER/OTHER 0/0] …
(GtkLauncher:1006): Pango-CRITICAL **: No fonts found:
This probably means that the fontconfig
library is not correctly configured. You may need to
edit the fonts.conf configuration file. More information
about fontconfig can be found in the fontconfig(3) manual
page and on http://fontconfig.org
(!) [ 1006: 0.000] –> Caught signal 11 (at (nil), invalid address) <–
(!!!) *** WARNING [still objects in ‘Window Pool’] *** [object.c:241 in fusion_object_pool_destroy()]
(!!!) *** WARNING [still objects in ‘Layer Region Pool’] *** [object.c:241 in fusion_object_pool_destroy()]
(!!!) *** WARNING [still objects in ‘Layer Context Pool’] *** [object.c:241 in fusion_object_pool_destroy()]
(!!!) *** WARNING [still objects in ‘Surface Pool’] *** [object.c:241 in fusion_object_pool_destroy()]
Aborted
Hi,
If IIRC you need to copy some fonts to the target. You can get the fonts from your target. eg. from /usr/share/fonts/truetype/
The directory where you will copy the fonts to is the one that you write in the fonts.conf file needed by fontconfig.
Regards.
Hi,
First off thanks for all the work on the site, I have found it extremely useful.
I am having some problems with making libpng. I have followed your instructions work for word and I have had zero errors until I try to Make libpng, here is what is output to the screen.
make all-am
make[1]: Entering directory `/usr/arm-gtkdfb/src/libpng-1.2.29′
/bin/sh ./libtool –tag=CC –mode=compile arm-none-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -DPNG_CONFIGURE_LIBPNG -g -O2 -MT libpng12_la-png.lo -MD -MP -MF .deps/libpng12_la-png.Tpo -c -o libpng12_la-png.lo `test -f ‘png.c’ || echo ‘./’`png.c
libtool: compile: arm-none-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -DPNG_CONFIGURE_LIBPNG -g -O2 -MT libpng12_la-png.lo -MD -MP -MF .deps/libpng12_la-png.Tpo -c png.c -fPIC -DPIC -o .libs/libpng12_la-png.o
In file included from png.c:13:
png.h:440:18: error: zlib.h: No such file or directory
In file included from png.h:444,
from png.c:13:
pngconf.h:1241: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pngconf.h:1242: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
pngconf.h:1243: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
In file included from png.c:13:
Followed by more similar to the last few lines there. My environment variables are sound as I would not have made it this far.
Would recommend trying a different version? Or is there a fix that is know to you?
Once again many thanks.
Wayne
Hi,
libng is not finding zlib, did you set this variable to ‘yes’?
That version should work without problems. I’ve compiled more recent versions, but I haven’t test them yet. As soon as I test them I will publish the results.
Sorry for the late reply, I’ve been quite busy lately.
Regards.
Hi paguilar,
I run gtk-demo on my arm board with cross compile gtk+directfb libraries.
But i got this message that I don’t know how to debug it.
could you give me some hints?
thanks.
root@x /usr/jlib/bin$ ./gtk-demo
commandline read: gtk-demo
~~~~~~~~~~~~~~~~~~~~~~~~~~| DirectFB 1.4.2 |~~~~~~~~~~~~~~~~~~~~~~~~~~
(c) 2001-2009 The world wide DirectFB Open Source Community
(c) 2000-2004 Convergence (integrated media) GmbH
—————————————————————-
(*) DirectFB/Core: Multi Application Core. (2009-12-03 07:16)
(*) Direct/Memcpy: Using libc memcpy()
(*) Fusion/Init: Builtin Implementation is still experimental! Crash/Deadlocks might occur!
(*) Fusion/SHM: Using MADV_REMOVE (2.6.28.0 >= 2.6.19.2)
(*) Direct/Thread: Started ‘Fusion Dispatch’ (2091) [MESSAGING OTHER/OTHER 0/0] …
(*) Direct/Thread: Started ‘VT Switcher’ (2093) [CRITICAL OTHER/OTHER 0/0] …
(*) Direct/Thread: Started ‘VT Flusher’ (-1) [DEFAULT OTHER/OTHER 0/0] …
(*) DirectFB/FBDev: Found ‘DISP3 BG’ (ID 0) with frame buffer at 0x93200000, 1800k (MMIO 0x00000000, 0k)
(*) Direct/Thread: Started ‘Linux Input’ (2096) [INPUT OTHER/OTHER 0/0] …
(*) DirectFB/Input: CHESEN USB Keyboard (1) 0.1 (directfb.org)
(*) Direct/Thread: Started ‘Linux Input’ (2097) [INPUT OTHER/OTHER 0/0] …
(*) DirectFB/Input: CHESEN USB Keyboard (2) 0.1 (directfb.org)
(*) Direct/Thread: Started ‘Linux Input’ (2098) [INPUT OTHER/OTHER 0/0] …
(*) DirectFB/Input: USB Optical Mouse (3) 0.1 (directfb.org)
(*) Direct/Thread: Started ‘PS/2 Input’ (2099) [INPUT OTHER/OTHER 0/0] …
(*) DirectFB/Input: IMPS/2 Mouse 1.0 (directfb.org)
(*) Direct/Thread: Started ‘Keyboard Input’ (2100) [INPUT OTHER/OTHER 0/0] …
(*) DirectFB/Input: Keyboard 0.9 (directfb.org)
(*) DirectFB/Graphics: Generic Software Rasterizer 0.6 (directfb.org)
(*) DirectFB/Core/WM: Default 0.3 (directfb.org)
(gtk-demo:2090): Gdk-CRITICAL **: gdk_drawable_set_colormap: assertion `cmap == NULL || gdk_drawable_get_depth (drawable) == cmap->vi
sual->depth’ failed
(*) Direct/Thread: Started ‘EventBufferFeed’ (2101) [MESSAGING OTHER/OTHER 0/0] …
(!) [ 2090: 1.439] –> Caught signal 11 (at 0x28, invalid address) <–
(!!!) *** WARNING [still objects in ‘Window Pool’] *** [object.c:241 in fusion_object_pool_destroy()]
(!!!) *** WARNING [still objects in ‘Layer Region Pool’] *** [object.c:241 in fusion_object_pool_destroy()]
(!!!) *** WARNING [still objects in ‘Layer Context Pool’] *** [object.c:241 in fusion_object_pool_destroy()]
(!!!) *** WARNING [still objects in ‘Surface Pool’] *** [object.c:241 in fusion_object_pool_destroy()]
(!) Direct/Thread: Canceling ‘Fusion Dispatch’ (2091)!
Aborted
Hi James,
Which version of GTK+ are you using?
May be you can try a different version (older?).
Btw, I haven’t tested the latest GTK+ with DirectFB 1.4. I hope to have time for testing them before this year ends.
Hi Paguilar,
I tried gtk+ 2.16.6 and 2.19.0 ,and got the same error.
I will try another older version.
Thanks for the suggestion.
Hi~
Im making gtk+
# make
…
…
make[3]: Entering directory `/home/nais/mini2440/src2/gtk+-2.12.11/gtk’
if arm-linux-gcc -DHAVE_CONFIG_H -I. -I. -I.. -DG_LOG_DOMAIN=”Gtk” -DGTK_LIBDIR=”/sdcard/lib” -DGTK_DATADIR=”/sdcard/share” -DGTK_DATA_PREFIX=”/sdcard” -DGTK_SYSCONFDIR=”/sdcard/etc” -DGTK_VERSION=”2.12.11″ -DGTK_BINARY_VERSION=”2.10.0″ -DGTK_HOST=”arm-unknown-linux-gnu” -DGTK_COMPILATION -DGTK_PRINT_BACKENDS=”file,lpr” -DGTK_PRINT_PREVIEW_COMMAND=””evince –unlink-tempfile –preview –print-settings %s %f”” -I../gtk -I.. -I../gdk -I../gdk -I../gdk-pixbuf -I../gdk-pixbuf -DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_FILE_SYSTEM_ENABLE_UNSUPPORTED -DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED -DG_DISABLE_CAST_CHECKS -pthread -D_REENTRANT -I/sdcard/include/glib-2.0 -I/sdcard/lib/glib-2.0/include -I/sdcard/include/pango-1.0 -I/sdcard/include/cairo -I/sdcard/include/pixman-1 -I/sdcard/include/freetype2 -I/sdcard/include -I/sdcard/include/directfb -I/sdcard/include/libpng12 -I/sdcard/include/atk-1.0 -D_REENTRANT -I/sdcard/include/cairo -I/sdcard/include/directfb -I/sdcard/include/pixman-1 -I/sdcard/include/freetype2 -I/sdcard/include -I/sdcard/include/libpng12 -g -O2 -Wall -MT updateiconcache.o -MD -MP -MF “.deps/updateiconcache.Tpo”
-c -o updateiconcache.o `test -f ‘updateiconcache.c’ || echo ‘./’`updateiconcache.c;
then mv -f “.deps/updateiconcache.Tpo” “.deps/updateiconcache.Po”;
else rm -f “.deps/updateiconcache.Tpo”; exit 1;
fi
arm-none-linux-gnueabi-gcc: %s: No such file or directory
arm-none-linux-gnueabi-gcc: %f”: No such file or directory
cc1: error: unrecognized command line option “-funlink-tempfile”
cc1: error: unrecognized command line option “-fpreview”
cc1: error: unrecognized command line option “-fprint-settings”
make[3]: *** [updateiconcache.o] Error 1
make[3]: Leaving directory `/home/nais/mini2440/src2/gtk+-2.12.11/gtk’
make[2]: *** [gtkbuiltincache.h] Error 2
make[2]: Leaving directory `/home/nais/mini2440/src2/gtk+-2.12.11/gtk’
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/nais/mini2440/src2/gtk+-2.12.11′
make: *** [all] Error 2
…?
Hi Paguilar,
I am trying to build gtk on directfb for MIPS target.
First of all, I thought of building and testing the idea on desktop(ubuntu 9.10) and then take the same libs onto MIPS.
I am building mainly 3 libs:
cairo 1.8.8
pango-1.26
gtk+-2.18.4
Other dependencies I am using from desktop.
I can patch and build gtk.
But I am facing problem in running the exmaples that come with gtk.
I am trying to run examples/text/
and getting following crash:-
#0 0x0061099e in cairo_directfb_surface_create (dfb=0x806f658, dfbsurface=0x0) at cairo-directfb-surface.c:1916
#1 0x00939a8a in _gdk_windowing_create_cairo_surface (drawable=0x80770f0, width=600, height=500) at gdkdrawable-directfb.c:1622
#2 0x00932b7e in gdk_window_create_cairo_surface (drawable=0x8071150, width=600, height=500) at gdkwindow.c:4778
#3 0x0090e192 in _gdk_drawable_create_cairo_surface (drawable=0x8071150, width=600, height=500) at gdkdraw.c:1904
#4 0x00932c24 in gdk_window_ref_cairo_surface (drawable=0x8071150) at gdkwindow.c:4815
#5 0x0090e471 in _gdk_drawable_ref_cairo_surface (drawable=0x8071150) at gdkdraw.c:1297
#6 0x0093432b in gdk_window_clear_backing_region_direct (window=0x8071150, region=0x80b0940, send_expose=)
at gdkwindow.c:4356
#7 gdk_window_clear_region_internal (window=0x8071150, region=0x80b0940, send_expose=) at gdkwindow.c:4467
#8 0x00934764 in gdk_window_clear_area_internal (window=0x8071150, x=, y=0, width=600, height=500,
send_expose=0) at gdkwindow.c:4501
#9 0x00934894 in IA__gdk_window_clear (window=0x8071150) at gdkwindow.c:4407
#10 0x0093c578 in gdk_event_translate (event=) at gdkevents-directfb.c:773
#11 dfb_events_process_window_event (event=) at gdkevents-directfb.c:160
#12 0x0093cdfd in dfb_events_io_func (channel=0x807d470, condition=G_IO_IN, data=0x0) at gdkevents-directfb.c:233
#13 0x009f7dab in ?? () from /lib/libglib-2.0.so.0
#14 0x009c0e88 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#15 0x009c4730 in ?? () from /lib/libglib-2.0.so.0
#16 0x009c4b9f in g_main_loop_run () from /lib/libglib-2.0.so.0
#17 0x003c3ef9 in IA__gtk_main () at gtkmain.c:1218
#18 0x08049cd1 in main (argc=1, argv=0xbffff324) at text.c:183
Can you suggest me how to tackle this crash ?
Thanks & Regards,
navi
Hi navi,
Sorry for the late reply.
I had a crash too when runnin gtk-demo after compiling recent versions like you, although I don’t remember right now the exact versions.
May be you could try older versions. That what I’ll do before posting a v0.3 because recent versions crashes. Notice that I was testing in an SH arch, not x86.
Hi Hong,
It seems that the arm preprocessor cc1 is not recognizing those options. If you don’t really need updateiconcache (and normally you don’t in an embedded system), you can comment it in the Makefile. I have done this before, it’s ugly but it works 😉
And sorry for the late reply.
HI paguilar
I have the same problem as Hong and i don’t know how to solve it . would you please make it clear? thanks
Hi Jack,
Did you try what I answered to Hong?
From my reply 2010/01/30: It seems that the arm preprocessor cc1 is not recognizing those options. If you don’t really need updateiconcache (and normally you don’t in an embedded system), you can comment it in the Makefile.
Notice that the GTK+ version was quite old, like the reply. Current GTK+ versions could have changed a lot.