LI76666: UNRESOLVED SYMBOL ERROR WITH -QIPA=LEVEL=0
Fixes are available
Closed as program error.
Clients who list duplicate libraries on their link line more than once and link with -qipa may observe unresolved symbol errors at link time. eg: $xlC_r -O2 -q64 -L. -o abc abc.o -la -lb -lc -lb -la -qipa=level=0 -qinline=noauto -qipa=relink . . d: 0711-317 ERROR: Undefined symbol: .A2i::Utf8::GraphemeReference::Compare(const A2i::Utf8::GraphemeReference&) const ld: 0711-317 ERROR: Undefined symbol: .A2i::Genrl::Msrmnt::operator==(const A2i::Genrl::Msrmnt::MeasurementInfo&,const A2i::Genrl::Msrmnt::MeasurementInfo&) ld: 0711-317 ERROR: Undefined symbol: .A2i::Protocol::BidirectionalBlockHeader::BidirectionalBlockHead er() $
As a workaround to avoid this problem, remove all the duplicate library entries from the link line.
USERS AFFECTED: Users of TPO with -O4 and above may be affected by this issue. PROBLEM DESCRIPTION: The compiler tries to avoid putting archives which are completely IPA enabled on the linker command line because all the functions from them will now be in object files for partitions at the end of IPA link. If an archive has any non-IPA stuff it must be on the command line. So at the start of IPA link, we process all object files including archives. They go into a table. In the case for this APAR, there will be more than one entry in the table for the ones that are duplicated on the command line. Then as we read in the object files out of the libraries we flag entries in the table as to whether they are all IPA or have some non-IPA members. Then at link edit time right before we call the linker we bypass the ones that are IPA only. However the thing that flags them only looks down to the first entry for the containing library; and we bypass that one correctly. But the later entries are still in that table and they are not bypassed. They never had any flags set so they get added to the command line to the linker which causes the unresolved symbols at link time.
The fix is to make a pass over the table and mark duplicate entries the same as the first one so the correct bypassing will work.
Reported component name
XL C/C++ FOR LI
Reported component ID
NoSpecatt / Xsystem
Last modified date
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fixed component name
XL C/C++ FOR LI
Fixed component ID
Applicable component levels
RB10 PSN IV09519