xlC vs irssi

2010-09-26

  • AIX 6100-05-xx
  • vac.C 11.1.0.1
  • perl.rte 5.8.8.xx
  • glib-2.20.5 in-house
  • irssi 0.8.15

$ CFLAGS="-blibpath:/usr/lib:/usr/local/lib:/usr/opt/perl5/lib/5.8.8/aix-thread-multi/CORE -qnolibansi -U__STR__" CC=xlc_r ./configure

Works with Perl support.

This was an old error from 2011-09 with another version, see the page above.

More than one storage class specifier typedef.

./src/fe-common/core/fe-exec.h
#include "fe-windows.h"
  ./src/fe-common/core/fe-windows.h
  #include "window-item-def.h"
    ./src/core/window-item-def.h
    #include "window-item-rec.h"
      ./src/core/window-item-rec.h
  #include "command-history.h"
    ./src/fe-common/core/command-history.h
    #include "common.h"
#include "window-item-rec.h"

2011-09-16

  • AIX 7100-00-03
  • vac.C 11.1.0.7
  • perl.rte 5.10.1.15
  • glib-2.20.5 in-house rebuild
  • irssi 0.8.15

First run failed with glibtest:

$ CFLAGS="-blibpath:/usr/lib:/usr/local/lib:/usr/opt/perl5/lib/5.10.1/aix-thread-multi/CORE -qnolibansi -U__STR__" ./configure
checking for GLIB - version >= 2.6.0... no

Noticed this note when recompiling GLib:

----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LIBPATH' environment variable
     during execution
   - use the `-Wl,-blibpath:LIBDIR:/usr/vac/lib:/usr/lib:/lib ' linker flag
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

Appended the above info to LDFLAGS.

$ CPP='xlc_r -E' CC=xlc_r LDFLAGS="-Wl,-blibpath:/usr/local/lib:/usr/lib" CFLAGS="-blibpath:/usr/lib:/usr/local/lib:/usr/opt/perl5/lib/5.10.1/aix-thread-multi/CORE -qinline -qnolibansi -U__STR__" ./configure

Specifying ${CC} -E as the preprocessor was another idea from Google hits.

Didn't work so far: configure is OK, but make fails at:

Making all in perl
        source='perl-core.c' object='perl-core.lo' libtool=yes  DEPDIR=.deps depmode=aix /bin/sh ../../build-aux/depcomp  /bin/sh ../../libtool --tag=CC    --mode=compile xlc_r -DHAVE_CONFIG_H -I. -I../.. -I../../src  -I../../src/core  -I../../src/fe-common/core  -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include    -DSCRIPTDIR=\""/usr/local/share/irssi/scripts"\"  -DPERL_USE_LIB=\"""\"  -DPERL_STATIC_LIBS=0  -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=-1 -qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -qlanglvl=extended -q32 -D_LARGE_FILES -qlonglong  -I/usr/opt/perl5/lib/5.10.1/aix-thread-multi/CORE      -blibpath:/usr/lib:/usr/local/lib:/usr/opt/perl5/lib/5.10.1/aix-thread-multi/CORE -qinline -qnolibansi -U__STR__ -c -o perl-core.lo perl-core.c
libtool: compile:  xlc_r -DHAVE_CONFIG_H -I. -I../.. -I../../src -I../../src/core -I../../src/fe-common/core -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -DSCRIPTDIR=\"/usr/local/share/irssi/scripts\" -DPERL_USE_LIB=\"\" -DPERL_STATIC_LIBS=0 -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=-1 -qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -qlanglvl=extended -q32 -D_LARGE_FILES -qlonglong -I/usr/opt/perl5/lib/5.10.1/aix-thread-multi/CORE -blibpath:/usr/lib:/usr/local/lib:/usr/opt/perl5/lib/5.10.1/aix-thread-multi/CORE -qinline -qnolibansi -U__STR__ -c -M perl-core.c -o perl-core.o
"/usr/local/include/glib-2.0/glib/gutils.h", line 299.15: 1506-277 (S) Syntax error: possible missing ';' or ','?
"/usr/local/include/glib-2.0/glib/gutils.h", line 308.3: 1506-046 (S) Syntax error.
"/usr/local/include/glib-2.0/glib/gutils.h", line 298.1: 1506-485 (S) Parameter declaration list is incompatible with declarator for inline.
"/usr/local/include/glib-2.0/glib/gutils.h", line 327.7: 1506-045 (S) Undeclared identifier nth_bit.
"/usr/local/include/glib-2.0/glib/gutils.h", line 328.11: 1506-045 (S) Undeclared identifier mask.
"/usr/include/sys/atomic_op.h", line 121.1: 1506-1419 (W) Pragma mc_func must appear in global scope.
"/usr/include/sys/atomic_op.h", line 121.1: 1506-224 (W) Incorrect pragma ignored.
"/usr/include/sys/atomic_op.h", line 124.1: 1506-1419 (W) Pragma mc_func must appear in global scope.
"/usr/include/sys/atomic_op.h", line 124.1: 1506-224 (W) Incorrect pragma ignored.
"/usr/include/sys/atomic_op.h", line 127.1: 1506-1419 (W) Pragma mc_func must appear in global scope.
"/usr/include/sys/atomic_op.h", line 127.1: 1506-224 (W) Incorrect pragma ignored.
"/usr/include/sys/atomic_op.h", line 130.1: 1506-1419 (W) Pragma mc_func must appear in global scope.
"/usr/include/sys/atomic_op.h", line 130.1: 1506-224 (W) Incorrect pragma ignored.
"/usr/include/sys/atomic_op.h", line 135.23: 1506-045 (W) Undeclared identifier _safe_fetch.
"/usr/local/include/glib-2.0/glib/gutils.h", line 331.3: 1506-046 (S) Syntax error.

The lines seem to be referring to G_INLINE_FUNC in gutils.h.

Currently running 0.8.15 without Perl support (I don't use perl anyway):

The '-qinline/-qnoinline' flag doesn't seem to matter.

$ CC=xlc_r LDFLAGS="-Wl,-blibpath:/usr/local/lib:/usr/lib" CFLAGS="-blibpath:/usr/lib:/usr/local/lib:/usr/opt/perl5/lib/5.10.1/aix-thread-multi/CORE -qinline -qnolibansi -U__STR__" ./configure --with-perl=no

2012-11-14

  • AIX 7100-01-05-1228
  • vac.C 12.1.0.1
  • perl.rte 5.10.1.100
  • glib2 pkgconfig from perzl.org
  • irssi 0.8.15

Still need to:

- install pkg-config, glib2-devel

- run configure as: CC=xlc_r LDFLAGS="-Wl,-blibpath:/opt/freeware/lib64:/usr/lib" CFLAGS="-blibpath:/usr/lib:/opt/freeware/lib64:/usr/opt/perl5/lib/5.10.1/aix-thread-multi/CORE -qnolibansi -U__STR__" ./configure

- remove 'printformat' tests from ./src/fe-common/core/printtext.h

Still getting the above error from gutils.h