image
image

Go Back   macosx.com > Mac Help Forums > Unix & X11

Reply
 
Thread Tools
  #1  
Old January 9th, 2004, 05:21 AM
Registered User
 
Join Date: Sep 2003
Location: Toronto usually.
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Mikel is on a distinguished road
Missing header files

Yo, 'tsup,

I've been slowly but surely getting a hang of this UNIX (or is it more like linux, hmm). Roaming around the Internet for info, however, shows that what we've got seems to have minor variations to what others have. For example, it took me like a week to discover that I needed to download the developer kit (5hrs!) to get the "make" command.

Now the current problem: Trying to "make" the software JunkBuster gives me the error of a missing header file, malloc.h. Googling the problem comes up with mountains of pleads from people who are asking for help about missing header files.

Does anyone know how I can get this malloc.h file, and if there is a set of standard header files that people use?

Later,
Mike
Reply With Quote
  #2  
Old January 9th, 2004, 06:09 AM
Viro's Avatar
Registered User
 
Join Date: Nov 2003
Location: Oxford, UK
Posts: 2,492
Thanks: 0
Thanked 1 Time in 1 Post
Viro will become famous soon enoughViro will become famous soon enough
OS X is different from most other UNIXes because its meant to be simple for users, and that users aren't expected to compile their own software. That is why the make command is in the developer's kit. Incidently, the developer kit comes on the 4th CD of Panther, and its on my Jaguar DVD. You really didn't need to have downloaded it.

Now to answer you about the malloc.h problem. Malloc.h is not a standard header, and you can normally remove it or replace it by stdlib.h. And no, you can't just nick a malloc.h file from anywhere and stick it in the directory as it probably will cause more problems due to differences between compilers.

Good luck in compiling. Still you might not be able to compile it because UNIX software depends on a lot of other libraries that may/may not come with OS X. If that is the case, you might as well try fink (http://fink.sourceforge.net). With fink, all I needed to do to install JunkBuster was type the command

Quote:
sudo fink install JunkBuster
And it downloaded all the necessary sources, compiled and installed it
Reply With Quote
  #3  
Old January 9th, 2004, 03:59 PM
Registered User
 
Join Date: Aug 2002
Posts: 198
Thanks: 0
Thanked 0 Times in 0 Posts
DMCrimson is on a distinguished road
malloc is builtin otherwere in the headers, I can't remember which it was... there was a tip about symlinking the header in question to malloc.h...
__________________
Sawtooth G4 @ 1.4GHz, Club3d Radeon 8500LE (full 8500 when flashed), Pioneer DVR-A05
Reply With Quote
  #4  
Old January 9th, 2004, 04:07 PM
Viro's Avatar
Registered User
 
Join Date: Nov 2003
Location: Oxford, UK
Posts: 2,492
Thanks: 0
Thanked 1 Time in 1 Post
Viro will become famous soon enoughViro will become famous soon enough
malloc, free, calloc are the standard C memory management function. They're in the stdlib.h file I mentioned in my post. Which is why you can replace malloc.h with stdlib.h
Reply With Quote
  #5  
Old January 9th, 2004, 08:24 PM
Registered User
 
Join Date: Sep 2003
Location: Toronto usually.
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Mikel is on a distinguished road
Thanks for the tip. It brings up more trouble as usual - I'm like a magnet to computer bugs. At installation it couldn't set up a proper path because I had a .login file, so I deleted my .login and followed the instructions to retry; it lies by saying that things are already fine. But they aren't, so I add that .profile file as instructed.

Why it doesn't work? Because dinstall gives "missing files" errors on the update, and select mode only displays funky characters all over the screen. Further, typing the command "sudo fink install JunkBuster" as you suggested says that the fink command can't be found.

So I suppose I have a bad path setup. I guess I'm in for a lot of doc reading (after the bears).

"Serenity now!"
Reply With Quote
  #6  
Old January 9th, 2004, 11:12 PM
Registered User
 
Join Date: Sep 2003
Location: Toronto usually.
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Mikel is on a distinguished road
Thumbs up

Aha! So I need to "setenv TERM xterm-color" for dselect to be viewable. Okay, that's one down. "fink" is now found as a command - somehow it corrected itself, that's two down.

No idea of why the update tells me of unfound files. Perhaps these are unfound on the web and not my computer? I'll mess with Garbage Buster later (I figure I just have to point fink in the right direction to find it.

One Q though; must I now live without a .login file?
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -5. The time now is 08:39 PM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.