The close() symbol in subsys.c conflicts with the libc symbol close. https://linux.die.net/man/2/close
close()
subsys.c
close
You might want to rename it to app_close or whatever prefix you want.
app_close