Re: cannot highlight more than one line in Gtk Text
Tried running gtk-demo under gdb, since I have removed all debugging symbols I managed to get only this respond from gdb, Program received signal SIGSEGV, Segmentation fault. 0xb7d380e7 in _gtk_text_btree_get_chars_changed_stamp () from /usr/lib/libgtk-x11-2.0.so.0 (gdb) quit Tracing in gtktextbtree.c found that function returns uint value available in GTK_TEXT_BTREE structure. compiled gtk without any compiler flags to try to get more debugging messeges from gdb.(now libgtk-x11.so is 10.7 MB compared to previous 4.7 MB). ran gtk-demo and now it didn't crash while selecting more than one line. So, the bug is because of some compiler optimization. I am using gcc 4.0.3, so what is the safe compiler flags to use with gtk 2.10.11? I certainly don't want a library to be 10.7 MB instead of just 4.7 MB. Thank you, Yogesh M - Original Message From: Yogesh M <[EMAIL PROTECTED]> To: gtk-app-devel-list@gnome.org Sent: Monday, April 30, 2007 1:54:24 PM Subject: cannot highlight more than one line in Gtk Text Did a manual installation of linux following LFS and BLFS instructions, Installed Gtk-2.8.20, Ran Gtk-demo, Now If I am trying to select more than one line from Info or Source tab, I am getting segmentation fault. I tried compiling with -O2 and i686 compiler option with no success, I think it has nothing to do with compiler options, My computer: Mercury KOB 810e FcST motherboard with Celeron coppermine processor. Is this bug in Gtk or in lower level core libraries like glibc? I will try compiling with latest Gtk today. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list TV dinner still cooling? Check out "Tonight's Picks" on Yahoo! TV. http://tv.yahoo.com/ ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Gtk+ and multithreating
I'm doing a multithreading program using GTK+ (a POS emulator) and I'm using something like that: // #include gpointer cb_t1(gpointer d) { while (1) { g_usleep(1000 * 2000); gdk_threads_enter(); /* my turn! i'll use GTK+... */ g_debug("thread 1 in action!"); gtk_label_set_text(GTK_LABEL(d), "thread1"); gdk_flush(); /* flushes all pending commands... */ gdk_threads_leave(); /* i'm done! */ } } gpointer cb_t2(gpointer d) { while (1) { g_usleep(1000 * 3000); gdk_threads_enter(); /* my turn! i'll use GTK+... */ g_debug("thread 2 in action!"); gtk_label_set_text(GTK_LABEL(d), "thread2"); gdk_flush(); /* flushes all pending commands... */ gdk_threads_leave(); /* i'm done! */ } } gboolean cb_key_press (GtkWidget *w, GdkEventKey *e, gpointer d) { g_message("%d", e->keyval); } int main(int argc, char *argv[]) { GtkWidget *window; GtkWidget *label; g_thread_init(NULL); /* glib threads init */ gdk_threads_init(); /* gdk threads init */ gdk_threads_enter(); /* protects the main loop */ gtk_init(&argc, &argv); window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_widget_set_events(window, GDK_KEY_PRESS_MASK); g_signal_connect( G_OBJECT(window), "destroy", G_CALLBACK(gtk_main_quit), NULL); g_signal_connect( G_OBJECT(window), "key-press-event", G_CALLBACK(cb_key_press), NULL); gtk_widget_show(window); label = gtk_label_new(""); gtk_container_add(GTK_CONTAINER(window), label); gtk_widget_show(label); g_thread_create(cb_t1, (gpointer) label, FALSE, NULL); g_thread_create(cb_t2, (gpointer) label, FALSE, NULL); gtk_main(); gdk_threads_leave(); /* we're done... */ } // Here we have three threads unsing the GTK+ without conflicts... Basically, we must protect the gtk_main() loop with the gdk_threads_enter()/gdk_threads_leave() pair and for each function that uses the GTK+ we must surrounding that with a gtk_thread_enter()/gdk_threads_leave() pair. This functions just lock a previously definied mutex (or something like that). More info: http://developer.gnome.org/doc/API/2.0/gdk/gdk-Threads.html http://developer.gnome.org/doc/API/2.0/glib/glib-Threads.html PS: Sorry Michael. =P ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Question about "suspending" g_io_add_watch
Hi, Robin Wenninger schrieb: > work. Is there any other way to suspend the call of "refresh()" or what > am I doing wrong here? why does one always find the error AFTER the post is out? rw ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
RE: RE: Cross compiling gtk+-2.2.0 for arm
Hi, FreeType is software font engine, which is used as backend for Pango..etc.. Build procedure is same as that of other libraries. Download the source, configure and build. If it is searching for GLib etc..then you need to specify where you have kept these libraries built for target, through PKG_CONFIG_PATH, LD_LIBRARY_PATH, LDFLAGS etc.. Also Use PATH for binaries built for target. Something like this: PREFIX="/opt/toolchain/arm-linux/local" PATH="/bin:/opt/toolchain/bin:/opt/toolchain/arm-linux/local/bin:/usr/bin" LDFLAGS="-L/opt/toolchain/arm-linux/local/lib" You need Glib, ATK, Cairo, Pango, Freetype, GTK etc.. to build GTK. You may need Libpng or something else, depending upon what all libraries are present for your target. Following link will be quite helpful: http://www.directfb.org/wiki/index.php/Projects:GTK_on_DirectFB_for_Embedded _Systems Regards, Siddharth TATA Elxsi -Original Message- From: Naveen Kumar [mailto:[EMAIL PROTECTED] Sent: Thursday, May 17, 2007 2:26 PM To: Kumar Siddharth Subject: Re: RE: Cross compiling gtk+-2.2.0 for arm Hi, Thank you .. Can you please tell me what is freetype2 and how to build it. Actually what came to mind is : while configuring it is searching glib-2.0 and some other libraries at /usr/local/bin, but it should find for the libraries which we built for arm. if that is the case what are the libraries i need to compile for arm and how to link those instead of x86 libraries. I think freetype2 is going have all these libraries if i am not wrong... Please help me to set cross environment Thanks and Regards, Naveen. Kumar Siddharth wrote: > > > >Hi, > >>>I got the message : >--- >>>configure: error: pangoxft Pango backend found but did not find freetype >>>libraries > > >You need to have Freetype libraries built for your target. Pango works with >Freetype2. If you have already built freetype for ARM, then you need to link >to those libraries. You may want to modify PKG_CONFIG_PATH for that purpose. >Otherwise, you have to cross-compile Freetype first. > >Regards, >Siddharth >TATA Elxsi > > > >Now i dont know how should i proceed. >-Original Message- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] Behalf Of Naveen Kumar >Sent: Thursday, May 17, 2007 11:30 AM >To: gtk-app-devel-list@gnome.org >Subject: Cross compiling gtk+-2.2.0 for arm > > >Hi all, > >I have tool chain to build gtk1.2 applications, but i need to compile >applications using gtk2, so i am trying to cross compile gtk2 for using the >tool chain i have. >The procedure i followed to cross compile gtk+-2.2.0.tarbz2 : >[EMAIL PROTECTED] gtk+-2.2.0]# export >PATH=$PATH:/usr/local/hybus-arm-linux-R1.1/bin/ > >[EMAIL PROTECTED] gtk+-2.2.0]# ./configure CC=arm-linux-gcc --host=arm-linux >--prefix=/opt/gtk2/ > >I got the message : >--- >configure: WARNING: *** TIFF plug-in will not be built (TIFF library not >found) *** >configure: error: >*** Checks for TIFF loader failed. You can build without it by passing >*** --without-libtiff to configure but some programs using GTK+ may >*** not work properly >--- > >So i tried like : > >[EMAIL PROTECTED] gtk+-2.2.0]# ./configure CC=arm-linux-gcc --host=arm-linux >--without-libtiff --prefix=/opt/gtk2/ > >I got the message : >--- >configure: error: pangoxft Pango backend found but did not find freetype >libraries > > >Now i dont know how should i proceed. > >Am I following the wrong way to cross compile gtk2 or missing out some steps >? >Please guide me how i can proceed or any different procedure to >cross-compile ... > >Thanks and Regards, >Naveen > > > >___ >gtk-app-devel-list mailing list >gtk-app-devel-list@gnome.org >http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list > > ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
RE: Cross compiling gtk+-2.2.0 for arm
Hi, If you have properly specifed PREFIX, LD_LIBRARY_PATH and PKG_CONFIG_PATH, then it should work. Anyway, if it is getting the Pango, while configuring, then the problem may be something else. Anyway these are the random thoughts that came to my mind, someone else from the list may also be able to help you out..: 1. Check the lib folder($LD_LIBRARY_PATH) for pango libs. If they are there then fine otherwise you may have installed your target libraries somewhere else. 2.Open your Makefile of GTK, and search for the word "pango". You will get it in lines like *_LIBS or *_CFLAGS. See the path that it is pointing to and whether that is into your build system or not. You may want to specify LDFLAGS=$PREFIX/lib, where Prefix is the directory for the target's libraries. 3. Finally, there may be some problem with the generated pango library for your target itself. :-( You may want to go through: http://www.directfb.org/wiki/index.php/Projects:GTK_on_DirectFB_for_Embedded _Systems for some useful information regarding cross-compiling GTK. Regards, Siddharth TATA Elxsi -Original Message- From: venkatesh chilapur [mailto:[EMAIL PROTECTED] Sent: Thursday, May 17, 2007 2:16 PM To: Kumar Siddharth Subject: Re: Cross compiling gtk+-2.2.0 for arm hello kumar, i am venkatesh chilapur from asl advanced systems... i have also tried to cross compile the gtk-2.4 for arm platform, and i am successful in cross-compiling up to pango-1.4. but kumar, the problem is when i try to configure the gtk, it gives error as "can't link to pango". i have carefully specified the library paths and pkg-config.. during configure of gtk, it gets all references of the installed packages, but some problem while it is getting linked to pango. plzzz through some light on the same and do u know how to cross compile x11r6 for arm-linux platform ur reply will mean a lot to me venkatesh.chilapur ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
RE: Cross compiling gtk+-2.2.0 for arm
Hi, >>I got the message : --- >>configure: error: pangoxft Pango backend found but did not find freetype >>libraries You need to have Freetype libraries built for your target. Pango works with Freetype2. If you have already built freetype for ARM, then you need to link to those libraries. You may want to modify PKG_CONFIG_PATH for that purpose. Otherwise, you have to cross-compile Freetype first. Regards, Siddharth TATA Elxsi Now i dont know how should i proceed. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Naveen Kumar Sent: Thursday, May 17, 2007 11:30 AM To: gtk-app-devel-list@gnome.org Subject: Cross compiling gtk+-2.2.0 for arm Hi all, I have tool chain to build gtk1.2 applications, but i need to compile applications using gtk2, so i am trying to cross compile gtk2 for using the tool chain i have. The procedure i followed to cross compile gtk+-2.2.0.tarbz2 : [EMAIL PROTECTED] gtk+-2.2.0]# export PATH=$PATH:/usr/local/hybus-arm-linux-R1.1/bin/ [EMAIL PROTECTED] gtk+-2.2.0]# ./configure CC=arm-linux-gcc --host=arm-linux --prefix=/opt/gtk2/ I got the message : --- configure: WARNING: *** TIFF plug-in will not be built (TIFF library not found) *** configure: error: *** Checks for TIFF loader failed. You can build without it by passing *** --without-libtiff to configure but some programs using GTK+ may *** not work properly --- So i tried like : [EMAIL PROTECTED] gtk+-2.2.0]# ./configure CC=arm-linux-gcc --host=arm-linux --without-libtiff --prefix=/opt/gtk2/ I got the message : --- configure: error: pangoxft Pango backend found but did not find freetype libraries Now i dont know how should i proceed. Am I following the wrong way to cross compile gtk2 or missing out some steps ? Please guide me how i can proceed or any different procedure to cross-compile ... Thanks and Regards, Naveen ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list