Issues while compiling 0.4 on Haiku

For all the help you need with Armagetron!
Post Reply
User avatar
aP|Nelg
Match Winner
Posts: 621
Joined: Wed Oct 22, 2014 10:22 pm
Contact:

Issues while compiling 0.4 on Haiku

Post by aP|Nelg »

Code: Select all

/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/7.3.0/../../../../x86_64-unknown-haiku/bin/ld: libnetwork.a(libnetwork_a-nSocket.o): in function `nSocket::Create()':
nSocket.cpp:(.text+0x566): undefined reference to `socket'
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/7.3.0/../../../../x86_64-unknown-haiku/bin/ld: nSocket.cpp:(.text+0x588): undefined reference to `setsockopt'
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/7.3.0/../../../../x86_64-unknown-haiku/bin/ld: libnetwork.a(libnetwork_a-nSocket.o): in function `nSocket::Bind(nAddress const&)':
nSocket.cpp:(.text+0x2c4d): undefined reference to `bind'
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/7.3.0/../../../../x86_64-unknown-haiku/bin/ld: nSocket.cpp:(.text+0x2c85): undefined reference to `getsockname'
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/7.3.0/../../../../x86_64-unknown-haiku/bin/ld: libnetwork.a(libnetwork_a-nSocket.o): in function `nSocket::Write(char const*, int, sockaddr const*, int) const':
nSocket.cpp:(.text+0x31cd): undefined reference to `sendto'
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/7.3.0/../../../../x86_64-unknown-haiku/bin/ld: libnetwork.a(libnetwork_a-nSocket.o): in function `nSocket::Broadcast(char const*, int, unsigned int) const':
nSocket.cpp:(.text+0x331f): undefined reference to `setsockopt'
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/7.3.0/../../../../x86_64-unknown-haiku/bin/ld: libnetwork.a(libnetwork_a-nSocket.o): in function `nSocket::Read(char*, int, nAddress&) const':
nSocket.cpp:(.text+0x35ea): undefined reference to `recvfrom'
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/7.3.0/../../../../x86_64-unknown-haiku/bin/ld: libnetwork.a(libnetwork_a-nSocket.o): in function `nAddress::GetHostname(tString&) const':
nSocket.cpp:(.text+0x3814): undefined reference to `getnameinfo'
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/7.3.0/../../../../x86_64-unknown-haiku/bin/ld: libnetwork.a(libnetwork_a-nSocket.o): in function `(anonymous namespace)::ANET_ListenOn(char*, int, std::vector<nSocket, std::allocator<nSocket> >&, bool&, bool&, bool&)':
nSocket.cpp:(.text+0x431a): undefined reference to `getaddrinfo'
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/7.3.0/../../../../x86_64-unknown-haiku/bin/ld: nSocket.cpp:(.text+0x4386): undefined reference to `freeaddrinfo'
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/7.3.0/../../../../x86_64-unknown-haiku/bin/ld: nSocket.cpp:(.text+0x4520): undefined reference to `gai_strerror'
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/7.3.0/../../../../x86_64-unknown-haiku/bin/ld: libnetwork.a(libnetwork_a-nSocket.o): in function `nDNSResolver::Resolve()':
nSocket.cpp:(.text._ZN12nDNSResolver7ResolveEv[_ZN12nDNSResolver7ResolveEv]+0x1ef): undefined reference to `getaddrinfo'
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/7.3.0/../../../../x86_64-unknown-haiku/bin/ld: nSocket.cpp:(.text._ZN12nDNSResolver7ResolveEv[_ZN12nDNSResolver7ResolveEv]+0x24e): undefined reference to `freeaddrinfo'
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/7.3.0/../../../../x86_64-unknown-haiku/bin/ld: nSocket.cpp:(.text._ZN12nDNSResolver7ResolveEv[_ZN12nDNSResolver7ResolveEv]+0x344): undefined reference to `gai_strerror'
collect2: error: ld returned 1 exit status
Makefile:1732: recipe for target 'armagetronad_main' failed
make[3]: *** [armagetronad_main] Error 1
c++ 7.3.0
Haiku r1/beta1 (Revision hrev52295+117) x86_64
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Re: Issues while compiling 0.4 on Haiku

Post by Z-Man »

Mm. Maybe, like Solaris, Haiku requires that you explicitly link a socket library? Try configuring with

./configure LIBS=-lsocket
User avatar
aP|Nelg
Match Winner
Posts: 621
Joined: Wed Oct 22, 2014 10:22 pm
Contact:

Re: Issues while compiling 0.4 on Haiku

Post by aP|Nelg »

config.log wrote:configure:4793: checking whether the C++ compiler works
configure:4815: g++ -O2 conftest.cpp -lsocket >&5
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/7.3.0/../../../../x86_64-unknown-haiku/bin/ld: cannot find -lsocket
collect2: error: ld returned 1 exit status
User avatar
aP|Nelg
Match Winner
Posts: 621
Joined: Wed Oct 22, 2014 10:22 pm
Contact:

Re: Issues while compiling 0.4 on Haiku

Post by aP|Nelg »

So, apparently I needed to do LIBS=-lnetwork. It got through compiling, but it doesn't actually run.

I decided to put up a wiki page
http://wiki.armagetronad.org/index.php? ... evelopment
Post Reply