Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 220233 - LDFLAGS="-Wl,--as-needed" breaks libmilter & clamav
Summary: LDFLAGS="-Wl,--as-needed" breaks libmilter & clamav
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Net-Mail Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: as-needed
  Show dependency tree
 
Reported: 2008-05-04 13:18 UTC by Matt
Modified: 2009-09-14 09:40 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
output of emerge-log (app-antivirus:clamav) & failure (app-antivirus:clamav-0.93:20080504-131038.log,12.23 KB, text/plain)
2008-05-04 13:40 UTC, Matt
Details
/var/tmp/portage/app-antivirus/clamav-0.93.3/work/clamav-0.93.3/config.log (config.log,98.37 KB, text/plain)
2008-07-23 09:52 UTC, Philipp Riegger
Details
Applied against configure.in, lets clamav build support for libmilter with --as-needed (clamav-0.94.as-needed.patch,1.67 KB, patch)
2008-09-24 21:03 UTC, Nathan Phillip Brink (binki) (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matt 2008-05-04 13:18:50 UTC
when emerging libmilter with LDFLAGS="-Wl,--as-needed" it isn't recognized by clamav during configure-stage thus letting clamav fail
Comment 1 Matt 2008-05-04 13:20:48 UTC
hope I set up the dependency correctly,

sorry for any inconvenience

thanks :)
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2008-05-04 13:21:35 UTC
Please attach the config.log from such failure.
Comment 3 Matt 2008-05-04 13:40:03 UTC
Created attachment 151809 [details]
output of emerge-log (app-antivirus:clamav) & failure
Comment 4 Mike Auty (RETIRED) gentoo-dev 2008-05-30 07:09:35 UTC
I think this blocks the tracker, rather than depends on the tracker being fixed.  I've updated it accordingly...  5:)
Comment 5 Matt 2008-06-03 21:54:50 UTC
:D

that was what I originally had intended to do !

Thanks ;)
Comment 6 Diego Elio Pettenò (RETIRED) gentoo-dev 2008-06-07 12:46:20 UTC
Can you post the generated config.log file? It's probably a problem with libmilter, which affects clamav, rather than a problem with clamav.
Comment 7 Matt 2008-06-21 19:53:19 UTC
will do within the next days...

I just found out that "only" clamav is affected:

if I try to compile clamav with as-needed set it fails,

if as-needed was set on libmilter only & is filtered out / omitted with clamav, clamav compiles & works fine
Comment 8 Philipp Riegger 2008-07-23 09:52:15 UTC
Created attachment 161173 [details]
/var/tmp/portage/app-antivirus/clamav-0.93.3/work/clamav-0.93.3/config.log

I also hit the same problem. Attached config.log.
Comment 9 Philipp Riegger 2008-09-10 12:39:03 UTC
any news on this one? A config.log file is posted.
Comment 10 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2008-09-24 21:03:08 UTC
Created attachment 166319 [details, diff]
Applied against configure.in, lets clamav build support for libmilter with --as-needed

I figured out how to get this to compile on my machine, since this problem has bugged me 2 or three times in the last year. The problem is that when configure tests whether or not libmilter can be "lunk" to, the libraries are passed to GCC in the wrong order. This is because configure uses LDFLAGS rather than LIBS to pass the libs to gcc. This patch sets the libs libmilter needs to the LIBS variable rather than the LDFLAGS variable and causes clamav to compile with LDFLAGS="-Wl,--as-needed" and with libmilter on my machine.
Comment 11 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2008-09-29 15:08:55 UTC
(In reply to comment #9)
> any news on this one? A config.log file is posted.
> 

If this is news, I posted the same patch I attached to this bug to ClamAV's bugzilla. According to the bug as of today, I think the next bugfix release of 0.94.1 will be fixed.
https://wwws.clamav.net/bugzilla/show_bug.cgi?id=1204
Comment 12 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2008-11-10 13:53:29 UTC
Maybe this bug should depend on bug #245450, because app-antivirus/clamav-0.94.1 supports --as-needed.
Comment 13 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2008-11-30 06:22:25 UTC
app-antivirus/clamav-0.94.1 is now in the Portage tree and stable by bug #245450. app-antivirus/clamav-0.94.2 also is in the tree, by bug #248798. These versions of clamav compile fine with LDFLAGS="-Wl,--as-needed" and USE="milter".
Thus, I think this bug's Status should be FIXED. Please mark it as such.
Comment 14 Tobias Scherbaum (RETIRED) gentoo-dev 2008-12-02 17:55:28 UTC
(In reply to comment #13)
> Thus, I think this bug's Status should be FIXED. Please mark it as such.

Just doing so. Thanks for testing & reporting back!

Comment 15 Matt 2009-07-18 16:22:21 UTC
sorry for resurrecting this bug but it appeared again with 0.95.2:

configure: error: Cannot find libmilter

!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/app-antivirus/clamav-0.95.2/work/clamav-0.95.2/config.log
 * 
 * ERROR: app-antivirus/clamav-0.95.2 failed.

[U] app-antivirus/clamav
     Available versions:  0.95.1!t 0.95.2!t {bzip2 clamdtop crypt iconv ipv6 milter selinux}
     Installed versions:  0.95.1!t(17:15:21 04/10/09)(bzip2 crypt iconv ipv6 milter -clamdtop -selinux)
     Homepage:            http://www.clamav.net/
     Description:         Clam Anti-Virus Scanner

libmilter:
mail-filter/libmilter-8.14.3

afaik 0.95.1 emerged fine with as-needed ...
Comment 16 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2009-07-20 11:46:26 UTC
(In reply to comment #15)
> sorry for resurrecting this bug but it appeared again with 0.95.2:
I have 0.95.2 installed, I think I use LDFLAGS="-Wl,--as-needed", and it seems to work fine for me. However, I don't force --as-needed in my specfile... do you?
> 
> configure: error: Cannot find libmilter
> 
> !!! Please attach the following file when seeking support:
> !!! /var/tmp/portage/app-antivirus/clamav-0.95.2/work/clamav-0.95.2/config.log

May you please attach this file? This reveals what part of that configure test failed. It hopefully tells why it failed (or why --as-needed caused that test to fail).
Comment 17 Tony Vroon (RETIRED) gentoo-dev 2009-09-14 09:40:17 UTC
(In reply to comment #15)
> sorry for resurrecting this bug

New version, new bug. Do *not* do this; the bug will have dozens of comments that would now be stale, as well as attachments that would now be stale. The bug in 0.94 was fixed.
Open a new bug.