Chuck Robey chuckr at
Thu Mar 31 11:06:18 PST 2005

Aaron Siegel wrote:
> On Wednesday 30 March 2005 19:23, you wrote:
>>>I have copied magic.h from the source tree to  /usr/include. Is this a
>>>common error?
>>I haven't looked at this port, and I won't (I have other projects
>>pushing me at the moment), but everything in FreeBSD, in /usr/include,
>>is stuff that derives from the FreeBSD system only, and you should not
>>touch it.  Same goes for everything you can find in the man page
>>hier(7), and you should give that some study.  The default location for
>>software in FreeBSD (not the noly location, but one you should use until
>>you know enough to need alternatives) is everything under /usr/local/.
> The file magic.h is the header file to libmagic a libary that is part of the 
> system, magic(3). The header is  located in /usr/src/contrib/file/magic.h. 
> The only reason for doing I did this crazy stunt is I followed a thread on 
> one of the list recommended that I copy the magic.h to /usr/include. I do not 
> know if this is correct or not?  Andy Fawcett  found an error in the 
> configure script which solved the problem, see thread for more details.
> I understand I have a lot to learn.

OK, it's not a joke, that what you said is the first step towards 
knowing, and the person who wrote that advice to you on the mailing list 
you refer to, they could have used the advice.  I wish I could give you 
better advice on knowing the good from the bad, but making mistakes is 
the only way I know of to learn.

Anyhow, rule 1: anyone on FreeBSD who urges you to change the 
/usr/include, or /usr/lib. or /usr/share stuff is not your friend.  Know 
that there are possible exceptions: Linuxer's apparently have far less 
respect for the system directories than FreeBSDers have, so that advice 
would be less bad on one of those hosts.  On FreeBSD, there is a very 
healthy respect maintained between system software, and user-installed 
software, which is usually stuck in /usr/local/*.  After you get to know 
your way around, you might modify that, but it's rare even then.  Some 
folks like /opt instead of /usr/local, but there is *always* respect (in 
FreeBSD) for the sytem dirs defined in man page hier(7).

My advice was (and still is) go looking in your port, using the "file" 
command, to locate text files, and find out what dependencies your 
software wants.  That magic.h file comes from *somewhere* and it's very 
likely writen up for you.  Also, try googling "magic.h"

> Thank you for your help.
> Aaron Siegel
>>>freebsd-ports at mailing list
>>>To unsubscribe, send any mail to "freebsd-ports-unsubscribe at"
> _______________________________________________
> freebsd-ports at mailing list
> To unsubscribe, send any mail to "freebsd-ports-unsubscribe at"

Chuck Robey         | Interests include C & Java programming, FreeBSD,
chuckr at   | electronics, communications, and SF/Fantasy.

New Year's Resolution:  I will not sphroxify gullible people into looking up
fictitious words in the dictionary (on the wall at my old fraternity,
Signa Phi Nothing).

More information about the freebsd-ports mailing list