|
|
#1 |
|
Prospect
Join Date: Apr 2002
Posts: 12
|
Where is "malloc.h"?
Hi All,
I'm trying to compile Internet Junkbuster under 10.1.3 and everything compiles fine except the following: [dhcp2:/usr/local/ijb20] leigh% make cc -I. -DREGEX -DSTDC_HEADERS -DHAVE_STRING -g -c -o loaders.o loaders.c loaders.c:11: header file 'malloc.h' not found cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode make: *** [loaders.o] Error 1 I think "malloc" is a standard function so the header file must be somewhere. Where is it and how would I set some path variable so the compiler could find it? Thanks. **Leigh Last edited by leighosx; 04-02-2002 at 08:33 PM. |
|
|
|
|
|
#2 |
|
Triple-A Player
Join Date: Mar 2002
Location: Denver, CO
Posts: 63
|
/usr/include/sys
/usr/include/sys/malloc.h is the file you're looking for. As for telling the build process where to find it, that's a little trickier, since it can change from makefile to makefile. Is there a configure script for the package? If so, did you run it?
|
|
|
|
|
|
#3 |
|
Prospect
Join Date: Apr 2002
Posts: 12
|
The file is in /usr/include/sys/. There is no configure script and there is nothing in the Makefile about include paths.
Here's the Makefile with some commented-out stuff for Win, OS/2, BeOS, etc. omitted: REGEX = -DREGEX DEFAULT_CFLAGS = -I. $(REGEX) -DSTDC_HEADERS -DHAVE_STRING PROG = junkbuster O = o RM = rm -f MORE_CFLAGS = -g # use this for BSD/OS 3.0 #CC=shlicc2 CFLAGS = $(DEFAULT_CFLAGS) $(MORE_CFLAGS) OBJS = jcc.$(O) parsers.$(O) filters.$(O) loaders.$(O) bind.$(O) conn.$(O) \ encode.$(O) ssplit.$(O) socks4.$(O) acl.$(O) gnu_regex.$(O) win32.$(O) $(PROG): $(OBJS) $(CC) $(CFLAGS) -o $(PROG) $(OBJS) $(LDFLAGS) clean: $(RM) a.out core *.o *.obj clobber: clean $(RM) junkbuster junkbuster.xMAP junkbstr.exe *.pdb *.lib *.exp |
|
|
|
|
|
#4 |
|
All Star
Join Date: Jan 2002
Location: CO, USA
Posts: 908
|
Actually, you shouldn't need malloc.h at all, it's obsolete; including stdlib.h should take care of what malloc.h used to handle. Basically, just remove it, or #if it out
Code:
#if !defined(__APPLE__) #include <malloc.h> #endif |
|
|
|
|
|
#5 | |||||||||||||||||||
|
Prospect
Join Date: Apr 2002
Posts: 12
|
That worked! The include for stdlib.h was in the file ahead of malloc.h so I just commented out malloc.h and it's now up an running. Thanks a lot! **Leigh |
|||||||||||||||||||
|
|
|
|
|
#6 |
|
Major Leaguer
Join Date: Jan 2002
Location: Midwest Not quite Normal
Posts: 407
|
fink
Leigh
Junkbusters is available on fink in the unstable section. But I know its sometimes more fun to DIY. Willy |
|
|
|
|
|
#7 |
|
Prospect
Join Date: Apr 2002
Posts: 12
|
Hi Willy,
What's the URL for fink? **Leigh |
|
|
|
|
|
#8 |
|
Moderator
Join Date: Jan 2002
Location: Singapore
Posts: 4,237
|
leighosx,
fink download at: http://fink.sourceforge.net/download/index.php ----------------------------- Package junkbuster In 0.3.2a-stable: *** not present In current-stable: *** not present In current-unstable: *** Version 2.0.2-1 Description: *** The Internet Junkbuster Proxy (TM) The Internet Junkbuster Proxy (TM) blocks unwanted banner ads and protects your privacy from cookies and other threats. ------------------------------ Cheers... |
|
|
|
|
|
#9 |
|
Prospect
Join Date: Apr 2002
Posts: 12
|
Hi Willy & sao,
Thanks to you both, I've got junkbuster running! And thanks for letting me know about fink--what a great resource. This is the net at its best! **Leigh |
|
|
|
|
|
#10 |
|
Prospect
Join Date: Jan 2002
Posts: 2
|
Well, it's been over six years since the last message in this topic, but I was googling for info and ran across this near the top of the results. Just in case any other googlers come here in the future, I though I'd post what I wound up doing to fix the malloc.h issue on Mac OS X Leopard.
I was trying to compile the Word War vi game and got the same "can't find malloc.h" message. Basically, it was expecting it to be in the /usr/include directory, when it was actually in the /usr/include/malloc directory. So on any lines where it says Code:
#include <malloc.h> Code:
#include <malloc/malloc.h> More info here: http://www.celsius1414.com/node/1793 |
|
|
|
|
|
#11 |
|
Guest
Posts: n/a
|
Chaps,
Another two winters fly by and another googler stumbles upon the post. Here's my alternative malloc.h workaround to get the Cloudera Hadoop User Experience flying... sudo ln -s /usr/include/malloc/malloc.h /usr/include/malloc.h It's a bit cleaner than hacking at the .c files |
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|