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

half-float raise function conflict #27

Open
davidbrochart opened this issue Feb 2, 2021 · 0 comments
Open

half-float raise function conflict #27

davidbrochart opened this issue Feb 2, 2021 · 0 comments

Comments

@davidbrochart
Copy link
Member

With a fresh conda environment:

mamba install make cmake gtest compilers xtensor=0.23.0 xtensor-io=0.12.0 xsimd=7.4.8 nlohmann_json=3.2.0

After entering:

cmake .. -DBUILD_TESTS=ON
make xtest

I get the following errors:

In file included from /home/david/mambaforge/envs/zarray-dev/include/xtl/xhalf_float.hpp:14,
                 from /home/david/github/davidbrochart/zarray/include/zarray/zarray_impl.hpp:14,
                 from /home/david/github/davidbrochart/zarray/include/zarray/zarray.hpp:19,
                 from /home/david/github/davidbrochart/zarray/test/test_zarray.cpp:11:
/home/david/mambaforge/envs/zarray-dev/include/xtl/xhalf_float_impl.hpp: In function 'T half_float::detail::half2int(unsigned int)':
/home/david/mambaforge/envs/zarray-dev/include/xtl/xhalf_float_impl.hpp:962:21: error: call of overloaded 'raise(<unnamed enum>)' is ambiguous
  962 |     raise(FE_INVALID);
      |                     ^
/home/david/mambaforge/envs/zarray-dev/include/xtl/xhalf_float_impl.hpp:292:15: note: candidate: 'void half_float::detail::raise(int, bool)'
  292 |   inline void raise(int HALF_UNUSED_NOERR(flags), bool HALF_UNUSED_NOERR(cond) = true) {
      |               ^~~~~
In file included from /home/david/mambaforge/envs/zarray-dev/x86_64-conda-linux-gnu/sysroot/usr/include/sys/wait.h:31,
                 from /home/david/mambaforge/envs/zarray-dev/include/gtest/internal/gtest-internal.h:45,
                 from /home/david/mambaforge/envs/zarray-dev/include/gtest/gtest.h:62,
                 from /home/david/github/davidbrochart/zarray/test/test_zarray.cpp:10:
/home/david/mambaforge/envs/zarray-dev/x86_64-conda-linux-gnu/sysroot/usr/include/signal.h:138:12: note: candidate: 'int raise(int)'
  138 | extern int raise (int __sig) __THROW;
      |            ^~~~~
In file included from /home/david/mambaforge/envs/zarray-dev/include/xtl/xhalf_float.hpp:14,
                 from /home/david/github/davidbrochart/zarray/include/zarray/zarray_impl.hpp:14,
                 from /home/david/github/davidbrochart/zarray/include/zarray/zarray.hpp:19,
                 from /home/david/github/davidbrochart/zarray/test/test_zarray.cpp:11:
/home/david/mambaforge/envs/zarray-dev/include/xtl/xhalf_float_impl.hpp:979:21: error: call of overloaded 'raise(<unnamed enum>)' is ambiguous
  979 |     raise(FE_INVALID);
      |                     ^
/home/david/mambaforge/envs/zarray-dev/include/xtl/xhalf_float_impl.hpp:292:15: note: candidate: 'void half_float::detail::raise(int, bool)'
  292 |   inline void raise(int HALF_UNUSED_NOERR(flags), bool HALF_UNUSED_NOERR(cond) = true) {
      |               ^~~~~
In file included from /home/david/mambaforge/envs/zarray-dev/x86_64-conda-linux-gnu/sysroot/usr/include/sys/wait.h:31,
                 from /home/david/mambaforge/envs/zarray-dev/include/gtest/internal/gtest-internal.h:45,
                 from /home/david/mambaforge/envs/zarray-dev/include/gtest/gtest.h:62,
                 from /home/david/github/davidbrochart/zarray/test/test_zarray.cpp:10:
/home/david/mambaforge/envs/zarray-dev/x86_64-conda-linux-gnu/sysroot/usr/include/signal.h:138:12: note: candidate: 'int raise(int)'
  138 | extern int raise (int __sig) __THROW;
      |            ^~~~~
In file included from /home/david/mambaforge/envs/zarray-dev/include/xtl/xhalf_float.hpp:14,
                 from /home/david/github/davidbrochart/zarray/include/zarray/zarray_impl.hpp:14,
                 from /home/david/github/davidbrochart/zarray/include/zarray/zarray.hpp:19,
                 from /home/david/github/davidbrochart/zarray/test/test_zarray.cpp:11:
/home/david/mambaforge/envs/zarray-dev/include/xtl/xhalf_float_impl.hpp:981:21: error: call of overloaded 'raise(<unnamed enum>)' is ambiguous
  981 |     raise(FE_INEXACT);
      |                     ^
/home/david/mambaforge/envs/zarray-dev/include/xtl/xhalf_float_impl.hpp:292:15: note: candidate: 'void half_float::detail::raise(int, bool)'
  292 |   inline void raise(int HALF_UNUSED_NOERR(flags), bool HALF_UNUSED_NOERR(cond) = true) {
      |               ^~~~~
In file included from /home/david/mambaforge/envs/zarray-dev/x86_64-conda-linux-gnu/sysroot/usr/include/sys/wait.h:31,
                 from /home/david/mambaforge/envs/zarray-dev/include/gtest/internal/gtest-internal.h:45,
                 from /home/david/mambaforge/envs/zarray-dev/include/gtest/gtest.h:62,
                 from /home/david/github/davidbrochart/zarray/test/test_zarray.cpp:10:
/home/david/mambaforge/envs/zarray-dev/x86_64-conda-linux-gnu/sysroot/usr/include/signal.h:138:12: note: candidate: 'int raise(int)'
  138 | extern int raise (int __sig) __THROW;
      |            ^~~~~

It looks like half-float's raise function conflicts with signal.h's one. Any idea @0xBYTESHIFT?

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