shaikat3 / open-vcdiff

Automatically exported from code.google.com/p/open-vcdiff
Apache License 2.0
0 stars 0 forks source link

open-vcdiff fails to compile on Fedora 9 #15

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Originally reported as Chromium issues 2662 and 2988:
http://code.google.com/p/chromium/issues/detail?id=2662
http://code.google.com/p/chromium/issues/detail?id=2988
Reporters were craig.schlenter and phajdan.jr.

What steps will reproduce the problem?
Download the source tarball for open-vcdiff v0.2.  Build the package using
"./compile" and "make check".

What is the expected output? What do you see instead?
Expected: the package should build successfully and "make check" should
report "All 13 tests passed".

Actual: Compilation fails because the standard header files were not
included before using memcpy() and exit().

See the attached log for the exact error messages.

Original issue reported on code.google.com by openvcd...@gmail.com on 4 Oct 2008 at 1:48

Attachments:

GoogleCodeExporter commented 9 years ago
I've added #includes for the missing header files <string.h> and <stdlib.h>, so 
these
build errors should not occur in open-vcdiff version 0.3 or later.

Original comment by openvcd...@gmail.com on 11 Oct 2008 at 12:02

GoogleCodeExporter commented 9 years ago
I don't think it's fixed yet.  I just grabbed source from svn,
and built with gcc-4.3.1, and still saw

src/blockhash.h:336: warning: type qualifiers ignored on function return type
src/blockhash.h:338: warning: type qualifiers ignored on function return type
src/blockhash.h:356: warning: type qualifiers ignored on function return type
src/blockhash.h:357: warning: type qualifiers ignored on function return type

I also saw more errors of the same sort reported, but on different lines:

src/addrcache.h:68: warning: type qualifiers ignored on function return type
src/addrcache.h:78: warning: type qualifiers ignored on function return type
src/addrcache.h:85: warning: type qualifiers ignored on function return type
src/addrcache.h:89: warning: type qualifiers ignored on function return type
src/vcdiffengine.cc: In constructor 
'open_vcdiff::VCDiffEngine::VCDiffEngine(const
char*, size_t)':
src/vcdiffengine.cc:33: error: 'memcpy' was not declared in this scope
make: *** [vcdiffengine.lo] Error 1

I'll attach a small patch that fixes all these problems for me.

First found while building Chromium.

Original comment by daniel.r...@gmail.com on 20 Oct 2008 at 10:36

GoogleCodeExporter commented 9 years ago
Patch removing nine misplaced 'const' keywords and adding one missing #include
<string.h>.

Original comment by daniel.r...@gmail.com on 20 Oct 2008 at 10:38

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks very much for letting me know that there are still some warnings and 
errors
when compiling on Fedora 9.  I will apply your patch to the next release of 
open-vcdiff.

Saludos,

lincoln

Original comment by openvcd...@gmail.com on 22 Oct 2008 at 10:52

GoogleCodeExporter commented 9 years ago
I've applied your patch and included it in open-vcdiff v0.4.  I'm afraid I 
don't 
have a Fedora 9 environment to test it out on, so could you please verify that 
version 0.4 builds successfully for you?  Thanks!

Original comment by openvcd...@gmail.com on 24 Oct 2008 at 12:23