delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2009/06/20/02:15:47

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: Rugxulo <rugxulo AT gmail DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: File 5.03 for DJGPP
Date: Fri, 19 Jun 2009 23:02:13 -0700 (PDT)
Organization: http://groups.google.com
Lines: 83
Message-ID: <cc2710a3-ae0b-4277-a7f6-584fc4d05e00@n8g2000vbb.googlegroups.com>
NNTP-Posting-Host: 65.13.115.246
Mime-Version: 1.0
X-Trace: posting.google.com 1245477733 7866 127.0.0.1 (20 Jun 2009 06:02:13 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: Sat, 20 Jun 2009 06:02:13 +0000 (UTC)
Complaints-To: groups-abuse AT google DOT com
Injection-Info: n8g2000vbb.googlegroups.com; posting-host=65.13.115.246;
posting-account=p5rsXQoAAAB8KPnVlgg9E_vlm2dvVhfO
User-Agent: G2/1.0
X-HTTP-UserAgent: Opera/9.64 (Windows NT 6.0; U; en) Presto/2.1.1,gzip(gfe),gzip(gfe)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

The most recent port of File to DJGPP was apparently 3.34 back in 2001
(DJGPP 2.03p2 only), and obviously a lot has changed (e.g. much more
detected).


http://darwinsys.com/file/
ftp://ftp.astron.com/pub/file/
ftp://ftp.astron.com/pub/file/file-5.03.tar.gz

(for reference, here's links to the old one, but it's not
recommended!)
http://gd.tuwien.ac.at/pc/dos/djgpp/current/v2apps/file334b.zip
http://gd.tuwien.ac.at/pc/dos/djgpp/current/v2apps/file334s.zip


(quoting) "The major changes for 5.x are CDF file parsing, indirect
magic, and overhaul in mime and ascii encoding handling."

So here's how I personally build it (DJGPP 2.04 only), feel free to
add to this if you have a better way or know how to fix a known issue
(e.g. ZIP handling with -z obviously doesn't work):

-------------------------------------------------------------------
call djgpp.bat
djtarx z:\proglang\file-5.03.tar.gz
bash
cd file*
./configure --disable-warnings --disable-dependency-tracking CPPFLAGS=-
I/dev/c/Armslurp/watt32/inc
echo (...still whines due to ELOOP and EOVERFLOW clashes between DJGPP
and WATT-32, bah...)
sed -i "\,#define HAVE_ERR_H,s,^,//," config.h
sed -i "\,#if HAVE_STDINT_H,s,#if,#ifdef," src/readelf.h
make
cp -p src/file.exe src/file
make
------------------------------------------------------

[ Vista/DJGPP ] - Sat 06/20/2009 >v
total 3397
-rw-r--r--    1 Rugxulo  root       595362 Jun 15 23:38
file-5.03.tar.gz
-rwxr-xr-x    1 Rugxulo  root       286208 Jun 20 00:30 file-
stripped.exe
-rwxr-xr-x    1 Rugxulo  root       140512 Jun 20 00:29 file-upx.exe
-rwxr-xr-x    1 Rugxulo  root       566503 Jun 20 00:29 file.exe
-rw-r--r--    1 Rugxulo  root      1751200 Jun 20 00:29 magic.mgc
-rw-r--r--    1 Rugxulo  root       137598 Jun 20 00:30 magic.zip

[ Vista/DJGPP ] - Sat 06/20/2009 >file -z -m magic.mgc *

file-5.03.tar.gz:  tar archive (gzip compressed data, from Unix, last
modified:
Wed May  6 20:52:30 2009, max compression)
file-stripped.exe: MS-DOS executable, COFF for MS-DOS, DJGPP go32 DOS
extender
file-upx.exe:      MS-DOS executable, COFF for MS-DOS, DJGPP go32 DOS
extender,
UPX compressed
file.exe:          MS-DOS executable, COFF for MS-DOS, DJGPP go32 DOS
extender
magic.mgc:         magic binary file for file(1) cmd (version 7)
(little endian)

magic.zip:         ERROR: could not fork (Not enough memory (ENOMEM))
Zip archive
 data, at least v2.0 to extract

[ Vista/DJGPP ] - Sat 06/20/2009 >scrndump
-------------------------------------------------------------------

For 5.x, you put the magic.mgc file in /dev/env/DJDIR/share/misc/ else
manually set your env. var. MAGIC to point to it (or use option -m in
an alias, etc). Despite what some OSes do (ahem, Fedora and OpenBSD),
I'm told that using a binary magic.mgc is much faster than the plain
text version.

I was also able to build older File 4.26 (from Aug. 30, 2008), but
since I finally got this one to build without CDF errors, I guess
you'd prefer tips for the latest / greatest. But it should be similar
to build, approximately the same issues crop up. I've already
contacted the author about the above issues, so maybe he can work
around them by default for the next point release.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019