Open unspacyar opened 5 years ago
Hi. daemon
is not in POSIX, so it might not availabe on Haiku OS.
I will create a branch to address this issue. Stay tuned.
Could you please try the following feature branch on Haiku OS? https://github.com/bsdelf/mous/tree/feature/deprecate-daemon
Hello! and thanks for your answer! :-)
I tried again with the branch provided. I had to add the #include
[ 27%] Building CXX object CMakeFiles/mous-ncurses.dir/apps/ncurses/ClientPlayerHandler.cc.o
[ 28%] Building CXX object CMakeFiles/mous-ncurses.dir/apps/ncurses/ClientPlaylistHandler.cc.o
[ 30%] Building CXX object CMakeFiles/mous-ncurses.dir/apps/ncurses/ExplorerView.cc.o
[ 31%] Building CXX object CMakeFiles/mous-ncurses.dir/apps/ncurses/HelpView.cc.o
[ 32%] Building CXX object CMakeFiles/mous-ncurses.dir/apps/ncurses/MainUi.cc.o
[ 33%] Building CXX object CMakeFiles/mous-ncurses.dir/apps/ncurses/PlaylistView.cc.o
[ 34%] Building CXX object CMakeFiles/mous-ncurses.dir/apps/ncurses/Server.cc.o
[ 36%] Building CXX object CMakeFiles/mous-ncurses.dir/apps/ncurses/ServerContext.cc.o
[ 37%] Building CXX object CMakeFiles/mous-ncurses.dir/apps/ncurses/Session.cc.o
[ 38%] Building CXX object CMakeFiles/mous-ncurses.dir/apps/ncurses/StatusView.cc.o
[ 39%] Building CXX object CMakeFiles/mous-ncurses.dir/apps/ncurses/main.cc.o
[ 40%] Linking CXX executable mous-ncurses
CMakeFiles/mous-ncurses.dir/apps/ncurses/Client.cc.o: In function scx::InetAddr::Assign(std::string const&, int)': Client.cc:(.text._ZN3scx8InetAddr6AssignERKSsi[_ZN3scx8InetAddr6AssignERKSsi]+0x2c): undefined reference to
inet_pton'
CMakeFiles/mous-ncurses.dir/apps/ncurses/Client.cc.o: In function scx::TcpSocket::Shutdown(int)': Client.cc:(.text._ZN3scx9TcpSocket8ShutdownEi[_ZN3scx9TcpSocket8ShutdownEi]+0x2a): undefined reference to
shutdown'
CMakeFiles/mous-ncurses.dir/apps/ncurses/Client.cc.o: In function scx::TcpSocket::TcpSocket()': Client.cc:(.text._ZN3scx9TcpSocketC2Ev[_ZN3scx9TcpSocketC5Ev]+0x2e): undefined reference to
socket'
CMakeFiles/mous-ncurses.dir/apps/ncurses/Client.cc.o: In function scx::TcpSocket::Connect(scx::InetAddr const&) const': Client.cc:(.text._ZNK3scx9TcpSocket7ConnectERKNS_8InetAddrE[_ZNK3scx9TcpSocket7ConnectERKNS_8InetAddrE]+0x28): undefined reference to
connect'
CMakeFiles/mous-ncurses.dir/apps/ncurses/Client.cc.o: In function scx::TcpSocket::RecvN(void*, unsigned long, int) const': Client.cc:(.text._ZNK3scx9TcpSocket5RecvNEPvmi[_ZNK3scx9TcpSocket5RecvNEPvmi]+0x28): undefined reference to
recv'
CMakeFiles/mous-ncurses.dir/apps/ncurses/Client.cc.o: In function scx::TcpSocket::SendN(void const*, unsigned long, int) const': Client.cc:(.text._ZNK3scx9TcpSocket5SendNEPKvmi[_ZNK3scx9TcpSocket5SendNEPKvmi]+0x28): undefined reference to
send'
CMakeFiles/mous-ncurses.dir/apps/ncurses/Server.cc.o: In function scx::TcpSocket::SetOption(scx::SocketOpt const&)': Server.cc:(.text._ZN3scx9TcpSocket9SetOptionERKNS_9SocketOptE[_ZN3scx9TcpSocket9SetOptionERKNS_9SocketOptE]+0x33): undefined reference to
setsockopt'
Server.cc:(.text._ZN3scx9TcpSocket9SetOptionERKNS_9SocketOptE[_ZN3scx9TcpSocket9SetOptionERKNS_9SocketOptE]+0x5f): undefined reference to setsockopt' Server.cc:(.text._ZN3scx9TcpSocket9SetOptionERKNS_9SocketOptE[_ZN3scx9TcpSocket9SetOptionERKNS_9SocketOptE]+0x88): undefined reference to
setsockopt'
CMakeFiles/mous-ncurses.dir/apps/ncurses/Server.cc.o: In function scx::TcpSocket::Bind(std::string const&, int)': Server.cc:(.text._ZN3scx9TcpSocket4BindERKSsi[_ZN3scx9TcpSocket4BindERKSsi]+0x42): undefined reference to
bind'
CMakeFiles/mous-ncurses.dir/apps/ncurses/Server.cc.o: In function scx::TcpSocket::Listen(int) const': Server.cc:(.text._ZNK3scx9TcpSocket6ListenEi[_ZNK3scx9TcpSocket6ListenEi]+0x20): undefined reference to
listen'
CMakeFiles/mous-ncurses.dir/apps/ncurses/Server.cc.o: In function scx::TcpSocket::Accept(scx::TcpSocket&) const': Server.cc:(.text._ZNK3scx9TcpSocket6AcceptERS0_[_ZNK3scx9TcpSocket6AcceptERS0_]+0x46): undefined reference to
accept'
collect2: error: ld returned 1 exit status
CMakeFiles/mous-ncurses.dir/build.make:409: recipe for target 'mous-ncurses' failed
make[2]: [mous-ncurses] Error 1
CMakeFiles/Makefile2:215: recipe for target 'CMakeFiles/mous-ncurses.dir/all' failed
make[1]: [CMakeFiles/mous-ncurses.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
[x86] ~/Compilar/mous-feature-deprecate-daemon>
Looks like Haiku OS needs additional link flags to use socket API: https://www.freelists.org/post/haiku-development/gcc-ld-and-sockets-under-Haiku,1
Considering there might be more unexpected build failures, I will have to install Haiku for porting.
As for nonportable daemon()
, it's already fixed with that branch, so I will close this issue later.
Hello. I was trying to compile mous under Haiku, but I get the following error:
[ 37%] Building CXX object CMakeFiles/mous-ncurses.dir/apps/ncurses/StatusView.cc.o [ 38%] Building CXX object CMakeFiles/mous-ncurses.dir/apps/ncurses/main.cc.o /boot/home/Compilar/mous-master/apps/ncurses/main.cc: In function 'int main(int, char)': /boot/home/Compilar/mous-master/apps/ncurses/main.cc:58:11: error: '::daemon' has not been declared ::daemon(1, 0); ^
~CMakeFiles/mous-ncurses.dir/build.make:350: recipe for target 'CMakeFiles/mous-ncurses.dir/apps/ncurses/main.cc.o' failed make[2]: ** [CMakeFiles/mous-ncurses.dir/apps/ncurses/main.cc.o] Error 1 CMakeFiles/Makefile2:215: recipe for target 'CMakeFiles/mous-ncurses.dir/all' failed make[1]: [CMakeFiles/mous-ncurses.dir/all] Error 2 Makefile:129: recipe for target 'all' failed make: *** [all] Error 2