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


#Servers
#Opensource
 View Only
  • 1.  Could not load program ./djengine:

    Posted 01/15/20 10:59 AM

    Originally posted by: christophe41


    Hello,

    I have a just little experience about   "open source rpm  packages"  installation.

    The packages    libgcc    and   liststdc   have been succesfully installed today  with respect of the dependencies.

    But the developpment team has the problem below.

    What should i check ?

    What can i do ?

    What could be the different reasons for such problem ?

    We are working on an AIX 7.1  lpar.

    If you need more details, please let me know.

    I thank you very much for your help,

    Christophe

     

     

    axxxx034(sefas) /opt/Actian/DC-Engine11/runtime/di9 # ./djengine -version

    Could not load program ./djengine:

    Symbol resolution failed for libicuuc63.a[libicuuc.so] because:

    Symbol _ZNKSt9type_infoeqERKS_ (number 18) is not exported from dependent

    module /opt/freeware/lib64/libstdc++.a[libstdc++.so.6].

    System error: Error 0


    #AIX-Open-Source-Software
    #AIXOpenSource


  • 2.  Re: Could not load program ./djengine:

    Posted 01/15/20 11:56 AM

    Originally posted by: H0W2_tomasz_lacki


    The symbol _ZNKSt9type_infoeqERKS_ was exported by the GCC C++ runtime on AIX build by GCC 4.
    It is no longer available since GCC 6 runtime at least.

    > /opt/freeware/bin/c++filt _ZNKSt9type_infoeqERKS_
    std::type_info::operator==(std::type_info const&) const

    AIX53:/opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.8.4/ppc64> \
    > dump -Tv -X64 libstdc++.a | grep _ZNKSt9type_infoeqERKS_
    [2164]  0x2003aab8    .data      EXP     DS   Ldef        [noIMid] _ZNKSt9type_infoeqERKS_

    AIX72:/opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/8.3.0/ppc64> \
    > dump -Tv -X64 libstdc++.a | grep _ZNKSt9type_infoeqERKS_


    The application shall be rebuild by the newer GCC compiler or use LIBPATH to force use alternative GCC runtime e.g
    > LIBPATH=/opt/freeware/lib/gcc/powerpc-ibm-aix5.3.0.0/4.8.4/ppc64 ./djengine -version

     

    Notice, According to IBM:

    "We have change our strategy and want to have one default version of gcc for all releases of AIX as of now it is gcc 8.3

    So when you install using yum and AIX toolbox repo a gcc on AIX it will be gcc 8.3"

    https://www.ibm.com/developerworks/community/forums/html/topic?id=bcdb4e42-f815-48c5-a715-ac6c73a55339

     


    #AIXOpenSource
    #AIX-Open-Source-Software


  • 3.  Re: Could not load program ./djengine:

    Posted 01/16/20 05:31 AM

    Originally posted by: christophe41


    Hello Tomasz,

    I thank you very very much for all this explanation.

    Have a nice day,

    Christophe 

     


    #AIXOpenSource
    #AIX-Open-Source-Software


  • 4.  Re: Could not load program ./djengine:

    Posted 01/16/20 10:59 AM

    Originally posted by: christophe41


    Hello Tomasz,

    What you would advise to us ?

    For some reasons is it better to work with  the package  gcc-4 version  or to work with gcc-8  version ?

    Do these two gcc versions have different features ? I mean for some reasons our application would have to be build with the gcc-4 compiler ...

    Could we have a dependencie between our application and a gcc compiler version ?

     

    For security reasons or reliability reasons should we always work with the newest gcc compiler ?

    I thank you very much for your help,

     

    Christophe

     


    #AIX-Open-Source-Software
    #AIXOpenSource


  • 5.  Re: Could not load program ./djengine:

    Posted 01/16/20 08:27 PM

    Originally posted by: H0W2_tomasz_lacki


     

    Who is the owner of the application? Do you have source code and are you able to compile it or the binary form is available only?

    What is the AIX lowest version the application supports?

    Does the application links to any library from the AIX Toolbox?

     

    Q:

    For some reasons is it better to work with the package gcc-4 version or to work with gcc-8 version ?

    A:

    The short answer is compiling with GCC 8.

    1) As mentioned before the GCC 8 is (will be) the default version for AIX Toolbox. Notice the link to AIX Toolbox default GCC runtime points to version that is not compatible with your application.

    AIX72:/opt/freeware/lib> ls -l | grep gcc

    drwxr-xr-x  3 root system      256 Nov 14 11:28 gcc

    lrwxrwxrwx  1 root system       44 Dec 12 11:19 libatomic.a -> gcc/powerpc-ibm-aix7.2.0.0/8.3.0/libatomic.a

    lrwxrwxrwx  1 root system       43 Dec 12 11:19 libgcc_s.a -> gcc/powerpc-ibm-aix7.2.0.0/8.3.0/libgcc_s.a

    lrwxrwxrwx  1 root system       42 Dec 12 11:19 libgomp.a -> gcc/powerpc-ibm-aix7.2.0.0/8.3.0/libgomp.a

    lrwxrwxrwx  1 root system       44 Dec 12 11:19 libstdc++.a -> gcc/powerpc-ibm-aix7.2.0.0/8.3.0/libstdc++.a

    2) The GCC8 compared to GCC4 has much better diagnostic and it is more strict. Use -Wall during compilation. Review compiler output.

    Read:.
    https://developers.redhat.com/blog/2018/05/24/detecting-string-truncation-with-gcc-8/

     

    You application shall run the same compiled by both GCC versions. Your issue is selecting the correct runtime library as they are not compatible when the C++ compiler is used.

    Q:

    Do these two gcc versions have different features ? I mean for some reasons our application would have to be build with the gcc-4 compiler.

    A:

    You could think of the GCC 4.8 as a subset of higher GCC version as the features are discussed. Read GCC release notes for more info. The correct C++ code compiled by GCC 4.8 shall compile on higher version as well.

    Q:

    Could we have a dependencie between our application and a gcc compiler version ?

    A:

    Some vendors guarantee binary compatibility between binaries produced by different GCC versions the vendor provides (e.g on the Linux distribution IBM recently purchased).

    Q:

    For security reasons or reliability reasons should we always work with the newest gcc compiler ?

    A:

    Both GCC 4.8 and GCC 8.3 are reliable compilers. They are used as system compilers for the RedHat Linux (7.7, 8.1). The RedHat Linux has the POWER processor version as well.

    It is hard to say how it is popular in the AIX world where the xlC dominates. Especially for the C++ code. Maybe IBM could provide more info.

    My experience for business type application with >1000000 lines of C++ code (AIX7.1 GCC6.3 -mcpu=power7 -O2 -pthread): No single issue related to compiler generated code.

     

    The security affects output from the compiler not the compiler itself. The GCC runtime libraries needs to be deployed on the target system only (libgcc*aix*.ppc.rpm, libstdcplusplus*aix*.ppc.rpm).

    The followed site shows that vulnerabilities historically affected GCC so far

    https://www.cvedetails.com/product/960/GNU-GCC.html?vendor_id=72

     

    Source code of the application is potential source of security issue. If it safe, compiler produces safe code.

    The new version of the GCC could help you with that. The better diagnostic was already mentioned.

    The other option you could consider is instrumenting the output code to be more secure if your application is compiled on the Linux. E.g. Let QA retest the application on Linux build with compiler flag  -fstack-protector-strong that is not provided by AIX GCC. Fixing any issue found on one platform help other if the same code is used.

    Read:

    https://developers.redhat.com/blog/2018/03/21/compiler-and-linker-flags-gcc/

     

     


    #AIXOpenSource
    #AIX-Open-Source-Software


  • 6.  Re: Could not load program ./djengine:

    Posted 01/16/20 08:38 PM

    Originally posted by: H0W2_tomasz_lacki


    Stay with the version vendor recommends.

    https://www.ibm.com/developerworks/community/forums/html/topic?id=8cc084e4-005d-4056-83b9-152cc49da2a7

    We are planing to switch from GCC 6.3 to 8.3

     

     


    #AIXOpenSource
    #AIX-Open-Source-Software