[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-gawk] Building gawk master fails on Mac OS X: error: conflicting ty
From: |
Hermann Peifer |
Subject: |
[bug-gawk] Building gawk master fails on Mac OS X: error: conflicting types for 'set_loc', and 'r_fatal' |
Date: |
Sun, 23 Nov 2014 11:04:45 +0100 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
Hi again,
When building on Linux, I am getting some warnings since recently,
related to conflicting types for 'set_loc' and 'r_fatal'. [1]
When building on the MacBook using /usr/bin/gcc, the warnings turn into
errors which make make fail. [2]
I got around the issue by using MacPorts gcc version 4.8.3. So there is
no real problem for me, I just wanted to let you know.
Hermann
[1] Building on Linux
address@hidden:~]> gcc --version | head -1
gcc (Debian 4.4.5-8) 4.4.5
address@hidden:gawk]> make 2>&1 | egrep "warning|note" | sort | uniq -c
23 awk.h:1257: note: previous implicit declaration of ‘r_fatal’
was here
23 awk.h:1257: note: previous implicit declaration of ‘set_loc’
was here
23 awk.h:1602: warning: conflicting types for ‘set_loc’
23 awk.h:1603: warning: conflicting types for ‘r_fatal’
[2] Building on Mac OS X
address@hidden:~]> gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr
--with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.0.0
Thread model: posix
address@hidden:gawk]> make
make 'CFLAGS=-g -O2 -DNDEBUG' 'LDFLAGS=-L/opt/local/lib' all-recursive
make[1]: Entering directory '/Users/peifer/local/src/gawk'
Making all in .
make[2]: Entering directory '/Users/peifer/local/src/gawk'
gcc -DDEFPATH='".:/Users/peifer/local/share/awk"'
-DDEFLIBPATH="\"/Users/peifer/local/lib/gawk\"" -DSHLIBEXT="\"so"\"
-DHAVE_CONFIG_H -DGAWK -DLOCALEDIR='"/Users/peifer/local/share/locale"'
-I. -I/opt/local/include -g -O2 -DNDEBUG -MT array.o -MD -MP -MF
.deps/array.Tpo -c -o array.o array.c
In file included from array.c:26:
./awk.h:1257:3: warning: implicit declaration of function 'set_loc' is
invalid in C99 [-Wimplicit-function-declaration]
fatal("%s:%d: emalloc called with zero bytes", file, line);
^
./awk.h:1249:16: note: expanded from macro 'fatal'
#define fatal set_loc(__FILE__, __LINE__), r_fatal
^
./awk.h:1257:3: warning: implicit declaration of function 'r_fatal' is
invalid in C99 [-Wimplicit-function-declaration]
./awk.h:1249:45: note: expanded from macro 'fatal'
#define fatal set_loc(__FILE__, __LINE__), r_fatal
^
./awk.h:1602:13: error: conflicting types for 'set_loc'
extern void set_loc (const char *file, int line);
^
./awk.h:1257:3: note: previous implicit declaration is here
fatal("%s:%d: emalloc called with zero bytes", file, line);
^
./awk.h:1249:16: note: expanded from macro 'fatal'
#define fatal set_loc(__FILE__, __LINE__), r_fatal
^
./awk.h:1603:13: error: conflicting types for 'r_fatal'
extern void r_fatal (const char *mesg, ...) ATTRIBUTE_PRINTF_1;
^
./awk.h:1257:3: note: previous implicit declaration is here
fatal("%s:%d: emalloc called with zero bytes", file, line);
^
./awk.h:1249:45: note: expanded from macro 'fatal'
#define fatal set_loc(__FILE__, __LINE__), r_fatal
^
2 warnings and 2 errors generated.
Makefile:691: recipe for target 'array.o' failed
make[2]: *** [array.o] Error 1
make[2]: Leaving directory '/Users/peifer/local/src/gawk'
Makefile:735: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/Users/peifer/local/src/gawk'
Makefile:554: recipe for target 'all' failed
make: *** [all] Error 2
- [bug-gawk] Building gawk master fails on Mac OS X: error: conflicting types for 'set_loc', and 'r_fatal',
Hermann Peifer <=