Subject: static binaries with X11?
To: None <port-amiga@NetBSD.ORG>
From: Stefan Hensen <hensen@wpos4.physik.uni-wuppertal.de>
List: port-amiga
Date: 05/14/1997 02:29:42
Hi there!

I have a problem that surprises me a bit:
Whenever I tried to compile a X11 application on NetBSD-1.2 with X11R6.1
(the distribution of October 1996) using the '-static' linker option,
I got the following error message:

XKBBind.o: Undefined symbol `_XkbSelectEventDetails' referenced from text segment
XKBBind.o: Undefined symbol `_XkbSelectEventDetails' referenced from text segment
*** Error code 1

But there are no problems when compiling shared binaries!

(The problem is different from that mentioned in the X11R6.1 readme file
near line 80, because it occurs even if libXt is not used at all.)

Now I found out that the symbol mentioned above seems to be defined in
'libX11.so.6.1' but undefined in 'libX11.a'.
(The output of 'nm libX11.so.6.1 | grep _XkbSelectEventDetails' is:
   '000359c6 T _XkbSelectEventDetails'
 but the output of 'nm libX11.a | grep _XkbSelectEventDetails' is:
   '         U _XkbSelectEventDetails')

What is the reason for this difference?
What has to be done to compile static binaries with X11?

Regards,

Stefan Hensen