Hi,
I downloaded the file package (version 5.18) from
ftp://ftp.astron.com/pub/file/
For some reasons, I needed to build this 'file' package from sources.
So on an x86 Linux machine, I built it from sources.
(Linux 2.6.18-238.5.1.el5 #1 SMP Mon Feb 21 05:52:39 EST 2011 x86_64 x86_64 x86_64 GNU/Linux)
I built the 'file' package and installed it in a private directory,
In the installation directory,
$ ls -l
drwxr-xr-x 2 user users 4096 Jun 11 14:13 bin
drwxr-xr-x 2 user users 4096 Jun 11 14:11 include
drwxr-xr-x 2 user users 4096 Jun 11 14:11 lib
drwxr-xr-x 4 user users 4096 Jun 11 08:04 share
$ ls -l share
total 8
drwxr-xr-x 6 user users 4096 Jun 11 08:04 man
drwxr-xr-x 2 user users 4096 Jun 11 14:11 misc
$ ls -l share/misc/
total 2792
-rw-r--r-- 1 user users 2847784 Jun 11 14:11 magic.mgc
The above line shows the magic number database stored in a file magic.mgc
Now to use this our own compiled 'file' command I do the following.
export MAGIC=/home/user/install/file-5.18_native/share/misc
But now, if I use the file command, I get following errors and warnings.
/home/user/install/file-5.18_native/share/misc/magic.mgc, 6: Warning: offset Firmware v' invalid /home/user/install/file-5.18_native/share/misc/magic.mgc, 6: Warning: type
Firmware v' invalid
...
...
file: could not find any valid magic files!
Could someone please clarify what could be wrong in the build process.
The libmagic sources are present in the 'file' package itself.
Thank you,
LML