txt2dbf

Brian K. White brian at aljex.com
Tue Mar 21 15:30:12 PST 2006


----- Original Message ----- 
From: "Walter Vaughan" <wvaughan at steelerubber.com>
To: "filePro" <filepro-list at lists.celestial.com>
Sent: Tuesday, March 21, 2006 4:46 PM
Subject: Re: txt2dbf


> Scott Nelson wrote:
>
>> I saw in the fp list archive a Georgio (bad email address) found a 
>> txt2dbf, that
>> sounded like it was to run on SCO?
>> If anyone has this, source or complied for 5.05 or 5.06, would you mind 
>> sending me
>> the file?
>
> http://www.usf.uos.de/~fkoorman/software/dbftools.en.html
>
> What's weird is that the SCO skunkware gcc makes a pretty big binary
> # l
> total 518
> -rwxr-xr-x   1 root     sys       117078 Mar 21 16:39 dbf2txt
> -rwxr--r--   1 nouser   nogroup     3325 Jan 14  2000 dbf2txt.c
> -rw-r--r--   1 root     sys         3282 Mar 21 16:39 dbf2txt.o
> -rwxr--r--   1 nouser   nogroup     1443 Sep  9  1998 makefile
> -rwxr-xr-x   1 root     sys       121061 Mar 21 16:39 txt2dbf
> -rwxr--r--   1 nouser   nogroup     6819 Feb 24  1999 txt2dbf.c
> -rw-r--r--   1 root     sys         5600 Mar 21 16:39 txt2dbf.o
>
> Yet FreeBSD makes a pretty tight binary
> # ll
> total 54
> -rwxr-xr-x  1 root    wheel  13635 Mar 21 16:38 dbf2txt
> -rwxr--r--  1 nobody  wheel   3325 Jan 14  2000 dbf2txt.c
> -rw-r--r--  1 root    wheel   3232 Mar 21 16:38 dbf2txt.o
> -rwxr--r--  1 nobody  wheel   1443 Sep  9  1998 makefile
> -rwxr-xr-x  1 root    wheel  16256 Mar 21 16:38 txt2dbf
> -rwxr--r--  1 nobody  wheel   6819 Feb 24  1999 txt2dbf.c
> -rw-r--r--  1 root    wheel   5412 Mar 21 16:38 txt2dbf.o


Gee... gcc on 5.0.6:
# ls -l txt2dbf dbf2txt
-rwxr-xr-x   1 root     sys         9548 Mar 21 18:24 dbf2txt
-rwxr-xr-x   1 root     sys        10976 Mar 21 18:24 txt2dbf


OK so that took a little cheating :)


It _was_ pretty reasonable right out of the box though, without touching the 
makefile or CFLAGS
# ls -l
total 118
-rwxr-xr-x   1 root     sys        15720 Mar 21 17:25 dbf2txt
-rw-r--r--   1 root     sys         3325 Jan 14  2000 dbf2txt.c
-rw-r--r--   1 root     sys         3600 Mar 21 17:25 dbf2txt.o
-rw-r--r--   1 root     sys         1443 Sep  9  1998 makefile
-rwxr-xr-x   1 root     sys        18268 Mar 21 17:25 txt2dbf
-rw-r--r--   1 root     sys         6819 Feb 24  1999 txt2dbf.c
-rw-r--r--   1 root     sys         5784 Mar 21 17:25 txt2dbf.o


It gets better yet if you have a working strip (which I know is going beyond 
comparing apples to apples until you try stripping the freebsd binaries)
# strip txt2dbf dbf2txt
# ls -l txt2dbf
-rwxr-xr-x   1 root     sys        14168 Mar 21 17:39 txt2dbf
-rwxr-xr-x   1 root     sys        12036 Mar 21 17:39 dbf2txt

Note:
You don't have a working strip on sco if you only install the linker & 
libraries package and gcc or gnutools. gnutools comes with gstrip which will 
corrupt binaries so don't use it.
(this comes from Kean himself who does most of the gnu app porting for sco)

Thefull native devsys has a strip which is ok.
I used to have to trick makefiles with a fake strip that was just : or true, 
or edit them not to want it. Now I have the full devsys installed, but 
unlicenced, which is useful because it provides some things like a working 
strip that don't need the devsys to be licensed to work.
It also complicates some things because some makefiles or ./configure 
scripts automatically discover you hav cc and try to use the the native 
compiler, with native cc options, instead of gcc and gcc options.

Finally, adding "-O2 -march=i686 -s" to CFLAGS, instead of running strip 
manually, (also in ../lib/makefile) and cleaning out all .o and .a files and 
running make again is what caused the smallest, 9.5k & 11k numbers.


This may shed light if you look at yours with file & ldd?

# file txt2dbf
txt2dbf:        ELF 32-bit LSB executable 80386, dynamically linked, 
stripped, no debug
# ldd txt2dbf
txt2dbf needs:
        /usr/lib/libm.so.1
        /usr/lib/libc.so.1

Brian K. White  --  brian at aljex.com  --  http://www.aljex.com/bkw/
+++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
filePro  BBx    Linux  SCO  FreeBSD    #callahans  Satriani  Filk!



More information about the Filepro-list mailing list