[gtkada] linking statically under Linux

alfonso_acosta_mail at yahoo.es alfonso_acosta_mail at yahoo.es
Tue May 27 00:37:54 CEST 2003


Hi:

First of all, and before anyone tells me to do it, I have read the 
recent thread about static linking under Solaris.

As a college project, I need to code a toy postscript interpreter and 
viewer, and one of the requirements is to provide a static executable (I 
have to give the sources too, which are licensed under the GPL)
Im using a recent cvs version of GtkAda.

I tried to compile with "gnatmake foo.adb -Iwhatever `gtkada-config` 
-largs -s -static" as Preben Randhol suggested. But I get lots of errors:

=========================================================================
$ gnatmake visorps -I./tads -I./ui -I./analizador `gtkada-config 
--static` -largs -static -s
gnatbind -aO./ -aO./tads -aO./ui -aO./analizador 
-aO/usr/local/include/gtkada -I- -x visorps.ali
gnatlink /usr/local/lib/libgtkada.a -Wl,--export-dynamic -lgtk-x11-2.0 
-lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 
-lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -static -s 
visorps.ali
/usr/lib/gcc-lib/i386-linux/3.3/../../../libpangox-1.0.a(thai-x.o)(.text+0x0): 
In function `thai_get_font_info':
: multiple definition of `thai_get_font_info'
/usr/lib/gcc-lib/i386-linux/3.3/../../../libpangoxft-1.0.a(thai-xft.o)(.text+0x48): 
first defined here
/usr/bin/ld: Warning: size of symbol `thai_get_font_info' changed from 
203 in 
/usr/lib/gcc-lib/i386-linux/3.3/../../../libpangoxft-1.0.a(thai-xft.o) 
to 256 in 
/usr/lib/gcc-lib/i386-linux/3.3/../../../libpangoxft-1.0.a(thai-xft.o)
/usr/lib/gcc-lib/i386-linux/3.3/../../../libpangox-1.0.a(thai-x.o)(.text+0x100): 
In function `thai_make_glyph':
: multiple definition of `thai_make_glyph'
/usr/lib/gcc-lib/i386-linux/3.3/../../../libpangoxft-1.0.a(thai-xft.o)(.text+0x114): 
first defined here
/usr/bin/ld: Warning: size of symbol `thai_make_glyph' changed from 144 
in 
/usr/lib/gcc-lib/i386-linux/3.3/../../../libpangoxft-1.0.a(thai-xft.o) 
to 18 in 
/usr/lib/gcc-lib/i386-linux/3.3/../../../libpangoxft-1.0.a(thai-xft.o)
/usr/lib/gcc-lib/i386-linux/3.3/../../../libpangox-1.0.a(thai-x.o)(.text+0x114): 
In function `thai_make_unknown_glyph':
: multiple definition of `thai_make_unknown_glyph'
/usr/lib/gcc-lib/i386-linux/3.3/../../../libpangoxft-1.0.a(thai-xft.o)(.text+0x1a4): 
first defined here
/usr/lib/gcc-lib/i386-linux/3.3/../../../libgtk-x11-2.0.a(gtkplug.o)(.text+0x10c2): 
In function `send_xembed_message':
: undefined reference to `XSendEvent'
/usr/lib/gcc-lib/i386-linux/3.3/../../../libgtk-x11-2.0.a(gtkplug.o)(.text+0x121e): 
In function `xembed_set_info':
: undefined reference to `XChangeProperty'
/usr/lib/gcc-lib/i386-linux/3.3/../../../libgtk-x11-2.0.a(gtksocket.o)(.text+0x4ff): 
In function `gtk_socket_realize':
.
.
.
.
.

=========================================================================

I using the --static flag with gtkada-config, but I got the same results

Thanks in advance:

Alfonso Acosta

PS: I tried to compile and link with gcc-3.3 (Gnat 5?) and gnat-3.14
getting the same errors with both.






More information about the gtkada mailing list