nx-libs icon indicating copy to clipboard operation
nx-libs copied to clipboard

compilation of nx-libs fails on OpenBSD clang compiler

Open sandeep-gh opened this issue 2 years ago • 2 comments

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)```

sandeep-gh avatar Mar 24 '22 06:03 sandeep-gh

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: @.***>

uli42 avatar Mar 24 '22 07:03 uli42

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')

sandeep-gh avatar Mar 24 '22 16:03 sandeep-gh