no previous prototype for 'snsecprintf'


(Edmund John Pfeil) #1

test161.c is causing this error at line 91, not sure how to resolve this


(Yousuf Zubairi) #2

Can you post more detailed output?


(Edmund John Pfeil) #3

…/…/…/common/libtest161/test161.c:91:1: error: no previous prototype for ‘snsecprintf’ [-Werror=missing-prototypes]
snsecprintf(size_t len, char *buffer, const char *secret, const char *msg, const char *name)
^
cc1: all warnings being treated as errors
*** Error code 1


(James Droste) #5

Don’t do that.


Anyway, to resolve the issue please follow the comments located in this thread. As a tl;dr, you’ll have to re-configure and compile your kernel.


(Edmund John Pfeil) #6

tried this using bmake depend, bmake clean, bmake, bmake install from basically every possible directory I could, no luck.


(Geoffrey Challen) #7

Make sure you include the re-configure step, which it doesn’t seem that you did.


(Edmund John Pfeil) #8

./config ASST2 from kern/conf or is there something else I’m missing?


(Geoffrey Challen) #9

That should be right. This also might be something that came in during our last merge (@shaseley: can you confirm) so you may want to double-check that you did that correctly.


(Scott Haseley) #10

@gwa Yes, this could be the result of a broken merge; the snsecprintf change was a result of the ASST2.1 upstream changes.

@edmundpf Did you read this post? Attempting to build the userland binaries from the wrong directory can cause this issue.

Also, you didn’t say exactly what you were trying to build in your original post (userspace or kernel). You can try to sanitize things and rebuild everything:

Kernel:

  1. Completely remove the kernel compile directory (rm -rf kern/compile/ASST2)
  2. Configure, compile, install

Userspace:

From the top of your source tree, run:

bmake clean
bmake
bmake install

If this doesn’t work, I suspect you may have broke the merge, and I would suggest coming to office hours.