[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CPPFLAGS vs project include arguments in lib/glob
From: |
Poor Yorick |
Subject: |
CPPFLAGS vs project include arguments in lib/glob |
Date: |
Sun, 30 Aug 2015 07:41:50 -0600 |
User-agent: |
Roundcube Webmail/1.1.2 |
Hi,
Building bash-4.3, I got an odd error:
In file included from ../../shell.h:22,
from glob.c:53:
../../config.h:266:1: warning: "HAVE_ALLOCA" redefined
In file included from glob.c:49:
../../include/memalloc.h:30:1: warning: this is the location of the
previous definition
glob.c: In function 'glob_vector':
glob.c:572: error: 'DIR' undeclared (first use in this function)
glob.c:572: error: (Each undeclared identifier is reported only once
glob.c:572: error: for each function it appears in.)
glob.c:572: error: 'd' undeclared (first use in this function)
glob.c:738: error: dereferencing pointer to incomplete type
glob.c:742: error: dereferencing pointer to incomplete type
glob.c:751: error: dereferencing pointer to incomplete type
glob.c:805: error: dereferencing pointer to incomplete type
glob.c:805: error: dereferencing pointer to incomplete type
glob.c:820: error: dereferencing pointer to incomplete type
glob.c:831: error: dereferencing pointer to incomplete type
glob.c:831: error: dereferencing pointer to incomplete type
Makefile:61: recipe for target 'glob.o' failed
It looked like a stray config.h from somewhere else might be getting
picked up.
Sure enough, making sure the project includes took precedence over any
includes
in CPPFLAGS solved the problem:
--- bash-4.3/lib/glob/Makefile.in 2010-08-10 20:59:51.000000000
-0400
+++ bash-4.3.new/lib/glob/Makefile.in 2015-08-30 01:15:42.000153000
-0400
@@ -52,7 +52,7 @@
INCLUDES = -I. -I../.. -I$(topdir) -I$(BASHINCDIR) -I$(topdir)/lib
-CCFLAGS = $(PROFILE_FLAGS) $(DEFS) $(LOCAL_DEFS) $(CPPFLAGS)
${INCLUDES} \
+CCFLAGS = $(PROFILE_FLAGS) $(DEFS) $(LOCAL_DEFS) $(INCLUDES)
$(CPPFLAGS) \
$(LOCAL_CFLAGS) $(CFLAGS)
# Here is a rule for making .o files from .c files that doesn't force
--
Poor Yorick
- CPPFLAGS vs project include arguments in lib/glob,
Poor Yorick <=