[Magic-dev] ~/.magic breaks UNIX 'file' command on OS X
Spaceborne Calin
spaceborne_calin at yahoo.com
Wed May 18 19:30:14 EDT 2005
--- David Fang <fang at csl.cornell.edu> a écrit :
> Hi all,
> I've discovered that a .magic file sitting in one's home directory
> can break the UNIX 'file' command which is frequently used to check
> the
> contents of libraries during compiles/builds. (Incidentally, this
> isn't
> mentioned in the FILES section of the 'file' man pages I've checked.)
> Those of you who use fink (http://fink.sourceforge.net/) on OS X may
> encounter problems building packages with shared libraries because
> the
> builds depend on a working 'file' command, somewhere during linking.
> (You'll see a verbose warning about libraries missing functionality,
> and
> only static libraries being generated -- then later, death when it
> can't
> mv a missing .dylib.)
> I suspect that this may affect other variants of 'file' on other
> *nix,*BSD platforms, but I haven't confirmed. If your 'file' command
> returns:
>
This is the first time i hear about it. Since is not documented in file
man
page on OSX it's a bug in file on OSX.
On linux I never had that problem. I checked on internet for other
systems
and at least OpenBSD, HP-UX, IRIX, Solaris don't have the problem that
you describe.
> % file
> file: could not find any magic files!
>
This is a bug. file on unix systems reads /etc/magic not ~/.magic
> then you have a problem. The obvious workaround of course, is to
> move
> .magic out of the way during such compiles. Has this been a known
> problem? Perhaps someone with more knowledge on the subject could
> offer a
> better solution?
>
This has never been a problem. I know magic from about 5 years and
never
heard of such a problem.
Sidenote: maybe it's an undocumented behaviour if it doesn't have a
/etc/magic file to look in home directory for a ~/.magic file.
Do you have a /etc/magic file ?
Calin
_____________________________________________________________________________
Découvrez le nouveau Yahoo! Mail : 1 Go d'espace de stockage pour vos mails, photos et vidéos !
Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com
More information about the magic-dev
mailing list