Running 'make' on OSX Catalina throws errro
Brought to you by:
dhiebert
I just downloaded ctags 5.8 to my Mac running Catalina. When building it 'configure' ran without a problem, but when I ran 'make', I got the following error:
ed@macbookpro:~/dls/ctags-5.8$ make gcc -I. -I. -DHAVE_CONFIG_H -g -O2 -c args.c gcc -I. -I. -DHAVE_CONFIG_H -g -O2 -c ant.c gcc -I. -I. -DHAVE_CONFIG_H -g -O2 -c asm.c gcc -I. -I. -DHAVE_CONFIG_H -g -O2 -c asp.c gcc -I. -I. -DHAVE_CONFIG_H -g -O2 -c awk.c gcc -I. -I. -DHAVE_CONFIG_H -g -O2 -c basic.c gcc -I. -I. -DHAVE_CONFIG_H -g -O2 -c beta.c gcc -I. -I. -DHAVE_CONFIG_H -g -O2 -c c.c gcc -I. -I. -DHAVE_CONFIG_H -g -O2 -c cobol.c gcc -I. -I. -DHAVE_CONFIG_H -g -O2 -c dosbatch.c gcc -I. -I. -DHAVE_CONFIG_H -g -O2 -c eiffel.c gcc -I. -I. -DHAVE_CONFIG_H -g -O2 -c entry.c gcc -I. -I. -DHAVE_CONFIG_H -g -O2 -c erlang.c gcc -I. -I. -DHAVE_CONFIG_H -g -O2 -c flex.c gcc -I. -I. -DHAVE_CONFIG_H -g -O2 -c fortran.c gcc -I. -I. -DHAVE_CONFIG_H -g -O2 -c get.c gcc -I. -I. -DHAVE_CONFIG_H -g -O2 -c html.c gcc -I. -I. -DHAVE_CONFIG_H -g -O2 -c jscript.c gcc -I. -I. -DHAVE_CONFIG_H -g -O2 -c keyword.c gcc -I. -I. -DHAVE_CONFIG_H -g -O2 -c lisp.c gcc -I. -I. -DHAVE_CONFIG_H -g -O2 -c lregex.c lregex.c:411:29: warning: format string is not a string literal (potentially insecure) [-Wformat-security] error (WARNING | PERROR, regexfile); ^~~~~~~~~ lregex.c:411:29: note: treat the string as an argument to avoid this error (WARNING | PERROR, regexfile); ^ "%s", 1 warning generated. gcc -I. -I. -DHAVE_CONFIG_H -g -O2 -c lua.c gcc -I. -I. -DHAVE_CONFIG_H -g -O2 -c main.c In file included from main.c:62: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/dirent.h:80:2: error: use of undeclared identifier 'unused' __unused long __padding; /* (__dd_rewind space left for bincompat) */ ^ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:161:40: note: expanded from macro '__unused' #define __unused __attribute__((__unused__)) ^ ./general.h:60:37: note: expanded from macro '__unused__' # define __unused__ __attribute__((unused)) ^ 1 error generated. make: *** [main.o] Error 1
It builds fine on Ubuntu, so it seems to be an issue with the darwin code.
I have the same failure with ctags-5.8 on macOS10.15/Xcode 12.1 (12A7403). The build failure is coming from the macro being used to prevent/suppress warnings. The build completed after changing the macro. Patch attached..
Last edit: microarch73 2021-03-03
Last edit: microarch73 2021-03-03