[csw-maintainers] Code issue w/ different behaviour on sparc and x86

Laurent Blume laurent at opencsw.org
Tue May 7 21:15:08 CEST 2013


All,

I've just noticed an issue with glib: during the configure part, on x86, 
header inlining is enabled. On Sparc, it is not. They end up having 
slightly different headers installed.
This can have some effect on dependencies: pidgin-sipe builds without a 
hitch on x86, fails on sparc, because of that.

I've tracked the issue down to the example attached, straight from the 
configure script.

It fails like that on sparc, but no error on x86:

/opt/solarisstudio12.3/bin/cc -o conftest -xO3 -m64 -features=extensions 
   -xc99 -D_XPG6 -I/opt/csw/include -m64 -lsocket 
-R/opt/csw/lib/$ISALIST   -R/opt/csw/lib/64 -L/opt/csw/lib/64 conftest.c 
-lintl
Undefined                       first referenced
  symbol                             in file
glib_test_func2                     conftest.o
ld: fatal: symbol referencing errors. No output written to conftest

Does anybody know of a clean workaround?
Also, can OpenCSW report the issue, as it seems a clean bug? Or should I 
do it on my side?

Thanks for any hint,

Laurent
-------------- next part --------------
/*
/opt/solarisstudio12.3/bin/cc -o conftest -xO3 -m64 -features=extensions \
  -xc99 -D_XPG6 -I/opt/csw/include -m64 -lsocket -R/opt/csw/lib/$ISALIST \
  -R/opt/csw/lib/64 -L/opt/csw/lib/64 conftest.c -lintl
 */

#define PACKAGE_NAME "glib"
#define PACKAGE_TARNAME "glib"
#define PACKAGE_VERSION "2.32.4"
#define PACKAGE_STRING "glib 2.32.4"
#define PACKAGE_BUGREPORT "http://bugzilla.gnome.org/enter_bug.cgi?product=glib"
#define PACKAGE_URL ""
#define GLIB_MAJOR_VERSION 2
#define GLIB_MINOR_VERSION 32
#define GLIB_MICRO_VERSION 4
#define GLIB_INTERFACE_AGE 4
#define GLIB_BINARY_AGE 3204
#define NEED_ICONV_CACHE 1
#define HAVE_LOCALE_H 1
#define HAVE_LC_MESSAGES 1
#define HAVE_BIND_TEXTDOMAIN_CODESET 1
#define HAVE_GETTEXT 1
#define HAVE_DCGETTEXT 1
#define ENABLE_NLS 1
#define GETTEXT_PACKAGE "glib20"
#define GLIB_LOCALE_DIR "/opt/csw/share/locale"
#define USE_LIBICONV_GNU 1
#define HAVE_DLFCN_H 1
#define LT_OBJDIR ".libs/"
#define HAVE_VPRINTF 1
#define HAVE_DOPRNT 1
#define HAVE_ALLOCA_H 1
#define HAVE_ALLOCA 1
#define HAVE_MMAP 1
#define HAVE_MEMALIGN 1
#define HAVE_VALLOC 1
#define HAVE_FSYNC 1
#define HAVE_ATEXIT 1
#define HAVE_GMTIME_R 1
#define SIZEOF_CHAR 1
#define SIZEOF_SHORT 2
#define SIZEOF_LONG 8
#define SIZEOF_INT 4
#define SIZEOF_VOID_P 8
#define SIZEOF_LONG_LONG 8
#define SIZEOF___INT64 0
#define HAVE_SIG_ATOMIC_T 1
#define HAVE_LONG_LONG_FORMAT 1
#define G_HAVE___INLINE 1
#define G_HAVE___INLINE__ 1
#define G_HAVE_INLINE 1
/* end confdefs.h.  */

#if defined (G_HAVE_INLINE) && defined (__GNUC__) && defined (__STRICT_ANSI__)
#  undef inline
#  define inline __inline__
#elif !defined (G_HAVE_INLINE)
#  undef inline
#  if defined (G_HAVE___INLINE__)
#    define inline __inline__
#  elif defined (G_HAVE___INLINE)
#    define inline __inline
#  endif
#endif

int glib_test_func2 (int);

static inline int
glib_test_func1 (void) {
  return glib_test_func2 (1);
}

int
main (void) {
  int i = 1;
}



More information about the maintainers mailing list