A fix is available
APAR status
Closed as program error.
Error description
When compiling with nanosleep() function the compiler has an ambiguous call error to nanosleep. The testcase used below: ``` >cat test.C #include <time.h> extern "C" int nanosleep(const timespec *, timespec *); #include <iostream> > ``` When compiling this testcase error is shown below: ``` >./compile.sh + ./ibm-clang++ -m64 -o testC test.C In file included from test.C:3: In file included from ./bin/../include/c++/v1/iostream:37: In file included from ./bin/../include/c++/v1/ios:215: In file included from ./bin/../include/c++/v1/__locale:18: In file included from ./bin/../include/c++/v1/memory:820: In file included from ./bin/../include/c++/v1/__memory/shared_ptr.h:34: In file included from ./bin/../include/c++/v1/atomic:524: In file included from ./bin/../include/c++/v1/__thread/timed_backoff_policy.h:16: ./bin/../include/c++/v1/__threading_support:420:11: error: call to 'nanosleep' is ambiguous while (nanosleep(&__ts, &__ts) == -1 && errno == EINTR); ^~~~~~~~~ test.C:2:16: note: candidate function extern "C" int nanosleep(const timespec *, timespec *); ^ ./bin/../include/c++/v1/__support/ibm/nanosleep.h:17:22: note: candidate function _LIBCPP_FUNC_VIS int nanosleep(const struct timespec* , struct timespec* ); ^ 1 error generated. + ./testC ./compile.sh: line 5: ./testC: not found > ``` The compiler should compile with the nanosleep() function. KEYWORDS: ZOS0301T/K
Local fix
NA
Problem summary
**************************************************************** * USERS AFFECTED: Users of Open XL C/C++ 1.1 * **************************************************************** * PROBLEM DESCRIPTION: Fix possible ambiguous call to * * nanosleep when mixing C++ library * * headers * * with user provided definition. * **************************************************************** * RECOMMENDATION: Install the PTF * **************************************************************** If the user tries to provide their own version of nanosleep(), they can encounter an ambiguous call error with the C++ library headers.
Problem conclusion
Update the C++ library headers so the call is not ambiguous. The User should install the ptf to solve the problem.
Temporary fix
Comments
APAR Information
APAR number
PH54349
Reported component name
C/C++ FOR MVS
Reported component ID
56551210A
Reported release
7C2
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2023-05-05
Closed date
2023-06-19
Last modified date
2023-07-03
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
UI92320
Modules/Macros
CNWPHPAX CNWSNPAX
Fix information
Fixed component name
C/C++ FOR MVS
Fixed component ID
56551210A
Applicable component levels
R7C2 PSY UI92320
UP23/06/22 P F306
Fix is available
Select the PTF appropriate for your component level. You will be required to sign in. Distribution on physical media is not available in all countries.
[{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SSTLTF","label":"z\/OS XL C\/C++"},"Platform":[{"code":"PF054","label":"z Systems"}],"Version":"7C2","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]
Document Information
Modified date:
03 July 2023