So..... you don't know what you are doing.
Neeraj Pal <neerajpa...@gmail.com> wrote: > okay. Sure, > > Instead of sys_hello.c I created a new one sys_test.c. So, guys don't > confuse with above sys_hello.c and this time sys_test.c, both are the > same file. > > Then after that, I went through all the steps including "make config" > > make obj && make config && make -j4 > > Then it throws this error this time. And, I am not able to understand this. > > > In file included from /usr/src/sys/kern/sys_test.c:4: > /usr/src/sys/sys/syscallargs.h:153:13: error: unknown type name > 'socklen_t'; did you mean '__socklen_t'? > syscallarg(socklen_t *) fromlenaddr; > ^~~~~~~~~ > __socklen_t > /usr/src/sys/sys/syscallargs.h:17:12: note: expanded from macro 'syscallarg' > struct { x datum; } le; \ > ^ > /usr/src/sys/sys/_types.h:61:20: note: '__socklen_t' declared here > typedef __uint32_t __socklen_t; /* length type for network syscalls */ > ^ > In file included from /usr/src/sys/kern/sys_test.c:4: > /usr/src/sys/sys/syscallargs.h:153:2: error: expected expression > syscallarg(socklen_t *) fromlenaddr; > ^ > /usr/src/sys/sys/syscallargs.h:19:48: note: expanded from macro 'syscallarg' > int8_t pad[ (sizeof (register_t) < sizeof (x)) \ > ^ > /usr/src/sys/sys/syscallargs.h:153:13: error: use of undeclared > identifier 'socklen_t' > syscallarg(socklen_t *) fromlenaddr; > ^ > /usr/src/sys/sys/syscallargs.h:153:2: error: expected expression > syscallarg(socklen_t *) fromlenaddr; > ^ > /usr/src/sys/sys/syscallargs.h:21:38: note: expanded from macro 'syscallarg' > : sizeof (register_t) - sizeof (x)]; \ > ^ > /usr/src/sys/sys/syscallargs.h:153:13: error: use of undeclared > identifier 'socklen_t' > syscallarg(socklen_t *) fromlenaddr; > ^ > /usr/src/sys/sys/syscallargs.h:153:13: error: unknown type name > 'socklen_t'; did you mean '__socklen_t'? > syscallarg(socklen_t *) fromlenaddr; > ^~~~~~~~~ > __socklen_t > /usr/src/sys/sys/syscallargs.h:22:4: note: expanded from macro 'syscallarg' > x datum; \ > ^ > /usr/src/sys/sys/_types.h:61:20: note: '__socklen_t' declared here > typedef __uint32_t __socklen_t; /* length type for network syscalls */ > ^ > In file included from /usr/src/sys/kern/sys_test.c:4: > /usr/src/sys/sys/syscallargs.h:159:13: error: unknown type name > 'socklen_t'; did you mean '__socklen_t'? > syscallarg(socklen_t *) anamelen; > ^~~~~~~~~ > __socklen_t > /usr/src/sys/sys/syscallargs.h:17:12: note: expanded from macro 'syscallarg' > struct { x datum; } le; \ > ^ > /usr/src/sys/sys/_types.h:61:20: note: '__socklen_t' declared here > typedef __uint32_t __socklen_t; /* length type for network syscalls */ > ^ > In file included from /usr/src/sys/kern/sys_test.c:4: > /usr/src/sys/sys/syscallargs.h:159:2: error: expected expression > syscallarg(socklen_t *) anamelen; > ^ > /usr/src/sys/sys/syscallargs.h:19:48: note: expanded from macro 'syscallarg' > int8_t pad[ (sizeof (register_t) < sizeof (x)) \ > ^ > /usr/src/sys/sys/syscallargs.h:159:13: error: use of undeclared > identifier 'socklen_t' > syscallarg(socklen_t *) anamelen; > ^ > /usr/src/sys/sys/syscallargs.h:159:2: error: expected expression > syscallarg(socklen_t *) anamelen; > ^ > /usr/src/sys/sys/syscallargs.h:21:38: note: expanded from macro 'syscallarg' > : sizeof (register_t) - sizeof (x)]; \ > ^ > /usr/src/sys/sys/syscallargs.h:159:13: error: use of undeclared > identifier 'socklen_t' > syscallarg(socklen_t *) anamelen; > ^ > /usr/src/sys/sys/syscallargs.h:159:13: error: unknown type name > 'socklen_t'; did you mean '__socklen_t'? > syscallarg(socklen_t *) anamelen; > ^~~~~~~~~ > __socklen_t > /usr/src/sys/sys/syscallargs.h:22:4: note: expanded from macro 'syscallarg' > x datum; \ > ^ > /usr/src/sys/sys/_types.h:61:20: note: '__socklen_t' declared here > typedef __uint32_t __socklen_t; /* length type for network syscalls */ > ^ > In file included from /usr/src/sys/kern/sys_test.c:4: > /usr/src/sys/sys/syscallargs.h:165:13: error: unknown type name > 'socklen_t'; did you mean '__socklen_t'? > syscallarg(socklen_t *) alen; > ^~~~~~~~~ > __socklen_t > /usr/src/sys/sys/syscallargs.h:17:12: note: expanded from macro 'syscallarg' > struct { x datum; } le; \ > ^ > /usr/src/sys/sys/_types.h:61:20: note: '__socklen_t' declared here > typedef __uint32_t __socklen_t; /* length type for network syscalls */ > ^ > In file included from /usr/src/sys/kern/sys_test.c:4: > /usr/src/sys/sys/syscallargs.h:165:2: error: expected expression > syscallarg(socklen_t *) alen; > ^ > /usr/src/sys/sys/syscallargs.h:19:48: note: expanded from macro 'syscallarg' > int8_t pad[ (sizeof (register_t) < sizeof (x)) \ > ^ > /usr/src/sys/sys/syscallargs.h:165:13: error: use of undeclared > identifier 'socklen_t' > syscallarg(socklen_t *) alen; > ^ > /usr/src/sys/sys/syscallargs.h:165:2: error: expected expression > syscallarg(socklen_t *) alen; > ^ > /usr/src/sys/sys/syscallargs.h:21:38: note: expanded from macro 'syscallarg' > : sizeof (register_t) - sizeof (x)]; \ > ^ > /usr/src/sys/sys/syscallargs.h:165:13: error: use of undeclared > identifier 'socklen_t' > syscallarg(socklen_t *) alen; > ^ > /usr/src/sys/sys/syscallargs.h:165:13: error: unknown type name > 'socklen_t'; did you mean '__socklen_t'? > syscallarg(socklen_t *) alen; > ^~~~~~~~~ > __socklen_t > /usr/src/sys/sys/syscallargs.h:22:4: note: expanded from macro 'syscallarg' > x datum; \ > ^ > /usr/src/sys/sys/_types.h:61:20: note: '__socklen_t' declared here > typedef __uint32_t __socklen_t; /* length type for network syscalls */ > ^ > In file included from /usr/src/sys/kern/sys_test.c:4: > /usr/src/sys/sys/syscallargs.h:171:13: error: unknown type name > 'socklen_t'; did you mean '__socklen_t'? > syscallarg(socklen_t *) alen; > ^~~~~~~~~ > __socklen_t > /usr/src/sys/sys/syscallargs.h:17:12: note: expanded from macro 'syscallarg' > struct { x datum; } le; \ > ^ > /usr/src/sys/sys/_types.h:61:20: note: '__socklen_t' declared here > typedef __uint32_t __socklen_t; /* length type for network syscalls */ > ^ > fatal error: too many errors emitted, stopping now [-ferror-limit=] > 20 errors generated. > *** Error 1 in /usr/src/sys/arch/amd64/compile/CUSTOM.MP > (Makefile:1018 'sys_test.o') > > > > > > > > > > On Tue, Apr 24, 2018 at 12:18 AM, Ted Unangst <t...@tedunangst.com> wrote: > > Neeraj Pal wrote: > >> 4) echo "file kern/sys_hello.c" >> /usr/src/sys/conf/files > >> > >> 5) cd /usr/src/sys/arch/amd64/compile/CUSTOM.MP/ > >> > >> 6) make obj && make -j4 > >> > >> And, then, It throws an error given below, > >> > >> " > >> ld -T ld.script -X --warn-common -nopie -o bsd ${SYSTEM_HEAD} vers.o > >> ${OBJS} > >> > >> init_sysent.o:(.data+0x14b8): undefined reference to `sys_hello' > > > > this looks like the object wasn't added. you skipped make config. >