When we run our build script , we get the following error.
/usr/X11R6/lib/libXm.a(XpmRdFToI.o): In function
XpmRdFToI.o(.text+0x159): undefined reference to
i.e, the linker is unable to resolve the reference of symbol
in the above said Motif libraries.
On digging lot of manuals, glibc source files, we found that
GLIBC 2.0 , the global variables are _IO_stdin_ and et al,
but in GLIBC 2.1.1,
the global variables were changed to _IO_2_1_stdin_
This change has caused a lot of problems. Thus indicating
that Motif libraries
have to be compiled using GLIBC 2.1 onwards.
Here is a bit of text from Red Hat errata on Motif 2.1
" Motif libraries compiled against glibc 2.0 will not work
built against glibc 2.1 because of one particular upgraded
interface. Applications built against motif on a Red Hat
5.2 (or other glibc 2.0-based system) will work on Red Hat
Linux 6.0 You can build Motif applications with older
libraries by using the "compat" packages included as part of
Red Hat Linux 6.0."
But the Motif version (2.1.10) we are using is said to work
from GLIBC 2.0+
So if we have to make our product work, we need to use the
compiled on GLIBC 2.1.1 or use older Motif libraries using
The linker is unable to reference the symbol _IO_stdin_ in
because it is probably replaced by _IO_2_1_stdin. Am I
Is the 'compat' for whole component (Motif as whole) or only
few libraries of Motif?
Any workaround suggested??
You are trying to link an object file compiled on glibc 2.0 on a glibc
2.1 system, and that is not permitted. Either transform the static
object into a shared library and use that or recompile from the
If you want to get a static Motif binary using the glibc 2.0 libraries
you are out of luck. Only shared libraries and relocable objects can
be ported from one version of the glibc to another.
I would suggest that if you need static linking then use the compat-*