howardlau1999 / rdmapp

C++ interfaces for RDMA access

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

build error on ubuntu 20.04 and gcc-10

ZTJiu opened this issue · comments

ubuntu 20.04
gcc-10

rdmapp/src/socket/tcp_connection.cc:108:11: error: ‘::write’ has not been declared; did you mean ‘write_’?
108 | n = ::write(channel_->fd(), buffer_, length_);
| ^~~~~

Is this ::write a system call or libibverbs-dev interface ?

ubuntu 20.04 gcc-10

rdmapp/src/socket/tcp_connection.cc:108:11: error: ‘::write’ has not been declared; did you mean ‘write_’? 108 | n = ::write(channel_->fd(), buffer_, length_); | ^~~~~

Is this ::write a system call or libibverbs-dev interface ?

It is a Linux system call

I can build on Ubuntu 22.04 with gcc 11.2

I have added #include <unistd.h> in that file, can you check if the latest code compiles? It can compile now on Github Actions.

It works. But there's another error

CMake Error at CMakeLists.txt:95 (add_executable):
CXX_STANDARD is set to invalid value '20;REQUIRED'

I fix by change set(CMAKE_CXX_STANDARD 20 REQUIRED) to set(CMAKE_CXX_STANDARD 20)

Thank you for your reply.