Programming Languages on Power

Power Programming Languages

IBM Power, including the AIX, IBM i, and Linux operating systems, support a wide range of programming languages, catering to both traditional enterprise applications and modern development needs.


#Power


#Servers
#Programminglanguages
 View Only
  • 1.  default LIBPATH on AIX 7.1

    Posted 09/02/21 07:19 AM
    My question is why does this binary load on one machine and not the other? From my understanding it should not load on either one.


    I have a binary that can be executed on 2 AIX machines. That binary has:
    aix71rel2-1 AIX-powerpc latest$ dump -H ./kernel/tools/ppc64/logtool | grep freeware
    0 /opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/8.0.0:/opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/8.0.0/../../..:/usr/lib:/lib
    [Note 7.2 and not 7.1]

    On one AIX machine:
    aix71rel2-1 AIX-powerpc latest$ ls /opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/
    8.3.0
    On this machine the program executes correctly.
    [Note that its 7.1 and there is no LIBPATH in env]

    On another AIX machine:

    pmilosla@REMOTE@p9aixdev4-16:~> ls /opt/freeware/lib/gcc/powerpc-ibm-aix7.1.0.0/
    8
    pmilosla@REMOTE@p9aixdev4-16:latest> ./kernel/tools/ppc64/logtool
    exec(): 0509-036 Cannot load program ./kernel/tools/ppc64/logtool because of the following errors:
    0509-150 Dependent module libgcc_s.a(shr.o) could not be loaded.
    0509-022 Cannot load module libgcc_s.a(shr.o).
    0509-026 System error: A file or directory in the path name does not exist.

    [this machine is also 7.1]
    [if I set LIBPATH it works correctly.]

    /etc/environment or profile doesnt have LIBPATH
    There are no files that match:
    /etc/lo* or ld*

    If this is an AIX question (and not C), please link to correct group.

    Thanks,
    Philip


    ------------------------------
    philip miloslavsky
    ------------------------------

    #C/C++andFortran


  • 2.  RE: default LIBPATH on AIX 7.1

    Posted 09/02/21 10:36 AM
    Yes, you are correct that binaries built on 7.2 in the typical fashion are not meant for deployment to 7.1 environments; however, that does not mean that they will necessarily fail to load in 7.1 environments.

    As for why it loads on one 7.1 machine but not the other, in addition to LIBPATH, you need to rule out LD_LIBRARY_PATH.

    There is also a chance that there are some symlinks or other customization on the machine where it loads. For example, the mere presence of /opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/8.0.0/ (even if empty) means that /opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/8.0.0/../../.. refers to /opt/freeware/lib.

    ------------------------------
    Hubert Tong
    C++ Standards
    IBM XL Compilers

    My postings on this site do not necessarily represent IBM's positions, strategies or opinions.
    ------------------------------