Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 415685

Summary: app-forensics/magicrescue-1.1.9 installs broken dupemap
Product: Gentoo Linux Reporter: Andrew Savchenko <bircoph>
Component: Current packagesAssignee: Forensics Herd [disbanded] <forensics+obsolete>
Status: RESOLVED FIXED    
Severity: normal Keywords: PATCH
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info
magicrescue-1.1.9-ldflags.patch
magicrescue-1.1.9.ebuild.patch
magicrescue-1.1.9-ldflags.patch

Description Andrew Savchenko gentoo-dev 2012-05-13 03:00:15 UTC
Hello,

magicrescue build dupemap application, but it is non-functional:

$ dupemap
dupemap was not compiled because no ndbm.h was found on your system.  Please
install the development packages for Berkeley DB or GDBM and recompile.

Really, this is the first time I see application compiled complaining it was not compiled :)

The reason is in configure script: its link check function is not --as-needed friendly, thus test fails and dupemap is not compiled properly.

A patch to fix this is attached.
Comment 1 Andrew Savchenko gentoo-dev 2012-05-13 03:01:43 UTC
Created attachment 311559 [details]
emerge --info

Not really needed, bug was tested on multiple Gentoo boxes with rather different setup each.
Comment 2 Andrew Savchenko gentoo-dev 2012-05-13 03:10:07 UTC
Created attachment 311561 [details, diff]
magicrescue-1.1.9-ldflags.patch

In configure $LDFLAGS contains both linking flags and linking libraries. The most proper way to fix this will be to separate $LDFLAGS to $LDFLAGS and $LFLAGS, but this will require a complete rewrite of all configure and config.d.

The simpler way is just to duplicate $LDFLAGS after object file(s).
Comment 3 Andrew Savchenko gentoo-dev 2012-05-13 03:13:52 UTC
Created attachment 311563 [details, diff]
magicrescue-1.1.9.ebuild.patch

Another change required is gdbm dependency: gdbm must be build with berkdb support.
Comment 4 Andrew Savchenko gentoo-dev 2012-05-13 03:37:28 UTC
Comment on attachment 311561 [details, diff]
magicrescue-1.1.9-ldflags.patch

Patch is not working in all cases...
Comment 5 Andrew Savchenko gentoo-dev 2012-05-13 04:08:55 UTC
Created attachment 311565 [details, diff]
magicrescue-1.1.9-ldflags.patch

This patch fixes problem properly.
Build system was not as-needed-friendly at all.
Comment 6 Patrick Lauer gentoo-dev 2013-04-11 06:17:46 UTC
+  11 Apr 2013; Patrick Lauer <patrick@gentoo.org>
+  +files/magicrescue-1.1.9-ldflags.patch, magicrescue-1.1.9.ebuild:
+  Build fix for dupemap #415685

Thanks!