[sheepdog-users] Compile error whit --enable-trace: /usr/include/bfd.h:37:2: error: #error config.h must be included before this header

Marcin Mirosław marcin at mejor.pl
Sat Feb 22 21:21:43 CET 2014


Hi!
When I compiling sheepdog with --enable-debug then --enable-trace turns
on automagically. With --enable-trace sheepdog compilation stops with error:
$ gcc -DHAVE_CONFIG_H -I. -I../include  -I../include -I../include
-DENABLE_TRACE   -g -O2 -O0 -ggdb3   -pg   -Wall -Wshadow
-Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes
-Wpointer-arith -Wwrite-strings -Wbad-function-cast
-Wmissing-format-attribute -Wformat=2 -Wformat-security
-Wformat-nonliteral -Wno-long-long -Wno-strict-aliasing -Wcast-align
   -D_GNU_SOURCE -D_LGPL_SOURCE -std=gnu99 -MT trace.o -MD -MP -MF
.deps/trace.Tpo -c -o trace.o `test -f 'trace/trace.c' || echo
'./'`trace/trace.c
In file included from trace/trace.c:14:0:
/usr/include/bfd.h:37:2: error: #error config.h must be included before
this header
make[1]: *** [trace.o] Error 1
make[1]: Leaving directory `/tmp/sheepdog/sheepdog-orig/sheep'
make: *** [all-recursive] Error 1

I have binutils-2.23.2. Relevant fragment of /usr/include/bfd.h is:
/* PR 14072: Ensure that config.h is included first.  */
#if !defined PACKAGE && !defined PACKAGE_VERSION
#error config.h must be included before this header
#endif

How fix this issue?
Marcin



More information about the sheepdog-users mailing list