Hello,

I'd like to share how I was able to compile a (seemingly) working rsyslogd 
from source on AIX.
I had to manipulate some files and would be happy if REAL programmers 
could make those permanently, if they are valid.

Installed the following RPMS (see perzl.org)
        autoconf-2.69-2
        automake-1.15.1-1
        bash-4.4-5
        bison-3.0.4-1
        flex-2.5.37-1
        gdbm-1.13-1
        gettext-0.10.40-8
        glib2-2.34.3-1
        info-6.5-1
        libffi-3.2.1-2
        libgcc-4.9.4-1
        libiconv-1.15-1
        libsigsegv-2.12-1
        libssh2-1.8.0-1
        m4-1.4.18-1
        openssl-1.0.2n-1
        perl-5.8.8-2
        pkg-config-0.29.1-1
        zlib-1.2.4-2
        zlib-devel-1.2.4-2

I think a few might be unnecessary, e.g. info-6.5-1.
I will try again with a fresh RPM-Database.

Created/manipulated 2 filesystem links (save the original files!!)
        ln -sf /opt/freeware/bin/yacc /usr/bin/yacc
        ln -sf /usr/bin/flex /usr/bin/lex

Now I had to manipulate the following files:
libestr was producing malloc errors so I added
        export  ac_cv_func_malloc_0_nonnull=yes
        export ac_cv_func_realloc_0_nonnull=yes
Before the line "if test $ac_cv_func_malloc_0_nonnull = yes; then :"

rsyslogd needed a bit more work
configure complained about strippedsymbols.exp, libestr and liblogging 
were not working and in general could use some more flags (for info, see 
http://www.perzl.org/aix/index.php?n=Main.Instructions)
        if test "$unamestr" = "AIX"; then
        export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/lib/pkgconfig"
        LIBS="-lbsd -lsrc"
        CPPFLAGS="-g -D_THREAD_SAFE -qmaxmem=16384 -DSYSV -D_AIX -D_AIX32 
-D_AIX41 -D_AIX43 -D_AIX51 -D_AIX52 -D_AIX53 -D_AIX61 -D_AIX71 
-D_ALL_SOURCE -DFUNCPROTO=15 -O -I/opt/freeware/include"
        CFLAGS="-g -qmaxmem=16384 -DSYSV -D_AIX -D_AIX32 -D_AIX41 -D_AIX43 
-D_AIX51 -D_AIX52 -D_AIX53 -D_AIX61 -D_AIX71 -D_ALL_SOURCE -DFUNCPROTO=15 
-O -I/opt/freeware/include"
        LDFLAGS="-qcpluscmt -brtl -bexpall -L/opt/freeware/lib64 
-L/opt/freeware/lib 
-Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib 
-Wl,-bmaxdata:0x80000000" #-bE:strippedsymbols.exp "
        # LIBESTR_LIBS="-L/usr/lib/ -lestr"
        # LIBESTR_CFLAGS="-I/usr/include"
        # LIBLOGGING_STDLOG_LIBS="-L/usr/lib/ -llogging-stdlog"
        # LIBLOGGING_STDLOG_CFLAGS="-I/usr/include"
        GNUTLS_LIBS="-L/usr/lib/ -lgnutls"
        GNUTLS_CFLAGS="-I/usr/include"
        RELP_LIBS="-L/usr/lib/ -lrelp"
        RELP_CFLAGS="-I/usr/include"
        CC="xlc_r"

        export  ac_cv_func_malloc_0_nonnull=yes
        export ac_cv_func_realloc_0_nonnull=yes
        fi

tools/rsyslog.c complained about an incorrect 'continue' so I added 
precompile statements (entirely unsure what results this may produce)
#ifndef _AIX
        else  /* punt on short read */
                continue;
#endif /* AIXPORT : src end */

runtime/Makefile lmnet_la and lmnsd_ptcp_la failed to load (0711-317 
undefined symbol...), so I added $(RSRT_LIBS)
        lmnet_la_LDFLAGS = -module -avoid-version 
../compat/compat_la-getifaddrs.lo $(LIBLOGGING_STDLOG_LIBS) $(RSRT_LIBS)
        lmnsd_ptcp_la_LDFLAGS = -module -avoid-version 
$(LIBLOGGING_STDLOG_LIBS) $(RSRT_LIBS)

plugins/imuxsock/Makefile imuxsock_la failed to load (0711-317 undefined 
symbol...), so I added $(RSRT_LIBS)
        imuxsock_la_LDFLAGS = -module -avoid-version 
$(LIBLOGGING_STDLOG_LIBS) $(RSRT_LIBS)

Hope someone is able to verify those changes and do them propper and 
permanently :)

I used the following configure
./configure --prefix=/opt/freeware --disable-uuid --disable-libgcrypt 
--disable-testbench --disable-testbench1 --disable-testbench2 
--disable-man-pages --disable-fmhttp --disable-fmhash 
--enable-omfile-hardened --enable-omstdout --enable-debug

Kind regards
Frank
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
THAT.

Reply via email to