IBM Support

IV14250: IPA LINKING WITH WRONG LIBRARY

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When enabling IPA with the -O4 and above or -qipa compiler
    options and linking with a library using the -l option, the
    compiler is linking with libraries with the file suffix of *.so
    before libraries with the file suffix *.a when runtime linking
    is not enabled, that is, -brtl is not present.
    
    For example, when a directory contains two libraries with the
    same name, differing only by their file suffixes *.a and *.so,
    the compiler unexpectedly links with the *.so library when
    runtime linking is disabled.
    
    
    
    AIX library convention states that both static and shared
    objects can be contained within a *.a archive library.  Shared
    objects that have runtime linking enabled (compiled with -G) are
    not required to be put into an archive (if the user prefers),
    and instead the object file can be given the *.so file suffix.
    
    When linking with the '-l' option, the compiler by default
    searches only for *.a libraries.  If runtime linking is enabled
    (via the -brtl option) during the application link step, then
    the compiler will search for *.so libraries.  If none are
    found, it then searches for *.a libraries.
    
    
    
    The compiler's IPA step is not following the runtime linking
    name convention, and is trying to link with *.so libraries
    before *.a libraries.
    

Local fix

  • - Rename one of the libraries
    - Move one of the libraries to a different directory
    - Do not use the '-l' option to link with the library, and
    instead, place the full library name on the compile line.  For
    example, to link with libmylib.so:
    
       $ xlc test1.c test2.c libmylib.so
    
    It should be noted that the library search path normally given
    by the '-L' option may not be present in the final executable,
    and the LIBPATH environment variable may need to be used.
    

Problem summary

  • PROBLEM DESCRIPTION:
    The IPA link phase chooses the wrong library.
    
    USERS AFFECTED:
    Those using -O4 and above using two libraries with the same
    name and different file suffixes.
    

Problem conclusion

  • The compiler now checks to see if there are both kinds of
    library with the same path name and different suffixes and uses
    the appropriate one based on the -brtl flat being on or off.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV14250

  • Reported component name

    XL FORTRAN FOR

  • Reported component ID

    5724X1500

  • Reported release

    D10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2012-01-31

  • Closed date

    2012-03-28

  • Last modified date

    2012-03-28

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

    LI76801

Fix information

  • Fixed component name

    XL FORTRAN FOR

  • Fixed component ID

    5724X1500

Applicable component levels

  • RD10 PSY U850834

       UP C

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSGH4D","label":"XL Fortran for AIX"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"13.1","Edition":"","Line of Business":{"code":"LOB57","label":"Power"}}]

Document Information

Modified date:
28 March 2012