Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

call to 'cpp_nanosleep' is ambiguous #22

Open
v1gnesh opened this issue May 25, 2023 · 1 comment
Open

call to 'cpp_nanosleep' is ambiguous #22

v1gnesh opened this issue May 25, 2023 · 1 comment

Comments

@v1gnesh
Copy link

v1gnesh commented May 25, 2023

When building a project using zopen and the oelcpp clang, with a dependency on zoslib, I get the following.
/usr/lpp/IBM/oelcpp/v2r0/bin/ is in $PATH.

Is this a known problem, and is there a work-around, wherein I use the headers from zoslib, rather than oelcpp?

[1/287] Building CXX object src/execution/operator/join/CMakeFiles/duckdb_operator_join.dir/ub_duckdb_operator_join.cpp.o
FAILED: src/execution/operator/join/CMakeFiles/duckdb_operator_join.dir/ub_duckdb_operator_join.cpp.o 
/usr/lpp/IBM/oelcpp/v2r0/bin/clang++ -DDUCKDB -DDUCKDB_BUILD_LIBRARY -DDUCKDB_MAIN_LIBRARY -I/v1g/zopen/dev/duckdbport/duckdb/src/include -I/v1g/zopen/dev/duckdbport/duckdb/third_party/fsst -I/v1g/zopen/dev/duckdbport/duckdb/third_party/fmt/include -I/v1g/zopen/dev/duckdbport/duckdb/third_party/hyperloglog -I/v1g/zopen/dev/duckdbport/duckdb/third_party/fastpforlib -I/v1g/zopen/dev/duckdbport/duckdb/third_party/fast_float -I/v1g/zopen/dev/duckdbport/duckdb/third_party/re2 -I/v1g/zopen/dev/duckdbport/duckdb/third_party/miniz -I/v1g/zopen/dev/duckdbport/duckdb/third_party/utf8proc/include -I/v1g/zopen/dev/duckdbport/duckdb/third_party/miniparquet -I/v1g/zopen/dev/duckdbport/duckdb/third_party/concurrentqueue -I/v1g/zopen/dev/duckdbport/duckdb/third_party/pcg -I/v1g/zopen/dev/duckdbport/duckdb/third_party/tdigest -I/v1g/zopen/dev/duckdbport/duckdb/third_party/mbedtls/include -I/v1g/zopen/dev/duckdbport/duckdb/third_party/jaro_winkler -fzos-le-char-mode=ascii -mnocsect -fno-short-enums -O3  -fgnu-keywords -I/v1g/zopen/prod/zoslib-zopen/include -O3 -DNDEBUG -O3 -DNDEBUG   -fPIC -fcolor-diagnostics -std=c++11 -MD -MT src/execution/operator/join/CMakeFiles/duckdb_operator_join.dir/ub_duckdb_operator_join.cpp.o -MF src/execution/operator/join/CMakeFiles/duckdb_operator_join.dir/ub_duckdb_operator_join.cpp.o.d -o src/execution/operator/join/CMakeFiles/duckdb_operator_join.dir/ub_duckdb_operator_join.cpp.o -c /v1g/zopen/dev/duckdbport/duckdb/build/release/src/execution/operator/join/ub_duckdb_operator_join.cpp
In file included from /v1g/zopen/dev/duckdbport/duckdb/build/release/src/execution/operator/join/ub_duckdb_operator_join.cpp:2:
In file included from /v1g/zopen/dev/duckdbport/duckdb/src/execution/operator/join/outer_join_marker.cpp:1:
In file included from /v1g/zopen/dev/duckdbport/duckdb/src/include/duckdb/execution/operator/join/outer_join_marker.hpp:11:
In file included from /v1g/zopen/dev/duckdbport/duckdb/src/include/duckdb/common/mutex.hpp:11:
In file included from /usr/lpp/IBM/oelcpp/v2r0/bin/../include/c++/v1/mutex:190:
In file included from /usr/lpp/IBM/oelcpp/v2r0/bin/../include/c++/v1/__mutex_base:14:
In file included from /v1g/zopen/prod/zoslib-zopen/include/__threading_support:15:
/usr/lpp/IBM/oelcpp/v2r0/bin/../include/c++/v1/__threading_support:420:11: error: call to 'cpp_nanosleep' is ambiguous
   while (nanosleep(&__ts, &__ts) == -1 && errno == EINTR);
          ^~~~~~~~~
/v1g/zopen/prod/zoslib-zopen/include/__threading_support:14:19: note: expanded from macro 'nanosleep'
#define nanosleep cpp_nanosleep
                  ^~~~~~~~~~~~~
/v1g/zopen/prod/zoslib-zopen/include/time.h:64:16: note: candidate function
__Z_EXPORT int nanosleep(const struct timespec*, struct timespec*);
               ^
/v1g/zopen/prod/zoslib-zopen/include/__threading_support:14:19: note: expanded from macro 'nanosleep'
#define nanosleep cpp_nanosleep
                  ^
/usr/lpp/IBM/oelcpp/v2r0/bin/../include/c++/v1/__support/ibm/nanosleep.h:17:22: note: candidate function
_LIBCPP_FUNC_VIS int nanosleep(const struct timespec* , struct timespec* );
                     ^
/v1g/zopen/prod/zoslib-zopen/include/__threading_support:14:19: note: expanded from macro 'nanosleep'
#define nanosleep cpp_nanosleep
                  ^
1 error generated.
@v1gnesh
Copy link
Author

v1gnesh commented May 26, 2023

I've included time.h in the relevant file (mutex.hpp in this case), and make/cmake proceeds to get past this successfully. Thank you @IgorTodorovskiIBM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant