Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error running the makefile #31

Open
T-001v2r3 opened this issue May 10, 2023 · 1 comment
Open

Error running the makefile #31

T-001v2r3 opened this issue May 10, 2023 · 1 comment

Comments

@T-001v2r3
Copy link

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

@T-001v2r3
Copy link
Author

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant