Fixes are available
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
LI76801
Reported component name
XL FORTRAN LINU
Reported component ID
5724X1600
Reported release
D10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2012-05-23
Closed date
2012-05-23
Last modified date
2012-05-23
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
XL FORTRAN LINU
Fixed component ID
5724X1600
Applicable component levels
RD10 PSN IV14250
UP06/09/13
[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSAT4T","label":"XL Fortran for Linux"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"D10","Line of Business":{"code":"LOB57","label":"Power"}}]
Document Information
Modified date:
17 October 2021