Error running the makefile
T-001v2r3 opened this issue · 1 comments
T-001v2r3 commented
I come across this error when adding lib-newlib to the helloworld.
CC libsyscall_shim: uk_prsyscall.o
/home/galves46/Desktop/HackathonUnikraftPorto2023/git/scripts/workdir/unikraft/lib/syscall_shim/uk_prsyscall.c: In function ‘param_okflag’:
/home/galves46/Desktop/HackathonUnikraftPorto2023/git/scripts/workdir/unikraft/lib/syscall_shim/uk_prsyscall.c:431:38: error: ‘R_OK’ undeclared (first use in this function)
431 | PR_FLAG(sb, fmtf, orig_seek, R_, OK, okflags);
| ^~
/home/galves46/Desktop/HackathonUnikraftPorto2023/git/scripts/workdir/unikraft/lib/syscall_shim/uk_prsyscall.c:50:32: note: in definition of macro ‘PR_FLAG’
50 | if ((flags) & (prefix##flagname)) { \
| ^~~~~~
/home/galves46/Desktop/HackathonUnikraftPorto2023/git/scripts/workdir/unikraft/lib/syscall_shim/uk_prsyscall.c:431:38: note: each undeclared identifier is reported only once for each function it appears in
431 | PR_FLAG(sb, fmtf, orig_seek, R_, OK, okflags);
| ^~
/home/galves46/Desktop/HackathonUnikraftPorto2023/git/scripts/workdir/unikraft/lib/syscall_shim/uk_prsyscall.c:50:32: note: in definition of macro ‘PR_FLAG’
50 | if ((flags) & (prefix##flagname)) { \
| ^~~~~~
/home/galves46/Desktop/HackathonUnikraftPorto2023/git/scripts/workdir/unikraft/lib/syscall_shim/uk_prsyscall.c:432:38: error: ‘W_OK’ undeclared (first use in this function)
432 | PR_FLAG(sb, fmtf, orig_seek, W_, OK, okflags);
| ^~
/home/galves46/Desktop/HackathonUnikraftPorto2023/git/scripts/workdir/unikraft/lib/syscall_shim/uk_prsyscall.c:50:32: note: in definition of macro ‘PR_FLAG’
50 | if ((flags) & (prefix##flagname)) { \
| ^~~~~~
/home/galves46/Desktop/HackathonUnikraftPorto2023/git/scripts/workdir/unikraft/lib/syscall_shim/uk_prsyscall.c:433:38: error: ‘X_OK’ undeclared (first use in this function)
433 | PR_FLAG(sb, fmtf, orig_seek, X_, OK, okflags);
| ^~
/home/galves46/Desktop/HackathonUnikraftPorto2023/git/scripts/workdir/unikraft/lib/syscall_shim/uk_prsyscall.c:50:32: note: in definition of macro ‘PR_FLAG’
50 | if ((flags) & (prefix##flagname)) { \
| ^~~~~~
make[3]: *** [/home/galves46/Desktop/HackathonUnikraftPorto2023/git/scripts/workdir/unikraft/support/build/Makefile.build:27: /home/galves46/Desktop/HackathonUnikraftPorto2023/git/scripts/workdir/apps/app-helloworld/build/libsyscall_shim/uk_prsyscall.o] Error 1
make[2]: *** [Makefile:1032: sub-make] Error 2
make[1]: *** [Makefile:32: _all] Error 2
galves46 commented
Adding:
#define F_OK 0
#define R_OK 4
#define W_OK 2
#define X_OK 1
to uk_prsyscall.c
and commenting:
LIBNEWLIBC_SRCS-y += $(LIBNEWLIB_LIBC)/stdlib/exit.c
on Makefile.uk
Apperently solved the issue. Thanks to Stefan for the help!