Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 472782 - net-proxy/havp-0.92a-r1 - checking for ClamAV scanner library... clamav-config not found when cross compiling
Summary: net-proxy/havp-0.92a-r1 - checking for ClamAV scanner library... clamav-confi...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo Network Proxy Developers (OBSOLETE)
URL:
Whiteboard:
Keywords: PATCH, STABLE, UPSTREAM
Depends on:
Blocks:
 
Reported: 2013-06-09 19:35 UTC by Bertrand Jacquin
Modified: 2013-10-12 14:10 UTC (History)
1 user (show)

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


Attachments
emerge --info (info.log,12.80 KB, text/x-log)
2013-06-09 19:35 UTC, Bertrand Jacquin
Details
emerge --info (info.log,12.80 KB, text/x-log)
2013-06-09 19:39 UTC, Bertrand Jacquin
Details
build-1.log (build-1.log,37.11 KB, text/x-log)
2013-06-09 19:50 UTC, Bertrand Jacquin
Details
build-2.log (build-2.log,6.27 KB, text/x-log)
2013-06-09 19:50 UTC, Bertrand Jacquin
Details
files/havp-0.92a-BJA-pkg-config-libclamav.diff (havp-0.92a-BJA-pkg-config-libclamav.diff,1.51 KB, patch)
2013-06-09 19:51 UTC, Bertrand Jacquin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bertrand Jacquin 2013-06-09 19:35:10 UTC
havp configure.in use HOST clamav-config to determine CFLAGS and LDFLAGS to link properly. This is not safe as when cross compiling, CHOST objects are different from CBUILD, as CFLAGS and all others variables. (see build-1.log for the full log).

Plus, when you don't have clamav installed on you host (which is right), you can get error like this (see build-2.log for the full log).

checking for ClamAV scanner library... clamav-config not found

But it's available in the SYSROOT.

Here is patch proposal that fix it by using pkg-config instead of clamav-config.

Also, emerge --info attached.

All this work is available here : http://git.meleeweb.net/cgit.cgi/distros/gentoo/portage.git/log/net-proxy/havp

Reproducible: Always

Steps to Reproduce:
1. crossdev -t armv6jl-hardfloat-linux-gnueabi
2. armv6jl-hardfloat-linux-gnueabi-emerge -vat havp::gentoo
3.
Comment 1 Bertrand Jacquin 2013-06-09 19:35:54 UTC
Created attachment 350554 [details]
emerge --info
Comment 2 Bertrand Jacquin 2013-06-09 19:39:58 UTC
Created attachment 350556 [details]
emerge --info

Sorry, wrong info, replace armv6jl-hardfloat-linux-gnueabi with i586-pc-linux-gnu
Comment 3 Bertrand Jacquin 2013-06-09 19:50:10 UTC
Created attachment 350558 [details]
build-1.log

This is case #1.

app-antivirus/clamav installed on CHOST and CBUILD. 

Portion of log that is wrong :

checking for ClamAV scanner library... found 0.97.8 in /usr
...
make[2]: Leaving directory `/var/tmp/i586-pc-linux-gnu/portage/net-proxy/havp-0.92a-r1/work/havp-0.92a/havp/scanners'
i586-pc-linux-gnu-g++ -march=geode -Os -mmmx -m3dnow -fno-align-jumps -fno-align-functions -fno-align-labels -fno-align-loops -pipe -fomit-frame-pointer -I/usr/include -o havp helper.o  logfile.o scannerhandler.o connectiontobrowser.o genericscanner.o httphandler.o params.o sockethandler.o connectiontohttp.o havp.o proxyhandler.o utils.o whitelist.o scanners/scanners .a -L/usr/i586-pc-linux-gnu/lib -L/usr/i586-pc-linux-gnu/usr/lib -L/usr/lib64 -L/usr/lib64 -lclamav

"-L/usr/lib64 -L/usr/lib64" come from clamav-config 

# clamav-config --libs
-L/usr/lib64 -lz -L/usr/lib64 -lbz2 -ltommath
Comment 4 Bertrand Jacquin 2013-06-09 19:50:50 UTC
Created attachment 350560 [details]
build-2.log

This is case #2.

app-antivirus/clamav installed on CHOST and not on CBUILD.
Comment 5 Bertrand Jacquin 2013-06-09 19:51:31 UTC
Created attachment 350562 [details, diff]
files/havp-0.92a-BJA-pkg-config-libclamav.diff

Patch for havp configure.in
Comment 6 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-06-15 12:44:27 UTC
I'll try to look into this soon.
Comment 7 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-10-12 14:10:12 UTC
Seems I was distracted by exams around that time or so.

There we go...

+  12 Oct 2013; Tom Wijsman <TomWij@gentoo.org>
+  +files/havp-0.92a-r1-pkg-config-libclamav.patch, havp-0.92a-r1.ebuild:
+  Fix linking with libclamav when cross compiling, patch by Bertrand Jacquin
+  whom reported bug #472782.

Thank you for your contribution!