defuse / passgen

A password generator.
78 stars 25 forks source link

Fails to build on Linux Mint 17.1 #39

Open sarciszewski opened 9 years ago

sarciszewski commented 9 years ago
vbox passgen # git branch
* master
vbox passgen # make
gcc -std=c99  -pedantic -Werror -Wall -Wextra -Wwrite-strings -Winit-self -Wcast-align -Wcast-qual -Wpointer-arith -Wstrict-aliasing -Wformat=2 -Wmissing-declarations -Wmissing-include-dirs -Wno-unused-parameter -Wuninitialized -Wold-style-definition -Wstrict-prototypes -Wmissing-prototypes -c passgen.c -o passgen.o
passgen.c: In function ‘showHelp’:
passgen.c:230:84: error: ‘WORDLIST_WORD_COUNT’ undeclared (first use in this function)
     printf("  -w, --words\t\t\t\t%d random words from a list of %d\n", WORD_COUNT, WORDLIST_WORD_COUNT);
                                                                                    ^
passgen.c:230:84: note: each undeclared identifier is reported only once for each function it appears in
passgen.c: In function ‘showRandomWords’:
passgen.c:292:24: error: ‘WORDLIST_MAX_LENGTH’ undeclared (first use in this function)
     unsigned char word[WORDLIST_MAX_LENGTH];
                        ^
passgen.c:301:48: error: ‘WORDLIST_WORD_COUNT’ undeclared (first use in this function)
         random = random & getLeastCoveringMask(WORDLIST_WORD_COUNT - 1);
                                                ^
passgen.c:292:19: error: unused variable ‘word’ [-Werror=unused-variable]
     unsigned char word[WORDLIST_MAX_LENGTH];
                   ^
passgen.c: In function ‘lookup_word’:
passgen.c:347:30: error: ‘WORDLIST_MAX_LENGTH’ undeclared (first use in this function)
     for (uint32_t i = 0; i < WORDLIST_MAX_LENGTH; i++) {
                              ^
passgen.c:351:30: error: ‘WORDLIST_WORD_COUNT’ undeclared (first use in this function)
     for (uint32_t i = 0; i < WORDLIST_WORD_COUNT; i++) {
                              ^
passgen.c:354:23: error: ‘words’ undeclared (first use in this function)
             buf[j] |= words[i][j+1] & mask;
                       ^
cc1: all warnings being treated as errors
make: *** [passgen.o] Error 1
defuse commented 9 years ago

Hmm... so wordlist.h is not being generated correctly or at all. This is done with a ruby script. Does your system have ruby installed?

sarciszewski commented 9 years ago

I had to install Ruby to get that far.

defuse commented 9 years ago

Does wordlist.h exist, if so, what's in it?

defuse commented 9 years ago

(that should be libs/wordlist.h)

sarciszewski commented 9 years ago

I'll tell you tomorrow when I return to that computer with that VM. :)

defuse commented 9 years ago

Did you ever find out what was going on here?