Open Source Development

Power Open Source Development

Explore the open source tools and capabilities for building and deploying modern applications on IBM Power platforms including AIX, IBM i, and Linux.


#Power


#Power

 View Only

Error finding mutex on compilation log4cxx 0.12.1 on aix

  • 1.  Error finding mutex on compilation log4cxx 0.12.1 on aix

    Posted Thu December 30, 2021 11:48 AM

    Hello,
    We try to compile log4cxx 0.12.1 on aix, we configure with cmake, and when we try to do the make we have the folowing error : 
    [root@detcisedt0005 /home/root/ext/apache-log4cxx-0.12.1/build]> make
    --
    --
    -- log4cxx configuration summary:
    --
    -- Build shared library ............ : ON
    -- Build tests ..................... : ON
    -- Build site ...................... : OFF
    -- Install prefix .................. : /home/root/ext
    -- C++ compiler .................... : /opt/IBM/xlC/16.1.0/bin/xlC_r
    -- log4cxx char API ................ : utf-8
    -- log4cxx wchar API ............... : ON
    -- log4cxx unichar API ............. : OFF
    -- logchar type .................... : utf-8
    -- charset ......................... : locale
    -- Using libESMTP .................. : OFF
    -- ODBC library .................... : OFF
    -- syslog .......................... : ON
    -- Qt support ...................... : OFF
    -- shared_mutex implementation ..... : boost::shared_mutex
    -- Applications required for tests:
    -- zip ............................. : /usr/bin/zip
    -- sed ............................. : /usr/bin/sed
    -- gzip ............................ : /usr/bin/gzip
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/root/ext/apache-log4cxx-0.12.1/build
    Checking configuration
    Target "src/main/include/CMakeFiles/configure_log4cxx.dir/build" is up to date.
    [ 0%] Built target configure_log4cxx
    Scanning dependencies of target log4cxx
    [ 0%] Building CXX object src/main/cpp/CMakeFiles/log4cxx.dir/action.cpp.o
    1540-5200 (W) The option "langlvl=extended1y" is not supported.
    "/home/root/ext/apache-log4cxx-0.12.1/src/main/cpp/action.cpp", line 19.10: 1540-0836 (S) The #include file <mutex> is not found.
    "/home/root/ext/apache-log4cxx-0.12.1/src/main/include/log4cxx/rolling/action.h", line 24.10: 1540-0836 (S) The #include file <mutex> is not found.
    make: The error code from the last command is 1.


    Stop.
    make: The error code from the last command is 2.


    Stop.
    make: The error code from the last command is 2.


    Stop.
    I found the mutex file here : 

    /opt/IBM/xlC/16.1.0/include2/c++/mutex
    but if I try to add this include in CMakeLists.txt with this line : 

    include_directories(/opt/IBM/xlC/16.1.0/include2/c++)

    I have a lot of more error that begin with : 

    [ 0%] Building CXX object src/main/cpp/CMakeFiles/log4cxx.dir/action.cpp.o
    1540-5200 (W) The option "langlvl=extended1y" is not supported.
    "/opt/IBM/xlC/16.1.0/include2/c++/__config", line 990.25: 1540-0063 (S) The text ""C"" is unexpected.
    "/opt/IBM/xlC/16.1.0/include2/c++/__nullptr", line 57.5: 1540-5239 (W) "decltype" is reserved as a keyword. To disable it, use "-qnokeyword=decltype".
    "/opt/IBM/xlC/16.1.0/include2/c++/__nullptr", line 57.22: 1540-2935 (S) A C++0x feature is being used. Use the extended0x langlvl or langlvl "Nullptr" to enable this feature.
    .....

    any idea of the problem and how we can manage to compile this library ?
    Regards
    Stephane Didierjean



    ------------------------------
    Stephane Didierjean
    ------------------------------

    #AIXOpenSource