You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
replace main.c in 03-mount-9pfs with main.c in ../../sol/04-store-strings
clone lwip and newlib into ~/hack-athens-2023/libs
run make menuconfig: Select Below
Platform Configuration ---> KVM guest
Library Configuration ---> lwip
Library Configuration ---> libnewlib
Library Configuration ---> vfscore: Configuration ---> Automatically mount a root filesystem --> Default root filesystem 9PFS
edit Makefile
mkdir fs0
run make
Build Output Details:
make[1]: Entering directory '/home/unikraft/hack-athens-2023/unikraft'
MKDIR lxdialog
MAKE kconfig
CP config
WGET liblwip: https://github.com/unikraft/fork-lwip/archive/refs/heads/UNIKRAFT-2_1_x.zip
/home/unikraft/docs/content/en/community/hackatho [ <=> ] 1.43M 281KB/s in 5.2s
UNZIP liblwip: UNIKRAFT-2_1_x.zip
PATCH liblwip: 0001-timeval-for-socket-c.patch
PATCH liblwip: 0002-Don-t-provide-file-status-flags-when-we-have-a-libc.patch
PATCH liblwip: 0003-Declare-mem_-functions-only-for-lwip-internal-use.patch
PATCH liblwip: 0004-src-include-lwip-sockets.h-Add-ipi_spec_dst-field-to.patch
PATCH liblwip: 0005-patches-Add-more-fields-to-struct-ifreq.patch
PATCH liblwip: 0006-eventpoll.patch
PATCH liblwip: 0007-src-include-Make-lwip-sockets.h-compatible-with-Musl.patch
PATCH liblwip: 0008-src-include-Make-lwip-inet.h-compatible-with-Musl.patch
PATCH liblwip: 0009-src-api-Make-netdb.c-compatible-with-Musl.patch
PATCH liblwip: 0010-src-api-Make-sockets.c-compatible-with-Musl.patch
PATCH liblwip: 0011-src-include-Make-lwip-sockets.h-compatible-with-Linux-kernel.h
WGET libnewlibc: http://sourceware.org/pub/newlib/newlib-2.5.0.20170922.tar.gz
/home/unikraft/docs/content/en/community/hackatho 100%[===========================================================================================================>] 17.32M 24.9KB/s in 15m 13s
SHA256 libnewlibc: newlib-2.5.0.20170922.tar.gz
UNTAR libnewlibc: newlib-2.5.0.20170922.tar.gz
PATCH libnewlibc: 0001-set-default-READ_WRITE_RETURN_TYPE-to-ssize_t.patch
PATCH libnewlibc: 0002-Fixed-fwrite.patch
PATCH libnewlibc: 0003-sys-stat.h-provide-st-a-c-m-tim.patch
PATCH libnewlibc: 0004-Fix-setgroups-declaration.patch
PATCH libnewlibc: 0005-sys-stat.h-fix-lstat_mknod-declaration.patch
PATCH libnewlibc: 0006-Add-si_addr-field-for-siginfo_t-and-use-rtems-de.patch
PATCH libnewlibc: 0007-Add-forward-declaration-in-order-to-avoid-warnings-b.patch
PATCH libnewlibc: 0008-Apply-hackish-patch-in-order-to-include-custom-mallo.patch
PATCH libnewlibc: 0009-stdatomic.h-Fix-atomic-definitions.patch
PATCH libnewlibc: 0010-enable-per-library-allocator-statistics.patch
PATCH libnewlibc: 0011-Fix-alloc_size-warning-when-using-gcc-11.patch
PATCH libnewlibc: 0012-newlib-include-sys-Fix-MAX-and-MIN-redefinition.patch
PATCH libnewlibc: 0013-newlib-libc-Increase-FD_SETSIZE-limit.patch
PATCH libnewlibc: 0014-Fix-type-macro.patch
PATCH libnewlibc: 0015-Add-time.h.patch
PATCH libnewlibc: 0016-Add-Linux-specific-O_-flags.patch
PATCH libnewlibc: 0017-Remove-__nonnull-coliding-with-existent-macro.patch
CC libkvmplat: trace.common.o
CC libkvmplat: traps.isr.o
CC libkvmplat: cpu_native.common.o
CC libkvmplat: lcpu.x86_common.o
CC libkvmplat: tls.common.o
CC libkvmplat: bootinfo.common.o
AS libkvmplat: multiboot.x86.o
CC libkvmplat: multiboot.o
AS libkvmplat: pagetable64.o
CC libkvmplat: traps.o
AS libkvmplat: cpu_vectors_x86_64.o
CC libkvmplat: setup.o
CC libkvmplat: console.o
CC libkvmplat: lcpu.o
AS libkvmplat: lcpu_start.o
CC libkvmplat: intctrl.o
CC libkvmplat: tscclock.o
CC libkvmplat: time.o
CC libkvmplat: memory.o
CC libkvmplat: vga_console.o
CC libkvmplat: serial_console.o
CC libkvmplat: shutdown.o
CC libkvmplat: irq.o
CC libkvmplat: io.o
CC libkvmplat: lcpu.common.o
CC libkvmplat: memory.common.o
LDS libkvmplat: bootinfo.lds
LDS libkvmplat: link64.lds
LD libkvmplat.ld.o
OBJCOPY libkvmplat.o
CC libkvmpci: pci_bus.common.o
CC libkvmpci: pci_bus_x86.x86.o
LD libkvmpci.ld.o
OBJCOPY libkvmpci.o
CC libkvmvirtio: virtio_bus.o
CC libkvmvirtio: virtio_ring.o
CC libkvmvirtio: virtio_pci.o
LD libkvmvirtio.ld.o
OBJCOPY libkvmvirtio.o
CC libkvmvirtionet: virtio_net.o
LD libkvmvirtionet.ld.o
OBJCOPY libkvmvirtionet.o
CC libkvmvirtio9p: virtio_9p.o
LD libkvmvirtio9p.ld.o
OBJCOPY libkvmvirtio9p.o
CC mount9pfs: main.o
In file included from /home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/build/liblwip/origin/fork-lwip-UNIKRAFT-2_1_x/src/include/lwip/sockets.h:44,
from /home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:44,
from /home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:4:
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:83:42: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
83 | int accept(int s, struct sockaddr *addr, socklen_t *addrlen);
| ^~~~~~~~~
| locale_t
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:84:46: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
84 | int bind(int s, const struct sockaddr *name, socklen_t namelen);
| ^~~~~~~~~
| locale_t
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:86:47: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
86 | int getpeername(int s, struct sockaddr *name, socklen_t *namelen);
| ^~~~~~~~~
| locale_t
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:87:47: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
87 | int getsockname(int s, struct sockaddr *name, socklen_t *namelen);
| ^~~~~~~~~
| locale_t
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:88:61: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
88 | int getsockopt(int s, int level, int optname, void *optval, socklen_t *optlen);
| ^~~~~~~~~
| locale_t
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:90:16: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
90 | socklen_t optlen);
| ^~~~~~~~~
| locale_t
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:91:49: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
91 | int connect(int s, const struct sockaddr *name, socklen_t namelen);
| ^~~~~~~~~
| locale_t
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:95:37: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
95 | struct sockaddr *from, socklen_t *fromlen);
| ^~~~~~~~~
| locale_t
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:96:31: warning: ‘struct msghdr’ declared inside parameter list will not be visible outside of this definition or declaration
96 | ssize_t recvmsg(int s, struct msghdr *msg, int flags);
| ^~~~~~
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:98:37: warning: ‘struct msghdr’ declared inside parameter list will not be visible outside of this definition or declaration
98 | ssize_t sendmsg(int s, const struct msghdr *message, int flags);
| ^~~~~~
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:100:39: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
100 | const struct sockaddr *to, socklen_t tolen);
| ^~~~~~~~~
| locale_t
In file included from /home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/build/liblwip/origin/fork-lwip-UNIKRAFT-2_1_x/src/include/lwip/sockets.h:45,
from /home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:44,
from /home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:4:
/home/unikraft/hack-athens-2023/libs/lwip/include/netinet/in.h:31:23: error: field ‘imr_multiaddr’ has incomplete type
31 | struct in_addr imr_multiaddr;
| ^~~~~~~~~~~~~
/home/unikraft/hack-athens-2023/libs/lwip/include/netinet/in.h:32:23: error: field ‘imr_interface’ has incomplete type
32 | struct in_addr imr_interface;
| ^~~~~~~~~~~~~
/home/unikraft/hack-athens-2023/libs/lwip/include/netinet/in.h:33:23: error: field ‘imr_sourceaddr’ has incomplete type
33 | struct in_addr imr_sourceaddr;
| ^~~~~~~~~~~~~~
/home/unikraft/hack-athens-2023/libs/lwip/include/netinet/in.h:38:32: error: field ‘gsr_group’ has incomplete type
38 | struct sockaddr_storage gsr_group;
| ^~~~~~~~~
/home/unikraft/hack-athens-2023/libs/lwip/include/netinet/in.h:39:32: error: field ‘gsr_source’ has incomplete type
39 | struct sockaddr_storage gsr_source;
| ^~~~~~~~~~
In file included from /home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:44,
from /home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:4:
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/build/liblwip/origin/fork-lwip-UNIKRAFT-2_1_x/src/include/lwip/sockets.h:143:47: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
143 | int lwip_accept(int s, struct sockaddr *addr, socklen_t *addrlen);
| ^~~~~~~~~
| locale_t
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/build/liblwip/origin/fork-lwip-UNIKRAFT-2_1_x/src/include/lwip/sockets.h:144:51: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
144 | int lwip_bind(int s, const struct sockaddr *name, socklen_t namelen);
| ^~~~~~~~~
| locale_t
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/build/liblwip/origin/fork-lwip-UNIKRAFT-2_1_x/src/include/lwip/sockets.h:146:53: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
146 | int lwip_getpeername (int s, struct sockaddr *name, socklen_t *namelen);
| ^~~~~~~~~
| locale_t
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/build/liblwip/origin/fork-lwip-UNIKRAFT-2_1_x/src/include/lwip/sockets.h:147:53: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
147 | int lwip_getsockname (int s, struct sockaddr *name, socklen_t *namelen);
| ^~~~~~~~~
| locale_t
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/build/liblwip/origin/fork-lwip-UNIKRAFT-2_1_x/src/include/lwip/sockets.h:148:67: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
148 | int lwip_getsockopt (int s, int level, int optname, void *optval, socklen_t *optlen);
| ^~~~~~~~~
| locale_t
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/build/liblwip/origin/fork-lwip-UNIKRAFT-2_1_x/src/include/lwip/sockets.h:149:73: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
149 | int lwip_setsockopt (int s, int level, int optname, const void *optval, socklen_t optlen);
| ^~~~~~~~~
| locale_t
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/build/liblwip/origin/fork-lwip-UNIKRAFT-2_1_x/src/include/lwip/sockets.h:151:54: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
151 | int lwip_connect(int s, const struct sockaddr *name, socklen_t namelen);
| ^~~~~~~~~
| locale_t
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/build/liblwip/origin/fork-lwip-UNIKRAFT-2_1_x/src/include/lwip/sockets.h:157:30: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
157 | struct sockaddr *from, socklen_t *fromlen);
| ^~~~~~~~~
| locale_t
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/build/liblwip/origin/fork-lwip-UNIKRAFT-2_1_x/src/include/lwip/sockets.h:158:36: warning: ‘struct msghdr’ declared inside parameter list will not be visible outside of this definition or declaration
158 | ssize_t lwip_recvmsg(int s, struct msghdr *message, int flags);
| ^~~~~~
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/build/liblwip/origin/fork-lwip-UNIKRAFT-2_1_x/src/include/lwip/sockets.h:160:42: warning: ‘struct msghdr’ declared inside parameter list will not be visible outside of this definition or declaration
160 | ssize_t lwip_sendmsg(int s, const struct msghdr *message, int flags);
| ^~~~~~
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/build/liblwip/origin/fork-lwip-UNIKRAFT-2_1_x/src/include/lwip/sockets.h:162:32: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
162 | const struct sockaddr *to, socklen_t tolen);
| ^~~~~~~~~
| locale_t
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/build/liblwip/origin/fork-lwip-UNIKRAFT-2_1_x/src/include/lwip/sockets.h:175:64: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
175 | const char *lwip_inet_ntop(int af, const void *src, char *dst, socklen_t size);
| ^~~~~~~~~
| locale_t
In file included from /home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:4:
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:83:42: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
83 | int accept(int s, struct sockaddr *addr, socklen_t *addrlen);
| ^~~~~~~~~
| locale_t
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:84:46: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
84 | int bind(int s, const struct sockaddr *name, socklen_t namelen);
| ^~~~~~~~~
| locale_t
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:86:47: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
86 | int getpeername(int s, struct sockaddr *name, socklen_t *namelen);
| ^~~~~~~~~
| locale_t
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:87:47: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
87 | int getsockname(int s, struct sockaddr *name, socklen_t *namelen);
| ^~~~~~~~~
| locale_t
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:88:61: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
88 | int getsockopt(int s, int level, int optname, void *optval, socklen_t *optlen);
| ^~~~~~~~~
| locale_t
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:90:16: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
90 | socklen_t optlen);
| ^~~~~~~~~
| locale_t
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:91:49: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
91 | int connect(int s, const struct sockaddr *name, socklen_t namelen);
| ^~~~~~~~~
| locale_t
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:95:37: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
95 | struct sockaddr *from, socklen_t *fromlen);
| ^~~~~~~~~
| locale_t
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:96:31: warning: ‘struct msghdr’ declared inside parameter list will not be visible outside of this definition or declaration
96 | ssize_t recvmsg(int s, struct msghdr *msg, int flags);
| ^~~~~~
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:96:9: error: conflicting types for ‘recvmsg’; have ‘ssize_t(int, struct msghdr *, int)’ {aka ‘long int(int, struct msghdr *, int)’}
96 | ssize_t recvmsg(int s, struct msghdr *msg, int flags);
| ^~~~~~~
In file included from /home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/build/liblwip/origin/fork-lwip-UNIKRAFT-2_1_x/src/include/lwip/sockets.h:44,
from /home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:44,
from /home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:4:
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:96:9: note: previous declaration of ‘recvmsg’ with type ‘ssize_t(int, struct msghdr *, int)’ {aka ‘long int(int, struct msghdr *, int)’}
96 | ssize_t recvmsg(int s, struct msghdr *msg, int flags);
| ^~~~~~~
In file included from /home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:4:
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:98:37: warning: ‘struct msghdr’ declared inside parameter list will not be visible outside of this definition or declaration
98 | ssize_t sendmsg(int s, const struct msghdr *message, int flags);
| ^~~~~~
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:98:9: error: conflicting types for ‘sendmsg’; have ‘ssize_t(int, const struct msghdr *, int)’ {aka ‘long int(int, const struct msghdr *, int)’}
98 | ssize_t sendmsg(int s, const struct msghdr *message, int flags);
| ^~~~~~~
In file included from /home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/build/liblwip/origin/fork-lwip-UNIKRAFT-2_1_x/src/include/lwip/sockets.h:44,
from /home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:44,
from /home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:4:
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:98:9: note: previous declaration of ‘sendmsg’ with type ‘ssize_t(int, const struct msghdr *, int)’ {aka ‘long int(int, const struct msghdr *, int)’}
98 | ssize_t sendmsg(int s, const struct msghdr *message, int flags);
| ^~~~~~~
In file included from /home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:4:
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:100:39: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
100 | const struct sockaddr *to, socklen_t tolen);
| ^~~~~~~~~
| locale_t
In file included from /home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:5:
/home/unikraft/hack-athens-2023/libs/lwip/include/arpa/inet.h:7:59: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
7 | const char *inet_ntop(int af, const void src, char dst, socklen_t size);
| ^~~~~~~~~
| locale_t
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c: In function ‘main’:
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:56:24: error: storage size of ‘serv_addr’ isn’t known
56 | struct sockaddr_in serv_addr;
| ^~~~~~~~~
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:66:24: error: ‘AF_INET’ undeclared (first use in this function)
66 | listen_fd = socket(AF_INET, SOCK_STREAM, 0);
| ^~~~~~~
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:66:24: note: each undeclared identifier is reported only once for each function it appears in
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:66:33: error: ‘SOCK_STREAM’ undeclared (first use in this function)
66 | listen_fd = socket(AF_INET, SOCK_STREAM, 0);
| ^~~~~~~~~~~
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:73:9: warning: implicit declaration of function ‘setsockopt’ [-Wimplicit-function-declaration]
73 | if (setsockopt(listen_fd, SOL_SOCKET, SO_REUSEADDR, &enable, sizeof(int)) == -1) {
| ^~~~~~~~~~
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:73:31: error: ‘SOL_SOCKET’ undeclared (first use in this function)
73 | if (setsockopt(listen_fd, SOL_SOCKET, SO_REUSEADDR, &enable, sizeof(int)) == -1) {
| ^~~~~~~~~~
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:73:43: error: ‘SO_REUSEADDR’ undeclared (first use in this function); did you mean ‘SO_REUSE’?
73 | if (setsockopt(listen_fd, SOL_SOCKET, SO_REUSEADDR, &enable, sizeof(int)) == -1) {
| ^~~~~~~~~~~~
| SO_REUSE
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:80:33: error: ‘INADDR_ANY’ undeclared (first use in this function); did you mean ‘IPADDR_ANY’?
80 | serv_addr.sin_addr.s_addr = INADDR_ANY;
| ^~~~~~~~~~
| IPADDR_ANY
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:82:15: warning: implicit declaration of function ‘bind’ [-Wimplicit-function-declaration]
82 | int err = bind(listen_fd, (struct sockaddr )&serv_addr, sizeof(serv_addr));
| ^~~~
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:88:24: error: storage size of ‘client_addr’ isn’t known
88 | struct sockaddr_in client_addr;
| ^~~~~~~~~~~
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:92:5: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
92 | socklen_t socket_len = sizeof(struct sockaddr_in);
| ^~~~~~~~~
| locale_t
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:92:35: error: invalid application of ‘sizeof’ to incomplete type ‘struct sockaddr_in’
92 | socklen_t socket_len = sizeof(struct sockaddr_in);
| ^~~~~~
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:96:15: warning: implicit declaration of function ‘accept’; did you mean ‘access’? [-Wimplicit-function-declaration]
96 | conn_fd = accept(listen_fd, (struct sockaddr)&client_addr, &socket_len);
| ^~~~~~
| access
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:88:24: warning: unused variable ‘client_addr’ [-Wunused-variable]
88 | struct sockaddr_in client_addr;
| ^~~~~~~~~~~
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:56:24: warning: unused variable ‘serv_addr’ [-Wunused-variable]
56 | struct sockaddr_in serv_addr;
| ^~~~~~~~~
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:53:14: warning: unused parameter ‘argc’ [-Wunused-parameter]
53 | int main(int argc, char argv[])
| ~~~~^~~~
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:53:26: warning: unused parameter ‘argv’ [-Wunused-parameter]
53 | int main(int argc, char argv[])
| ~~~~~~^~~~~~
make[3]: *** [/home/unikraft/hack-athens-2023/unikraft/support/build/Makefile.build:27: /home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/build/mount9pfs/main.o] Error 1
make[2]: *** [Makefile:1023: sub-make] Error 2
make[1]: *** [Makefile:32: _all] Error 2
make[1]: Leaving directory '/home/unikraft/hack-athens-2023/unikraft'
make: *** [Makefile:6: all] Error 2
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am a beginner to unikraft, I follow steps on 03-tutorial-mount-9pfs but it fail to build.
Failure information:
Virtual Machine I used:
ova provided in setup page
steps I have taken:
Platform Configuration ---> KVM guest
Library Configuration ---> lwip
Library Configuration ---> libnewlib
Library Configuration ---> vfscore: Configuration ---> Automatically mount a root filesystem --> Default root filesystem 9PFS
Build Output Details:
make[1]: Entering directory '/home/unikraft/hack-athens-2023/unikraft'
MKDIR lxdialog
MAKE kconfig
CP config
WGET liblwip: https://github.com/unikraft/fork-lwip/archive/refs/heads/UNIKRAFT-2_1_x.zip
/home/unikraft/docs/content/en/community/hackatho [ <=> ] 1.43M 281KB/s in 5.2s
UNZIP liblwip: UNIKRAFT-2_1_x.zip
PATCH liblwip: 0001-timeval-for-socket-c.patch
PATCH liblwip: 0002-Don-t-provide-file-status-flags-when-we-have-a-libc.patch
PATCH liblwip: 0003-Declare-mem_-functions-only-for-lwip-internal-use.patch
PATCH liblwip: 0004-src-include-lwip-sockets.h-Add-ipi_spec_dst-field-to.patch
PATCH liblwip: 0005-patches-Add-more-fields-to-struct-ifreq.patch
PATCH liblwip: 0006-eventpoll.patch
PATCH liblwip: 0007-src-include-Make-lwip-sockets.h-compatible-with-Musl.patch
PATCH liblwip: 0008-src-include-Make-lwip-inet.h-compatible-with-Musl.patch
PATCH liblwip: 0009-src-api-Make-netdb.c-compatible-with-Musl.patch
PATCH liblwip: 0010-src-api-Make-sockets.c-compatible-with-Musl.patch
PATCH liblwip: 0011-src-include-Make-lwip-sockets.h-compatible-with-Linux-kernel.h
WGET libnewlibc: http://sourceware.org/pub/newlib/newlib-2.5.0.20170922.tar.gz
/home/unikraft/docs/content/en/community/hackatho 100%[===========================================================================================================>] 17.32M 24.9KB/s in 15m 13s
SHA256 libnewlibc: newlib-2.5.0.20170922.tar.gz
UNTAR libnewlibc: newlib-2.5.0.20170922.tar.gz
PATCH libnewlibc: 0001-set-default-READ_WRITE_RETURN_TYPE-to-ssize_t.patch
PATCH libnewlibc: 0002-Fixed-fwrite.patch
PATCH libnewlibc: 0003-sys-stat.h-provide-st-a-c-m-tim.patch
PATCH libnewlibc: 0004-Fix-setgroups-declaration.patch
PATCH libnewlibc: 0005-sys-stat.h-fix-lstat_mknod-declaration.patch
PATCH libnewlibc: 0006-Add-si_addr-field-for-siginfo_t-and-use-rtems-de.patch
PATCH libnewlibc: 0007-Add-forward-declaration-in-order-to-avoid-warnings-b.patch
PATCH libnewlibc: 0008-Apply-hackish-patch-in-order-to-include-custom-mallo.patch
PATCH libnewlibc: 0009-stdatomic.h-Fix-atomic-definitions.patch
PATCH libnewlibc: 0010-enable-per-library-allocator-statistics.patch
PATCH libnewlibc: 0011-Fix-alloc_size-warning-when-using-gcc-11.patch
PATCH libnewlibc: 0012-newlib-include-sys-Fix-MAX-and-MIN-redefinition.patch
PATCH libnewlibc: 0013-newlib-libc-Increase-FD_SETSIZE-limit.patch
PATCH libnewlibc: 0014-Fix-type-macro.patch
PATCH libnewlibc: 0015-Add-time.h.patch
PATCH libnewlibc: 0016-Add-Linux-specific-O_-flags.patch
PATCH libnewlibc: 0017-Remove-__nonnull-coliding-with-existent-macro.patch
CC libkvmplat: trace.common.o
CC libkvmplat: traps.isr.o
CC libkvmplat: cpu_native.common.o
CC libkvmplat: lcpu.x86_common.o
CC libkvmplat: tls.common.o
CC libkvmplat: bootinfo.common.o
AS libkvmplat: multiboot.x86.o
CC libkvmplat: multiboot.o
AS libkvmplat: pagetable64.o
CC libkvmplat: traps.o
AS libkvmplat: cpu_vectors_x86_64.o
CC libkvmplat: setup.o
CC libkvmplat: console.o
CC libkvmplat: lcpu.o
AS libkvmplat: lcpu_start.o
CC libkvmplat: intctrl.o
CC libkvmplat: tscclock.o
CC libkvmplat: time.o
CC libkvmplat: memory.o
CC libkvmplat: vga_console.o
CC libkvmplat: serial_console.o
CC libkvmplat: shutdown.o
CC libkvmplat: irq.o
CC libkvmplat: io.o
CC libkvmplat: lcpu.common.o
CC libkvmplat: memory.common.o
LDS libkvmplat: bootinfo.lds
LDS libkvmplat: link64.lds
LD libkvmplat.ld.o
OBJCOPY libkvmplat.o
CC libkvmpci: pci_bus.common.o
CC libkvmpci: pci_bus_x86.x86.o
LD libkvmpci.ld.o
OBJCOPY libkvmpci.o
CC libkvmvirtio: virtio_bus.o
CC libkvmvirtio: virtio_ring.o
CC libkvmvirtio: virtio_pci.o
LD libkvmvirtio.ld.o
OBJCOPY libkvmvirtio.o
CC libkvmvirtionet: virtio_net.o
LD libkvmvirtionet.ld.o
OBJCOPY libkvmvirtionet.o
CC libkvmvirtio9p: virtio_9p.o
LD libkvmvirtio9p.ld.o
OBJCOPY libkvmvirtio9p.o
CC mount9pfs: main.o
In file included from /home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/build/liblwip/origin/fork-lwip-UNIKRAFT-2_1_x/src/include/lwip/sockets.h:44,
from /home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:44,
from /home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:4:
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:83:42: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
83 | int accept(int s, struct sockaddr *addr, socklen_t *addrlen);
| ^~~~~~~~~
| locale_t
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:84:46: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
84 | int bind(int s, const struct sockaddr *name, socklen_t namelen);
| ^~~~~~~~~
| locale_t
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:86:47: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
86 | int getpeername(int s, struct sockaddr *name, socklen_t *namelen);
| ^~~~~~~~~
| locale_t
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:87:47: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
87 | int getsockname(int s, struct sockaddr *name, socklen_t *namelen);
| ^~~~~~~~~
| locale_t
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:88:61: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
88 | int getsockopt(int s, int level, int optname, void *optval, socklen_t *optlen);
| ^~~~~~~~~
| locale_t
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:90:16: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
90 | socklen_t optlen);
| ^~~~~~~~~
| locale_t
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:91:49: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
91 | int connect(int s, const struct sockaddr *name, socklen_t namelen);
| ^~~~~~~~~
| locale_t
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:95:37: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
95 | struct sockaddr *from, socklen_t *fromlen);
| ^~~~~~~~~
| locale_t
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:96:31: warning: ‘struct msghdr’ declared inside parameter list will not be visible outside of this definition or declaration
96 | ssize_t recvmsg(int s, struct msghdr *msg, int flags);
| ^~~~~~
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:98:37: warning: ‘struct msghdr’ declared inside parameter list will not be visible outside of this definition or declaration
98 | ssize_t sendmsg(int s, const struct msghdr *message, int flags);
| ^~~~~~
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:100:39: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
100 | const struct sockaddr *to, socklen_t tolen);
| ^~~~~~~~~
| locale_t
In file included from /home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/build/liblwip/origin/fork-lwip-UNIKRAFT-2_1_x/src/include/lwip/sockets.h:45,
from /home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:44,
from /home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:4:
/home/unikraft/hack-athens-2023/libs/lwip/include/netinet/in.h:31:23: error: field ‘imr_multiaddr’ has incomplete type
31 | struct in_addr imr_multiaddr;
| ^~~~~~~~~~~~~
/home/unikraft/hack-athens-2023/libs/lwip/include/netinet/in.h:32:23: error: field ‘imr_interface’ has incomplete type
32 | struct in_addr imr_interface;
| ^~~~~~~~~~~~~
/home/unikraft/hack-athens-2023/libs/lwip/include/netinet/in.h:33:23: error: field ‘imr_sourceaddr’ has incomplete type
33 | struct in_addr imr_sourceaddr;
| ^~~~~~~~~~~~~~
/home/unikraft/hack-athens-2023/libs/lwip/include/netinet/in.h:38:32: error: field ‘gsr_group’ has incomplete type
38 | struct sockaddr_storage gsr_group;
| ^~~~~~~~~
/home/unikraft/hack-athens-2023/libs/lwip/include/netinet/in.h:39:32: error: field ‘gsr_source’ has incomplete type
39 | struct sockaddr_storage gsr_source;
| ^~~~~~~~~~
In file included from /home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:44,
from /home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:4:
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/build/liblwip/origin/fork-lwip-UNIKRAFT-2_1_x/src/include/lwip/sockets.h:143:47: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
143 | int lwip_accept(int s, struct sockaddr *addr, socklen_t *addrlen);
| ^~~~~~~~~
| locale_t
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/build/liblwip/origin/fork-lwip-UNIKRAFT-2_1_x/src/include/lwip/sockets.h:144:51: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
144 | int lwip_bind(int s, const struct sockaddr *name, socklen_t namelen);
| ^~~~~~~~~
| locale_t
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/build/liblwip/origin/fork-lwip-UNIKRAFT-2_1_x/src/include/lwip/sockets.h:146:53: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
146 | int lwip_getpeername (int s, struct sockaddr *name, socklen_t *namelen);
| ^~~~~~~~~
| locale_t
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/build/liblwip/origin/fork-lwip-UNIKRAFT-2_1_x/src/include/lwip/sockets.h:147:53: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
147 | int lwip_getsockname (int s, struct sockaddr *name, socklen_t *namelen);
| ^~~~~~~~~
| locale_t
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/build/liblwip/origin/fork-lwip-UNIKRAFT-2_1_x/src/include/lwip/sockets.h:148:67: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
148 | int lwip_getsockopt (int s, int level, int optname, void *optval, socklen_t *optlen);
| ^~~~~~~~~
| locale_t
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/build/liblwip/origin/fork-lwip-UNIKRAFT-2_1_x/src/include/lwip/sockets.h:149:73: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
149 | int lwip_setsockopt (int s, int level, int optname, const void *optval, socklen_t optlen);
| ^~~~~~~~~
| locale_t
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/build/liblwip/origin/fork-lwip-UNIKRAFT-2_1_x/src/include/lwip/sockets.h:151:54: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
151 | int lwip_connect(int s, const struct sockaddr *name, socklen_t namelen);
| ^~~~~~~~~
| locale_t
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/build/liblwip/origin/fork-lwip-UNIKRAFT-2_1_x/src/include/lwip/sockets.h:157:30: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
157 | struct sockaddr *from, socklen_t *fromlen);
| ^~~~~~~~~
| locale_t
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/build/liblwip/origin/fork-lwip-UNIKRAFT-2_1_x/src/include/lwip/sockets.h:158:36: warning: ‘struct msghdr’ declared inside parameter list will not be visible outside of this definition or declaration
158 | ssize_t lwip_recvmsg(int s, struct msghdr *message, int flags);
| ^~~~~~
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/build/liblwip/origin/fork-lwip-UNIKRAFT-2_1_x/src/include/lwip/sockets.h:160:42: warning: ‘struct msghdr’ declared inside parameter list will not be visible outside of this definition or declaration
160 | ssize_t lwip_sendmsg(int s, const struct msghdr *message, int flags);
| ^~~~~~
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/build/liblwip/origin/fork-lwip-UNIKRAFT-2_1_x/src/include/lwip/sockets.h:162:32: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
162 | const struct sockaddr *to, socklen_t tolen);
| ^~~~~~~~~
| locale_t
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/build/liblwip/origin/fork-lwip-UNIKRAFT-2_1_x/src/include/lwip/sockets.h:175:64: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
175 | const char *lwip_inet_ntop(int af, const void *src, char *dst, socklen_t size);
| ^~~~~~~~~
| locale_t
In file included from /home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:4:
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:83:42: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
83 | int accept(int s, struct sockaddr *addr, socklen_t *addrlen);
| ^~~~~~~~~
| locale_t
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:84:46: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
84 | int bind(int s, const struct sockaddr *name, socklen_t namelen);
| ^~~~~~~~~
| locale_t
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:86:47: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
86 | int getpeername(int s, struct sockaddr *name, socklen_t *namelen);
| ^~~~~~~~~
| locale_t
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:87:47: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
87 | int getsockname(int s, struct sockaddr *name, socklen_t *namelen);
| ^~~~~~~~~
| locale_t
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:88:61: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
88 | int getsockopt(int s, int level, int optname, void *optval, socklen_t *optlen);
| ^~~~~~~~~
| locale_t
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:90:16: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
90 | socklen_t optlen);
| ^~~~~~~~~
| locale_t
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:91:49: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
91 | int connect(int s, const struct sockaddr *name, socklen_t namelen);
| ^~~~~~~~~
| locale_t
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:95:37: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
95 | struct sockaddr *from, socklen_t *fromlen);
| ^~~~~~~~~
| locale_t
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:96:31: warning: ‘struct msghdr’ declared inside parameter list will not be visible outside of this definition or declaration
96 | ssize_t recvmsg(int s, struct msghdr *msg, int flags);
| ^~~~~~
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:96:9: error: conflicting types for ‘recvmsg’; have ‘ssize_t(int, struct msghdr *, int)’ {aka ‘long int(int, struct msghdr *, int)’}
96 | ssize_t recvmsg(int s, struct msghdr *msg, int flags);
| ^~~~~~~
In file included from /home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/build/liblwip/origin/fork-lwip-UNIKRAFT-2_1_x/src/include/lwip/sockets.h:44,
from /home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:44,
from /home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:4:
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:96:9: note: previous declaration of ‘recvmsg’ with type ‘ssize_t(int, struct msghdr *, int)’ {aka ‘long int(int, struct msghdr *, int)’}
96 | ssize_t recvmsg(int s, struct msghdr *msg, int flags);
| ^~~~~~~
In file included from /home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:4:
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:98:37: warning: ‘struct msghdr’ declared inside parameter list will not be visible outside of this definition or declaration
98 | ssize_t sendmsg(int s, const struct msghdr *message, int flags);
| ^~~~~~
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:98:9: error: conflicting types for ‘sendmsg’; have ‘ssize_t(int, const struct msghdr *, int)’ {aka ‘long int(int, const struct msghdr *, int)’}
98 | ssize_t sendmsg(int s, const struct msghdr *message, int flags);
| ^~~~~~~
In file included from /home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/build/liblwip/origin/fork-lwip-UNIKRAFT-2_1_x/src/include/lwip/sockets.h:44,
from /home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:44,
from /home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:4:
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:98:9: note: previous declaration of ‘sendmsg’ with type ‘ssize_t(int, const struct msghdr *, int)’ {aka ‘long int(int, const struct msghdr *, int)’}
98 | ssize_t sendmsg(int s, const struct msghdr *message, int flags);
| ^~~~~~~
In file included from /home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:4:
/home/unikraft/hack-athens-2023/libs/lwip/include/sys/socket.h:100:39: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
100 | const struct sockaddr *to, socklen_t tolen);
| ^~~~~~~~~
| locale_t
In file included from /home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:5:
/home/unikraft/hack-athens-2023/libs/lwip/include/arpa/inet.h:7:59: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
7 | const char *inet_ntop(int af, const void src, char dst, socklen_t size);
| ^~~~~~~~~
| locale_t
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c: In function ‘main’:
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:56:24: error: storage size of ‘serv_addr’ isn’t known
56 | struct sockaddr_in serv_addr;
| ^~~~~~~~~
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:66:24: error: ‘AF_INET’ undeclared (first use in this function)
66 | listen_fd = socket(AF_INET, SOCK_STREAM, 0);
| ^~~~~~~
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:66:24: note: each undeclared identifier is reported only once for each function it appears in
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:66:33: error: ‘SOCK_STREAM’ undeclared (first use in this function)
66 | listen_fd = socket(AF_INET, SOCK_STREAM, 0);
| ^~~~~~~~~~~
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:73:9: warning: implicit declaration of function ‘setsockopt’ [-Wimplicit-function-declaration]
73 | if (setsockopt(listen_fd, SOL_SOCKET, SO_REUSEADDR, &enable, sizeof(int)) == -1) {
| ^~~~~~~~~~
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:73:31: error: ‘SOL_SOCKET’ undeclared (first use in this function)
73 | if (setsockopt(listen_fd, SOL_SOCKET, SO_REUSEADDR, &enable, sizeof(int)) == -1) {
| ^~~~~~~~~~
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:73:43: error: ‘SO_REUSEADDR’ undeclared (first use in this function); did you mean ‘SO_REUSE’?
73 | if (setsockopt(listen_fd, SOL_SOCKET, SO_REUSEADDR, &enable, sizeof(int)) == -1) {
| ^~~~~~~~~~~~
| SO_REUSE
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:80:33: error: ‘INADDR_ANY’ undeclared (first use in this function); did you mean ‘IPADDR_ANY’?
80 | serv_addr.sin_addr.s_addr = INADDR_ANY;
| ^~~~~~~~~~
| IPADDR_ANY
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:82:15: warning: implicit declaration of function ‘bind’ [-Wimplicit-function-declaration]
82 | int err = bind(listen_fd, (struct sockaddr )&serv_addr, sizeof(serv_addr));
| ^~~~
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:88:24: error: storage size of ‘client_addr’ isn’t known
88 | struct sockaddr_in client_addr;
| ^~~~~~~~~~~
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:92:5: error: unknown type name ‘socklen_t’; did you mean ‘locale_t’?
92 | socklen_t socket_len = sizeof(struct sockaddr_in);
| ^~~~~~~~~
| locale_t
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:92:35: error: invalid application of ‘sizeof’ to incomplete type ‘struct sockaddr_in’
92 | socklen_t socket_len = sizeof(struct sockaddr_in);
| ^~~~~~
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:96:15: warning: implicit declaration of function ‘accept’; did you mean ‘access’? [-Wimplicit-function-declaration]
96 | conn_fd = accept(listen_fd, (struct sockaddr)&client_addr, &socket_len);
| ^~~~~~
| access
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:88:24: warning: unused variable ‘client_addr’ [-Wunused-variable]
88 | struct sockaddr_in client_addr;
| ^~~~~~~~~~~
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:56:24: warning: unused variable ‘serv_addr’ [-Wunused-variable]
56 | struct sockaddr_in serv_addr;
| ^~~~~~~~~
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:53:14: warning: unused parameter ‘argc’ [-Wunused-parameter]
53 | int main(int argc, char argv[])
| ~~~~^~~~
/home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/main.c:53:26: warning: unused parameter ‘argv’ [-Wunused-parameter]
53 | int main(int argc, char argv[])
| ~~~~~~^~~~~~
make[3]: *** [/home/unikraft/hack-athens-2023/unikraft/support/build/Makefile.build:27: /home/unikraft/docs/content/en/community/hackathons/sessions/baby-steps/work/03-mount-9pfs/build/mount9pfs/main.o] Error 1
make[2]: *** [Makefile:1023: sub-make] Error 2
make[1]: *** [Makefile:32: _all] Error 2
make[1]: Leaving directory '/home/unikraft/hack-athens-2023/unikraft'
make: *** [Makefile:6: all] Error 2
Beta Was this translation helpful? Give feedback.
All reactions