[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: (visual) diff for large files



2008/5/2 michael <cs@networkingnewsletter.org.uk>:
>  I had a quick try (before above patch) but it fails on headers:
>
>
>  michael@ratty:~/src/bsd-diff/bin$ gcc --version
>  gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
>  Copyright (C) 2006 Free Software Foundation, Inc.
>  This is free software; see the source for copying conditions.  There is
>  NO
>  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
>  PURPOSE.
>
>
>  michael@ratty:~/src/bsd-diff/bin$ make
>  cd adb; make  SEPFLAG=-i
>  make[1]: Entering directory `/home/michael/src/bsd-diff/bin/adb'
>  cc -O -DNUM_SYMS_CACHE=50   -c -o access.o access.c
>  In file included from access.c:1:
>  defs.h:15:25: error: machine/reg.h: No such file or directory
>  In file included from access.c:1:
>  defs.h:194: warning: conflicting types for built-in function 'round'
>  access.c: In function 'acces':
>  access.c:69: error: 'errno' undeclared (first use in this function)
>  access.c:69: error: (Each undeclared identifier is reported only once
>  access.c:69: error: for each function it appears in.)
>  access.c: In function 'setovmap':
>  access.c:142: error: 'NOVL' undeclared (first use in this function)
>  access.c:148: error: invalid use of undefined type 'struct ovlhdr'
>  make[1]: *** [access.o] Error 1
>  make[1]: Leaving directory `/home/michael/src/bsd-diff/bin/adb'
>  make: *** [adb] Error 2

Hello,

those errors seem very different of what I get. This are the steps I made:

1.  I have unpacked the file file8.tar.gz (MD5:
77397e6d554361c127592b1fea2d776f)  in the directory bsd-src.
2.  Go to bin/diff directory, where there are the following files:
      * diff.c
      * diffdir.c
      * diff.h
      * diffh.c
      * diffreg.c
      * Makefile

3. I I try to compile using gcc 4.2.3 I got the following errors and warnings:
$ make
cc -O -DDIFF='"/bin/diff"' -DDIFFH='"/usr/libexec/diffh"'
-DPR='"/bin/pr"'   -c -o diff.o diff.c
In file included from diff.c:5:
diff.h:80: warning: conflicting types for built-in function 'malloc'
diff.c: In function 'savestr':
diff.c:155: warning: incompatible implicit declaration of built-in
function 'strlen'
diff.c:161: warning: incompatible implicit declaration of built-in
function 'strcpy'
diff.c: In function 'done':
diff.c:183: warning: incompatible implicit declaration of built-in
function 'exit'
cc -O -DDIFF='"/bin/diff"' -DDIFFH='"/usr/libexec/diffh"'
-DPR='"/bin/pr"'   -c -o diffdir.o diffdir.c
In file included from diffdir.c:5:
diff.h:80: warning: conflicting types for built-in function 'malloc'
diffdir.c: In function 'diffdir':
diffdir.c:43: warning: incompatible implicit declaration of built-in
function 'strcpy'
diffdir.c:47: warning: incompatible implicit declaration of built-in
function 'strcat'
diffdir.c: In function 'setfile':
diffdir.c:124: warning: incompatible implicit declaration of built-in
function 'exit'
diffdir.c:126: warning: incompatible implicit declaration of built-in
function 'strcpy'
diffdir.c: In function 'setupdir':
diffdir.c:202: error: 'struct dirent' has no member named 'd_namlen'
diffdir.c:211: warning: incompatible implicit declaration of built-in
function 'strcpy'
diffdir.c: In function 'compare':
diffdir.c:243: warning: incompatible implicit declaration of built-in
function 'strcpy'
make: *** [diffdir.o] Fehler 1


4. Now, if I use gcc ver 3.3.6 (that is what I have now at home), I
get the following errors:
$ make clean
$ CC=/usr/bin/gcc-3.3 make
/usr/bin/gcc-3.3 -O -DDIFF='"/bin/diff"'
-DDIFFH='"/usr/libexec/diffh"' -DPR='"/bin/pr"'   -c -o diffdir.o
diffdir.c
diffdir.c: In Funktion »setupdir«:
diffdir.c:202: error: structure has no member named `d_namlen'
make: *** [diffdir.o] Fehler 1

5.  Make the  modifications I told you to the file diffdir.c
6. Compile again
$ make clean
$ CC=/usr/bin/gcc-3.3  make

You will get some warnings, but you will have the binaries diff and diffh.

Where are you compiling diff, and what directory level ? Go directly
do the bin/diff directory.

Hope this will help you.

Best regards,
Sergio Cuellar

-- 
"Meine Hoffnung soll mich leiten
Durch die Tage ohne Dich
Und die Liebe soll mich tragen
Wenn der Schmerz die Hoffnung bricht"


Reply to: