pobrn / mktorrent

A simple command line utility to create BitTorrent metainfo files
Other
472 stars 73 forks source link

Can't make mktorrent #44

Closed pummra closed 4 years ago

pummra commented 4 years ago

Trying to make mktorrent from source but getting the following errors when I attempt:

cc -O2 -Wall -Wextra -Wpedantic   prefix.c -o prefix`
cc -O2 -Wall -Wextra -Wpedantic  -DPRIoff="\"ld\"" -DVERSION="\"1.1\"" -c ftw.c
cc -O2 -Wall -Wextra -Wpedantic  -DPRIoff="\"ld\"" -DVERSION="\"1.1\"" -c init.c
In file included from init.c:39:0:
msg.h:9:32: warning: anonymous variadic macros were introduced in C99 [-Wvariadic-macros]
 #define FATAL_IF(cond, format, ...) do { if (cond) fatal(format, __VA_ARGS__); } while(0)
                                ^
init.c: In function ‘is_dir’:
init.c:181:3: warning: initializer element is not computable at load time
   strdup(target),
   ^
init.c:183:2: warning: initializer element is not computable at load time
  };
  ^
init.c:180:2: warning: ISO C90 forbids mixed declarations and code [-Wpedantic]
  struct file_data fd = {
  ^
init.c: In function ‘process_node’:
init.c:227:3: warning: initializer element is not computable at load time
   strdup(path),
   ^
init.c:229:2: warning: initializer element is not computable at load time
  };
  ^
init.c:226:2: warning: ISO C90 forbids mixed declarations and code [-Wpedantic]
  struct file_data fd = {
  ^
init.c: In function ‘print_help’:
init.c:291:4: warning: string length ‘985’ is greater than the length ‘509’ ISO C90 compilers are required to support [-Woverlength-strings]
    "general gossip about the program to: mktorrent@rudde.org\n");
    ^
In file included from mktorrent.h:12:0,
                 from init.c:37:
init.c: In function ‘print_announce_list’:
ll.h:32:51: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
 #define LL_FOR_FROM_TO_STEP(node, from, to, step) for (struct ll_node *(node) = from; node != to; step(node))
                                                   ^
ll.h:33:28: note: in expansion of macro ‘LL_FOR_FROM_TO_STEP’
 #define LL_FOR(node, list) LL_FOR_FROM_TO_STEP(node, LL_HEAD(list), NULL, LL_STEP)
                            ^
init.c:301:2: note: in expansion of macro ‘LL_FOR’
  LL_FOR(node, list) {
  ^
ll.h:32:51: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
 #define LL_FOR_FROM_TO_STEP(node, from, to, step) for (struct ll_node *(node) = from; node != to; step(node))
                                                   ^
ll.h:33:28: note: in expansion of macro ‘LL_FOR_FROM_TO_STEP’
 #define LL_FOR(node, list) LL_FOR_FROM_TO_STEP(node, LL_HEAD(list), NULL, LL_STEP)
                            ^
init.c:301:2: note: in expansion of macro ‘LL_FOR’
  LL_FOR(node, list) {
  ^
ll.h:32:51: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
 #define LL_FOR_FROM_TO_STEP(node, from, to, step) for (struct ll_node *(node) = from; node != to; step(node))
                                                   ^
ll.h:34:33: note: in expansion of macro ‘LL_FOR_FROM_TO_STEP’
 #define LL_FOR_FROM(node, from) LL_FOR_FROM_TO_STEP(node, from, NULL, LL_STEP)
                                 ^
init.c:308:3: note: in expansion of macro ‘LL_FOR_FROM’
   LL_FOR_FROM(inner_node, LL_NEXT(LL_HEAD(inner_list))) {
   ^
init.c: In function ‘print_web_seed_list’:
ll.h:32:51: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
 #define LL_FOR_FROM_TO_STEP(node, from, to, step) for (struct ll_node *(node) = from; node != to; step(node))
                                                   ^
ll.h:34:33: note: in expansion of macro ‘LL_FOR_FROM_TO_STEP’
 #define LL_FOR_FROM(node, from) LL_FOR_FROM_TO_STEP(node, from, NULL, LL_STEP)
                                 ^
init.c:329:2: note: in expansion of macro ‘LL_FOR_FROM’
  LL_FOR_FROM(node, LL_NEXT(LL_HEAD(list))) {
  ^
GNUmakefile:64: recipe for target 'init.o' failed
make: *** [init.o] Error 1
pummra commented 4 years ago

Think it was a permissions issue on my side.