ArcticaProject / nx-libs

nx-libs
Other
119 stars 39 forks source link

compilation of nx-libs fails on OpenBSD clang compiler #1044

Open sandeep-gh opened 2 years ago

sandeep-gh commented 2 years ago

Using OpenBSD clang version 11.1.0 compiler for Target: aarch64-unknown-openbsd7. to compile nx-libs. It fails to compile due to type mismatch I guess. Is there a workaround/easy fix.


  if (bind(newFD, addr, addrlen) == -1)
      ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~
/usr/include/c++/v1/system_error:390:1: note: candidate function not viable: no known conversion from '__bind<int &, sockaddr *&, unsigned int &>' to 'const std::__1::error_code' for 1st argument
operator==(const error_code& __x, const error_code& __y) _NOEXCEPT
^
/usr/include/c++/v1/system_error:397:1: note: candidate function not viable: no known conversion from '__bind<int &, sockaddr *&, unsigned int &>' to 'const std::__1::error_code' for 1st argument
operator==(const error_code& __x, const error_condition& __y) _NOEXCEPT
^
/usr/include/c++/v1/system_error:405:1: note: candidate function not viable: no known conversion from '__bind<int &, sockaddr *&, unsigned int &>' to 'const std::__1::error_condition' for 1st argument
operator==(const error_condition& __x, const error_code& __y) _NOEXCEPT
^
/usr/include/c++/v1/system_error:412:1: note: candidate function not viable: no known conversion from '__bind<int &, sockaddr *&, unsigned int &>' to 'const std::__1::error_condition' for 1st argument
operator==(const error_condition& __x, const error_condition& __y) _NOEXCEPT
^
/usr/include/c++/v1/utility:576:1: note: candidate template ignored: could not match 'pair' against '__bind'
operator==(const pair<_T1,_T2>& __x, const pair<_T1,_T2>& __y)```
uli42 commented 2 years ago

Hmm, we are successfully compiling using clang in GitHub actions. In what file do see this line?

Uli

sandeep-gh @.***> schrieb am Do., 24. März 2022, 07:40:

Using OpenBSD clang version 11.1.0 compiler for Target: aarch64-unknown-openbsd7. to compile nx-libs. It fails to compile due to type mismatch I guess. Is there a workaround/easy fix.

if (bind(newFD, addr, addrlen) == -1)


/usr/include/c++/v1/system_error:390:1: note: candidate function not viable: no known conversion from '__bind<int &, sockaddr *&, unsigned int &>' to 'const std::__1::error_code' for 1st argument
operator==(const error_code& __x, const error_code& __y) _NOEXCEPT
^
/usr/include/c++/v1/system_error:397:1: note: candidate function not viable: no known conversion from '__bind<int &, sockaddr *&, unsigned int &>' to 'const std::__1::error_code' for 1st argument
operator==(const error_code& __x, const error_condition& __y) _NOEXCEPT
^
/usr/include/c++/v1/system_error:405:1: note: candidate function not viable: no known conversion from '__bind<int &, sockaddr *&, unsigned int &>' to 'const std::__1::error_condition' for 1st argument
operator==(const error_condition& __x, const error_code& __y) _NOEXCEPT
^
/usr/include/c++/v1/system_error:412:1: note: candidate function not viable: no known conversion from '__bind<int &, sockaddr *&, unsigned int &>' to 'const std::__1::error_condition' for 1st argument
operator==(const error_condition& __x, const error_condition& __y) _NOEXCEPT
^
/usr/include/c++/v1/utility:576:1: note: candidate template ignored: could not match 'pair' against '__bind'
operator==(const pair<_T1,_T2>& __x, const pair<_T1,_T2>& __y)```

—
Reply to this email directly, view it on GitHub
<https://github.com/ArcticaProject/nx-libs/issues/1044>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABQHBZB2FC36WRAZ34RH533VBQE5DANCNFSM5RQEWHIQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
sandeep-gh commented 2 years ago

My bad, didn't copy the file name error message. Its in nxcomp/src/Loop.cpp.

Loop.cpp:4224:34: error: invalid operands to binary expression ('__bind<int &, sockaddr *&, unsigned int &>' and 'int')