Bug 30296

GemStone/S

6.1.6, 6.1.5, 6.1.4

Linux

Problems building GCI applications on Linux RedHat AS 3.0

Developers implementing GCI applications on Linux Redhat Advanced Server 3.0
will experience problems when attempting to link their application.  Note
that the following problem only occurs while building stand-alone GCI
applications; useractions are not affected.

Recent changes to the locale mechanism in Linux (see man pages for locale
and setlocale) have produced an incompatibility between earlier versions
of Linx Redhat and Advanced Server version 3.0.  In earlier versions, the
standard C library character functions defined in ctype.h were mapped to
low-level internal functions:

   __ctype_b
   __ctype_tolower
   __ctype_toupper

But in 3.0, these have been replaced with newer internal functions with
a better awareness of locale renamed:

   __ctype_b_loc
   __ctype_tolower_loc
   __ctype_toupper_loc

GemStone/S 6.1.4 and 6.1.5 for Linux are built using RedHat Advanced Server 2.1,
and therefore include references to the original ctype internal functions.
This includes the $GEMSTONE/lib files gcirtlobj.o and gemrpcobj.o. When
these files are included during the linking phase of GCI application
development, the link will fail with errors similar to:

  $GEMSTONE/lib/gemrpcobj.o(.text+0xHexNum):  In function `function-name':
      undefined reference to `__ctype_b'
  $GEMSTONE/lib/gemrpcobj.o(.text+0xHexNum):  In function `function-name':
      undefined reference to `__ctype_tolower'
  $GEMSTONE/lib/gemrpcobj.o(.text+0xHexNum):  In function `function-name':
      undefined reference to `__ctype_toupper'


For more background on this issue refer to RedHat bug reports on
91290 and 86465 at:

   https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=92190
   https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=86463

(You'll need to establish a bugzilla account to access these bug reports;
The account is free and only requires a user name and your email address)

Workaround

You can avoid this problem by compiling and linking the pre-3.0 source
for ctype.c into your application.  This code can be found at:

   http://support.gemstone.com/gemstone/outgoing/bugnote/ctype.c


Last updated: 2/1/06