wiiu-curl throws undefined references to functions in sys/socket.h and arpa/inet.h when linked

support for the powerpc toolchain
Post Reply
Gabryx86_64
Posts: 1
Joined: Wed Jul 12, 2023 12:50 pm

wiiu-curl throws undefined references to functions in sys/socket.h and arpa/inet.h when linked

Post by Gabryx86_64 » Wed Jul 12, 2023 1:27 pm

wiiu-curl throws undefined references to functions in sys/socket.h and arpa/inet.h when linked.

These are the errors:

Code: Select all

/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /opt/devkitpro/portlibs/wiiu/lib/libcurl.a(libcurl_la-select.o): in function `Curl_wait_ms':
select.c:(.text.Curl_wait_ms+0x34): undefined reference to `poll'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /opt/devkitpro/portlibs/wiiu/lib/libcurl.a(libcurl_la-select.o): in function `Curl_poll':
select.c:(.text.Curl_poll+0x84): undefined reference to `poll'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: select.c:(.text.Curl_poll+0x104): undefined reference to `poll'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: select.c:(.text.Curl_poll+0x140): undefined reference to `poll'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /opt/devkitpro/portlibs/wiiu/lib/libcurl.a(libcurl_la-select.o): in function `Curl_socket_check':
select.c:(.text.Curl_socket_check+0x1fc): undefined reference to `poll'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /opt/devkitpro/portlibs/wiiu/lib/libcurl.a(libcurl_la-urlapi.o): in function `hostname_check':
urlapi.c:(.text.hostname_check+0x194): undefined reference to `inet_pton'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: urlapi.c:(.text.hostname_check+0x1cc): undefined reference to `inet_ntop'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /opt/devkitpro/portlibs/wiiu/lib/libcurl.a(libcurl_la-connect.o): in function `Curl_addr2string':
connect.c:(.text.Curl_addr2string+0x78): undefined reference to `inet_ntop'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: connect.c:(.text.Curl_addr2string+0x90): undefined reference to `ntohs'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /opt/devkitpro/portlibs/wiiu/lib/libcurl.a(libcurl_la-ftp.o): in function `ftp_state_use_port':
ftp.c:(.text.ftp_state_use_port+0x178): undefined reference to `getsockname'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: ftp.c:(.text.ftp_state_use_port+0x194): undefined reference to `inet_ntop'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: ftp.c:(.text.ftp_state_use_port+0x24c): undefined reference to `bind'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: ftp.c:(.text.ftp_state_use_port+0x2a4): undefined reference to `htons'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: ftp.c:(.text.ftp_state_use_port+0x2b8): undefined reference to `bind'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: ftp.c:(.text.ftp_state_use_port+0x2e4): undefined reference to `getsockname'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: ftp.c:(.text.ftp_state_use_port+0x2f8): undefined reference to `listen'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: ftp.c:(.text.ftp_state_use_port+0x470): undefined reference to `getsockname'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: ftp.c:(.text.ftp_state_use_port+0x4e4): undefined reference to `ntohs'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: ftp.c:(.text.ftp_state_use_port+0x50c): undefined reference to `ntohs'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /opt/devkitpro/portlibs/wiiu/lib/libcurl.a(libcurl_la-ftp.o): in function `AcceptServerConnect':
ftp.c:(.text.AcceptServerConnect+0x44): undefined reference to `getsockname'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: ftp.c:(.text.AcceptServerConnect+0x120): undefined reference to `accept'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /opt/devkitpro/portlibs/wiiu/lib/libcurl.a(libcurl_la-hostip.o): in function `Curl_printable_address':
hostip.c:(.text.Curl_printable_address+0x28): undefined reference to `inet_ntop'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /opt/devkitpro/portlibs/wiiu/lib/libcurl.a(libcurl_la-hostip.o): in function `Curl_host_is_ipnum':
hostip.c:(.text.Curl_host_is_ipnum+0x18): undefined reference to `inet_pton'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /opt/devkitpro/portlibs/wiiu/lib/libcurl.a(libcurl_la-hostip.o): in function `Curl_resolv':
hostip.c:(.text.Curl_resolv+0x180): undefined reference to `inet_pton'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: hostip.c:(.text.Curl_resolv+0x320): undefined reference to `htons'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: hostip.c:(.text.Curl_resolv+0x33c): undefined reference to `inet_pton'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /opt/devkitpro/portlibs/wiiu/lib/libcurl.a(libcurl_la-noproxy.o): in function `Curl_check_noproxy':
noproxy.c:(.text.Curl_check_noproxy+0xa4): undefined reference to `inet_pton'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: noproxy.c:(.text.Curl_check_noproxy+0x33c): undefined reference to `inet_pton'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: noproxy.c:(.text.Curl_check_noproxy+0x354): undefined reference to `inet_pton'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: noproxy.c:(.text.Curl_check_noproxy+0x36c): undefined reference to `htonl'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: noproxy.c:(.text.Curl_check_noproxy+0x37c): undefined reference to `htonl'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /opt/devkitpro/portlibs/wiiu/lib/libcurl.a(libcurl_la-smb.o): in function `smb_format_message.isra.0':
smb.c:(.text.smb_format_message.isra.0+0x4c): undefined reference to `htons'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /opt/devkitpro/portlibs/wiiu/lib/libcurl.a(libcurl_la-socks.o): in function `do_SOCKS5':
socks.c:(.text.do_SOCKS5+0x6cc): undefined reference to `inet_pton'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /opt/devkitpro/portlibs/wiiu/lib/libcurl.a(libcurl_la-telnet.o): in function `send_negotiation':
telnet.c:(.text.send_negotiation+0x48): undefined reference to `send'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /opt/devkitpro/portlibs/wiiu/lib/libcurl.a(libcurl_la-telnet.o): in function `sendsuboption':
telnet.c:(.text.sendsuboption+0x68): undefined reference to `htons'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: telnet.c:(.text.sendsuboption+0x74): undefined reference to `htons'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: telnet.c:(.text.sendsuboption+0x158): undefined reference to `send'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: telnet.c:(.text.sendsuboption+0x184): undefined reference to `send'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /opt/devkitpro/portlibs/wiiu/lib/libcurl.a(libcurl_la-telnet.o): in function `suboption':
telnet.c:(.text.suboption+0xd4): undefined reference to `send'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: telnet.c:(.text.suboption+0x260): undefined reference to `send'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: telnet.c:(.text.suboption+0x30c): undefined reference to `send'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /opt/devkitpro/portlibs/wiiu/lib/libcurl.a(libcurl_la-tftp.o): in function `tftp_rx':
tftp.c:(.text.tftp_rx+0x7c): undefined reference to `sendto'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: tftp.c:(.text.tftp_rx+0x178): undefined reference to `sendto'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: tftp.c:(.text.tftp_rx+0x23c): undefined reference to `sendto'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: tftp.c:(.text.tftp_rx+0x294): undefined reference to `sendto'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /opt/devkitpro/portlibs/wiiu/lib/libcurl.a(libcurl_la-tftp.o): in function `tftp_tx':
tftp.c:(.text.tftp_tx+0x84): undefined reference to `sendto'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /opt/devkitpro/portlibs/wiiu/lib/libcurl.a(libcurl_la-tftp.o):tftp.c:(.text.tftp_tx+0x1b4): more undefined references to `sendto' follow
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /opt/devkitpro/portlibs/wiiu/lib/libcurl.a(libcurl_la-tftp.o): in function `tftp_connect':
tftp.c:(.text.tftp_connect+0x104): undefined reference to `bind'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /opt/devkitpro/portlibs/wiiu/lib/libcurl.a(libcurl_la-tftp.o): in function `tftp_send_first':
tftp.c:(.text.tftp_send_first+0x514): undefined reference to `sendto'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /opt/devkitpro/portlibs/wiiu/lib/libcurl.a(libcurl_la-tftp.o): in function `tftp_multi_statemach':
tftp.c:(.text.tftp_multi_statemach+0x144): undefined reference to `recvfrom'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /opt/devkitpro/portlibs/wiiu/lib/libcurl.a(libcurl_la-cf-socket.o): in function `socket_open':
cf-socket.c:(.text.socket_open+0x98): undefined reference to `socket'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /opt/devkitpro/portlibs/wiiu/lib/libcurl.a(libcurl_la-cf-socket.o): in function `conn_set_primary_ip':
cf-socket.c:(.text.conn_set_primary_ip+0x48): undefined reference to `getpeername'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /opt/devkitpro/portlibs/wiiu/lib/libcurl.a(libcurl_la-cf-socket.o): in function `cf_socket_recv':
cf-socket.c:(.text.cf_socket_recv+0x68): undefined reference to `recv'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /opt/devkitpro/portlibs/wiiu/lib/libcurl.a(libcurl_la-cf-socket.o): in function `cf_socket_send':
cf-socket.c:(.text.cf_socket_send+0x64): undefined reference to `send'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /opt/devkitpro/portlibs/wiiu/lib/libcurl.a(libcurl_la-cf-socket.o): in function `tcpnodelay':
cf-socket.c:(.text.tcpnodelay+0x30): undefined reference to `setsockopt'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /opt/devkitpro/portlibs/wiiu/lib/libcurl.a(libcurl_la-cf-socket.o): in function `verifyconnect':
cf-socket.c:(.text.verifyconnect+0x34): undefined reference to `getsockopt'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /opt/devkitpro/portlibs/wiiu/lib/libcurl.a(libcurl_la-cf-socket.o): in function `bindlocal.constprop.0':
cf-socket.c:(.text.bindlocal.constprop.0+0x8c): undefined reference to `htons'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: cf-socket.c:(.text.bindlocal.constprop.0+0xb4): undefined reference to `bind'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: cf-socket.c:(.text.bindlocal.constprop.0+0x104): undefined reference to `ntohs'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: cf-socket.c:(.text.bindlocal.constprop.0+0x118): undefined reference to `bind'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: cf-socket.c:(.text.bindlocal.constprop.0+0x168): undefined reference to `getsockname'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: cf-socket.c:(.text.bindlocal.constprop.0+0x470): undefined reference to `inet_pton'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: cf-socket.c:(.text.bindlocal.constprop.0+0x488): undefined reference to `htons'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /opt/devkitpro/portlibs/wiiu/lib/libcurl.a(libcurl_la-cf-socket.o): in function `set_accepted_remote_ip.isra.0':
cf-socket.c:(.text.set_accepted_remote_ip.isra.0+0x50): undefined reference to `getpeername'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /opt/devkitpro/portlibs/wiiu/lib/libcurl.a(libcurl_la-cf-socket.o): in function `set_local_ip.isra.0':
cf-socket.c:(.text.set_local_ip.isra.0+0x44): undefined reference to `getsockname'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /opt/devkitpro/portlibs/wiiu/lib/libcurl.a(libcurl_la-cf-socket.o): in function `cf_socket_open':
cf-socket.c:(.text.cf_socket_open+0x2ec): undefined reference to `setsockopt'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /opt/devkitpro/portlibs/wiiu/lib/libcurl.a(libcurl_la-cf-socket.o): in function `cf_udp_connect':
cf-socket.c:(.text.cf_udp_connect+0x130): undefined reference to `connect'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /opt/devkitpro/portlibs/wiiu/lib/libcurl.a(libcurl_la-cf-socket.o): in function `cf_tcp_connect':
cf-socket.c:(.text.cf_tcp_connect+0x20c): undefined reference to `connect'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /opt/devkitpro/portlibs/wiiu/lib/libcurl.a(libcurl_la-curl_addrinfo.o): in function `Curl_getaddrinfo_ex':
curl_addrinfo.c:(.text.Curl_getaddrinfo_ex+0x20): undefined reference to `getaddrinfo'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: curl_addrinfo.c:(.text.Curl_getaddrinfo_ex+0x160): undefined reference to `freeaddrinfo'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: curl_addrinfo.c:(.text.Curl_getaddrinfo_ex+0x1dc): undefined reference to `freeaddrinfo'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /opt/devkitpro/portlibs/wiiu/lib/libcurl.a(libcurl_la-curl_addrinfo.o): in function `Curl_he2ai':
curl_addrinfo.c:(.text.Curl_he2ai+0x14c): undefined reference to `htons'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /opt/devkitpro/portlibs/wiiu/lib/libcurl.a(libcurl_la-curl_addrinfo.o): in function `Curl_str2addr':
curl_addrinfo.c:(.text.Curl_str2addr+0x28): undefined reference to `inet_pton'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /opt/devkitpro/portlibs/wiiu/lib/libcurl.a(libcurl_la-curl_gethostname.o): in function `Curl_gethostname':
curl_gethostname.c:(.text.Curl_gethostname+0x30): undefined reference to `gethostname'
/opt/devkitpro/devkitPPC/bin/../lib/gcc/powerpc-eabi/13.1.0/../../../../powerpc-eabi/bin/ld: /opt/devkitpro/portlibs/wiiu/lib/libcurl.a(libcurl_la-doh.o): in function `Curl_doh_is_resolved':
doh.c:(.text.Curl_doh_is_resolved+0x420): undefined reference to `htons'
collect2: error: ld returned 1 exit status
make[1]: *** [/opt/devkitpro/wut/share/wut_rules:78: /home/gabry/Programming/c-c++/waragain/waragain.elf] Error 1
make: *** [Makefile:108: build] Error 2

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest