1
answer

Trying to run nxlog-ce 2.8.1248 on AIX 7.1.

Compilation is succesful, nxlog binnary is created, but can not run. There are messages like:

"ERROR Failed to load module from /usr/local/libexec/nxlog/modules/extension/xm_syslog.so, Could not load module /usr/local/libexec/nxlog/modules/extension/xm_syslog.so.; System error: No such file or directory;DSO load file"

There are static libraries (.a) in directories but dynamic (.so) not.

AskedJuly 7, 2015 - 3:20pm

Answer (1)

Looks like the linker in use cannot create shared libraries on your system.

BTW, the NXLog Enterprise Edition does have an AIX installer.

AnsweredJuly 7, 2015 - 3:49pm

Comments (5)

  • azykov's picture

    Hello! I have exactly the same issue:

    Building nxlog-ce-2.8.1248.tar.gz on AIX 7.1

    Tried to compile by hand using ./configure - make - make install, it was built but no shared libraries installed. Checked configure log and found:

    checking whether the gcc linker (/usr/bin/ld) supports shared libraries... no
    checking dynamic linker characteristics... no
    checking how to hardcode library paths into programs... unsupported
    checking whether stripping libraries is possible... no
    checking if libtool supports shared libraries... no

    I've tried both AIX linker and from GNU binutils - /opt/freeware/bin/gld - nothing changed.

    Then I found ./packaging/aix/nxlog.spec file in sources (had to fix it a little, because it was set for old nxlog version - just updated version to 2.8.1248) but it also won't built, fails with message:

    + strip /var/opt/freeware/tmp/nxlog-ce-root/opt/freeware/libexec/nxlog/modules/extension/*
    strip: /var/opt/freeware/tmp/nxlog-ce-root/opt/freeware/libexec/nxlog/modules/extension/* -- 0654-400 Cannot open file.
            No such file or directory

    So means the same - no shared libraries were built.

    Is there any workaround? Which linker (or may be options to pass) I should use to build shared libraries?

    List of installed dependencies:

     # rpm -qa|egrep "apr|expat|pcre|gcc|openssl|libdbi|perl"
    expat-2.1.1-1
    apr-util-1.4.1-1
    libdbi-0.8.4-1
    apr-1.5.2-2.p7
    apr-devel-1.5.2-2.p7
    expat-devel-2.1.1-1
    gcc-cpp-4.8.3-1
    pcre-devel-8.39-1
    pcre-8.39-1
    perl-5.8.8-2
    openssl-devel-1.0.2h-1.p7
    openssl-1.0.2h-1.p7
    libdbi-devel-0.8.4-1
    libgcc-4.8.3-1
    gcc-4.8.3-1

    September 27, 2016 - 9:35am
  • b0ti's picture
    (NXLog)

    It might work with the proper set of flags:

    NM="nm -B -X 64" AR="ar -X64" LDFLAGS="-maix64" CFLAGS="-maix64"

    At least this is how the EE is built.

    September 30, 2016 - 10:52am
  • azykov's picture

    Thanks for suggestion, b0ti!

    But with

    NM="nm -B -X 64" AR="ar -X64" LDFLAGS="-maix64" CFLAGS="-maix64"

    configure can't find libapr anymore

    checking for apr_socket_create in -lapr-1... no
    configure: error: libapr-1 not found
    Bad exit status from /var/opt/freeware/tmp/rpm-tmp.6619 (%build)

    and it's still doesn't support shared libraries:

    checking whether the gcc linker (/usr/bin/ld) supports shared libraries... no
    checking dynamic linker characteristics... no
    checking how to hardcode library paths into programs... unsupported
    checking whether stripping libraries is possible... no
    checking if libtool supports shared libraries... no
    checking whether to build shared libraries... no
    checking whether to build static libraries... yes

    Maybe I need to use specific versions of gcc / binutils?

    October 3, 2016 - 2:18pm
  • henk@wiedig.de's picture

    Try this:

    $ diff tmp/nxlog-ce-2.8.1248/config.guess nxlog-ce-2.8.1248/config.guess
    555c555
    < *:AIX:*:[456])
    ---
    > *:AIX:*:[4567])

    January 17, 2017 - 1:39pm