Re: configure/make not finding malloc.h
Re: configure/make not finding malloc.h
- Subject: Re: configure/make not finding malloc.h
- From: "Al Byers" <email@hidden>
- Date: Tue, 31 Jul 2007 20:34:50 -0600
Chris,
Hey, thanks for your help.
I tried the "-v" option, but I still can't see why it won't find malloc.h. Here is the section of config.log:
configure:2587: checking for malloc.h
configure:2597: gcc -E
conftest.c
configure:2594:20: error: malloc.h: No such file or directory
configure:2603: $? = 1
configure: failed program was:
#line 2593 "configure"
#include "confdefs.h"
#include <
malloc.h>
configure:2622: result: no
So I guess I need to know what it thinks the system include directory is, right? How do I go about that?
Thanks,
-Al
On 7/31/07,
Chris Espinosa <email@hidden> wrote:
On Jul 31, 2007, at 6:51 PM, Al Byers wrote:
I am trying to build a package with the following line:
sudo ./configure CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386"
and then I do a "make". The make response is:
make all-am
source='e00parser.c' object='e00parser.o' libtool=no \
depfile='.deps/e00parser.Po' tmpdepfile='.deps/e00parser.TPo' \
depmode=gcc3 /bin/sh ./depcomp \
gcc -DHAVE_CONFIG_H -I. -I. -I. -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -c `test -f e00parser.c || echo './'`e00parser.c
source='vector.c' object='
vector.o' libtool=no \
depfile='.deps/vector.Po' tmpdepfile='.deps/vector.TPo' \
depmode=gcc3 /bin/sh ./depcomp \
gcc -DHAVE_CONFIG_H -I. -I. -I. -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -c `test -f
vector.c || echo './'`vector.c
vector.c:22:20: error: malloc.h: No such file or directory
make[1]: *** [ vector.o] Error 1
make: *** [all] Error 2
I did a "locate malloc.h" and plenty came up:
/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/malloc.h
/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/malloc/malloc.h
/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/objc/malloc.h
/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/sys/malloc.h
/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/malloc.h
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/malloc/malloc.h
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/objc/malloc.h
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/sys/malloc.h
/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin8/4.0.0/include/mm_malloc.h
/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin8/4.0.0/install-tools/include/mm_malloc.h
/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin8/4.0.1/include/mm_malloc.h
/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin8/4.0.1/install-tools/include/mm_malloc.h
/Library/Frameworks/UnixImageIO.framework/Versions/A/Headers/jasper/jas_malloc.h
/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/malloc.h
/usr/include/malloc/malloc.h
/usr/include/objc/malloc.h
/usr/include/sys/malloc.h
/usr/lib/gcc/i686-apple-darwin8/4.0.1/include/mm_malloc.h
/usr/lib/gcc/i686-apple-darwin8/4.0.1/install-tools/include/mm_malloc.h
It has been a while since I have done this. Can someone clue me in as to why it is not finding malloc.h?
Well, I don't know what your config file is expecting, but in this line:
gcc -DHAVE_CONFIG_H -I. -I. -I. -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -c `test -f
vector.c || echo './'`vector.c
it's including the current working directory in the header search path three times. One would think that it would be wanting to -I something useful. gcc ought to be looking in /usr/include/sys by default, so finding the
malloc.h in the 10.4u SDK at that subpath, but you never know.
For debugging such things it's often useful to toss in the gcc diagnostic flag, -v, to see where it's actually looking for things.
Chris
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden