Bug 184925 - app-misc/fdupes-1.40: implicit declaration of memcpy
Bug#: 184925 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: All Status: RESOLVED Severity: normal Priority: P3
Resolution: FIXED Assigned To: shell-tools@gentoo.org Reported By: daniel.santos@pobox.com
Component: Applications
URL: 
Summary: app-misc/fdupes-1.40: implicit declaration of memcpy
Keywords:  
Status Whiteboard: 
Opened: 2007-07-11 06:40 0000
Description:   Opened: 2007-07-11 06:40 0000
The programmer put a #include in the wrong place and the problem only occurs
when you aren't compiling md5.c for testing.  I am actually uncertain of the
real outcome of this issue, although it's likely to cause nasties in some form
or another.

------- Comment #1 From Daniel Santos 2007-07-11 06:41:13 0000 -------
Created an attachment (id=124520) [details]
fdupes-1.40-r1.ebuild

new ebuild to fix the problem

------- Comment #2 From Daniel Santos 2007-07-11 06:41:57 0000 -------
Created an attachment (id=124521) [details]
fdupes-1.40-md5.c.patch

------- Comment #3 From Daniel Santos 2007-07-11 06:47:00 0000 -------
Oh yea, I've only tested this on Gentoo/amd64, but the problem is pretty
straight forward.

------- Comment #4 From Daniel Santos 2007-07-11 21:19:44 0000 -------
Created an attachment (id=124593) [details]
fdupes-1.40-r1.ebuild

Adds md5sum-external use flag to cause fdupes to use an eternal md5sum
executable rather than it's bundled md5 routines.  I know there's some stuff
that should go in the manifest.xml and probably the ChangeLog, sorry I haven't
learned all of that yet.

------- Comment #5 From Tiziano Müller 2007-12-15 11:50:26 0000 -------
Well, the outcome is simple: It causes segfaults on 64bit architectures.

@Daniel: Did you report the bug to upstream?

------- Comment #6 From Daniel Santos 2007-12-16 06:24:51 0000 -------
(In reply to comment #5)
> Well, the outcome is simple: It causes segfaults on 64bit architectures.
> 
> @Daniel: Did you report the bug to upstream?

Well, I did now :)  I figured it would do something nasty like that.  So how do
I make sure that fixes like this actually make it into the main portage tree in
the future?

------- Comment #7 From Chris Slycord 2008-01-27 21:00:19 0000 -------
(In reply to comment #4)
> Created an attachment (id=124593) [edit] [details]
> fdupes-1.40-r1.ebuild
> 
> Adds md5sum-external use flag to cause fdupes to use an eternal md5sum
> executable rather than it's bundled md5 routines.  I know there's some stuff
> that should go in the manifest.xml and probably the ChangeLog, sorry I haven't
> learned all of that yet.
> 

Sounds like this should be a separate bug.

------- Comment #8 From Daniel Santos 2008-01-28 12:03:19 0000 -------
(In reply to comment #7)
> (In reply to comment #4)
> > Created an attachment (id=124593) [edit] [details]
> > fdupes-1.40-r1.ebuild
> > 
> > Adds md5sum-external use flag to cause fdupes to use an eternal md5sum
> > executable rather than it's bundled md5 routines.  I know there's some stuff
> > that should go in the manifest.xml and probably the ChangeLog, sorry I haven't
> > learned all of that yet.
> > 
> 
> Sounds like this should be a separate bug.
> 

Separate bug for the new use flag or not, the patch to fix this segfaulting bug
has has been here since last July, half a year ago, and it still isn't in the
portage tree.  The new use flag is an enhancement that adds support for one of
the features in the configure script. Use the older ebuild if you want, but it
would be nice if the user community could get access to patches that work a bit
sooner after they are documented and submitted.

------- Comment #9 From Daniel Santos 2008-01-28 12:05:00 0000 -------
oh, I forgot to mention that using an external md5sum program would also
work-around the issue, although you can't use that feature with the ebuild in
its current state because that feature isn't supported.

------- Comment #10 From Peter Volkov 2008-05-06 09:13:22 0000 -------
Tiziano what did cause segfaults on amd64? patch or usage of external program?

Daniel, please, show us the errors you experience and steps to reproduce the
problem. At first glance string.h seems to be in correct place as all str*()
are used only inside #ifdef TEST ... #endif block.

------- Comment #11 From Peter Volkov 2008-05-12 22:02:21 0000 -------
Daniel, drop my last comment. I was obviously wrong there. I did not manage to
reproduce any segfalts on amd64 with this patch, so I've applied it in
fdupes-1.40-r1. In fdupes-1.40-r2 I've added md5sum-external USE flag... Thank
you for your work. FIXED.

------- Comment #12 From Daniel Santos 2008-05-13 08:36:41 0000 -------
(In reply to comment #11)
> Daniel, drop my last comment. I was obviously wrong there. I did not manage to
> reproduce any segfalts on amd64 with this patch, so I've applied it in
> fdupes-1.40-r1. In fdupes-1.40-r2 I've added md5sum-external USE flag... Thank
> you for your work. FIXED.
> 

hurray! :)