Re: Install GTK+ on a device



On Sat, 19 Aug 2000, Xiang Hong wrote:

 Hi,

> Hi,
> 
> I am trying to install GTK+ 1.2.8 onto a device. But I believe something is missing.
> 
> The device runs a simplied Linux (2.2.14) kernel. As it has limited memory with only the OS and some basic library, like X, installed. I decided to install all my extended libraries and applications on a compact flash memory. It can be mounted to /root as a new directory (such as /xxx).
> 
> The device has no compiler, so I have to 
> (1) compile all the source code (both library and applications) on a desktop PC running Linux 2.2.14, 
> (2) install everything into /xxx (in the PC), 
> (3) copy the content in /xxx to the compact flash memory, 
> (4) mount the compact flash memory as /xxx to the device's /root, 
> (5) run ldconfig (/etc/ld.so.conf modified)
> (6) start my application and hope it can work!
> 
> This the basic idea. I believe it is right. Because so far all my applications requiring X library work. But Something wrong with my first application requiring GTK+, "gedit". It seems something is missing. I don't know much about gtk+, I just followed the instruction to install.
> 
> I compiled glib 1.2.8 and gtk+ 1.2.8 on a desktop running Linux 2.2.14, and installed all of them into /xxx. I believe I did it right. I changed "DESTDIR =" in all "Makefile.in" into "DESTDIR = /xxx". The old glib and gtk were deleted before that. Then I compiled gedit 0.5.4 after I created some links in /usr/... to the gtk+/glib header files in /xxx. Install gedit into /xxx by modifying all "DESTDIR". Finally, gedit can run on the PC with a warning.
> 
> After I copied the content of /xxx into the compact flash memory, mounted to the device, run ldconfig, and run gedit. It gave me a lot of warning and errors listed below. I guess I need to install some additional files. But I could not find in www.gtk.org,
> 
> Warning:
> 1. Gdk-WARNING **: locale not supported by C library

 It's not severe.

> Errors:
> 1. Gtk-CRITICAL **: file gtkbox.c: line 332 (gtk_box_pack_start): assertion 'child->parent == NULL'  failed.

  This looks very interesting. I have no idea why this is coming.

> 2. Gtk-CRITICAL **: file gdkfont.c: line 248 (gdk_font_id): assertion 'font != NULL'  failed.
> 3. ... tens of assertion 'font != NULL' failed, all in gdkfont.c, before the application finally aborted.
> 
> Please tell me where I can find infomation about those missing fonts, how to install, and anything else I will miss if I install in such a way.

 I'd recommend you to check that the fonts mentioned in ~/.gtkrc and
/etc/gtk/gtkrc are present. Also, if you use some non-"C" locale, you might
want to check the fonts mentioned in fontset in  /etc/gtk/gtkrc.LANGNAME
exist. The quick way of checking whether those national fonts are the cause:
run the program with environemnt variable LANG and all LC_* unset (in bash:
"(unset LANG; gedit)"

 Also, a hint would be to recompile gtk/gdk and software without debugging
support (i.e. not stripping executable, but an argument for 'configure'
script that will make type-checking and type-casting macros become trivial). I
think it will reduce size of the code by 10%.

 PS: just curious: how much RAM is on device? How big the linux kernel is? X?
How much ROM linux + X + libs + X stuff + gtk take?

> Best Regards,
> XH

 Best regards,
  -Vlad






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]