problem running hello world in armv4tl ...

I-m compiling a gtk hello world program for the armv4tl architecture with the "-march=armv4t" gcc option as also the libgtk2 package.

This is the uname -a output:

Linux cid 2.6.29-MBTI2440 #180 Mon Oct 5 10:01:14 EDT 2009 armv4tl GNU/Linux

The program builds fine, but when I run it on the armv4tl platform pc I have I get an "Illegal Instruction Error". This is the backtrace from gdb:

Program received signal SIGILL, Illegal instruction.
0x40682d3c in ?? () from /usr/lib/
(gdb) bt
#0  0x40682d3c in ?? () from /usr/lib/
#1  0x4063f5bc in ft_mem_qrealloc () from /usr/lib/
#2  0x4063f65c in ft_mem_realloc () from /usr/lib/
#3  0x406514a4 in TT_New_Context () from /usr/lib/
#4  0x40651514 in ?? () from /usr/lib/
#5  0x40651514 in ?? () from /usr/lib/
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

This is the hello world program:

#include <gtk/gtk.h>

static void hello( GtkWidget *widget, gpointer   data )
    g_print ("Hello World\n");

static gboolean delete_event( GtkWidget *widget, GdkEvent *event, gpointer data )
    g_print ("delete event occurred\n");
    return TRUE;

/* Another callback */
static void destroy( GtkWidget *widget, gpointer   data )
    gtk_main_quit ();

int main( int   argc, char *argv[] )
    GtkWidget *window;
    GtkWidget *button;
    gtk_init (&argc, &argv);
    window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
g_signal_connect (window, "delete-event", G_CALLBACK (delete_event), NULL);
    g_signal_connect (window, "destroy", G_CALLBACK (destroy), NULL);
    gtk_container_set_border_width (GTK_CONTAINER (window), 10);
    button = gtk_button_new_with_label ("Hello World");
    g_signal_connect (button, "clicked", G_CALLBACK (hello), NULL);
g_signal_connect_swapped (button, "clicked", G_CALLBACK (gtk_widget_destroy), window);
    gtk_container_add (GTK_CONTAINER (window), button);
    gtk_widget_show (button);
    gtk_widget_show (window);
    gtk_main ();

    return 0;

Thanks in advance ...

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