>>> Compiling source in /var/tmp/portage/app-emulation/xen-tools-4.1.1-r5/work/xen-4.1.1 ... make -j5 -C tools make: Entering directory `/var/tmp/portage/app-emulation/xen-tools-4.1.1-r5/work/xen-4.1.1/tools' make[1]: Entering directory `/var/tmp/portage/app-emulation/xen-tools-4.1.1-r5/work/xen-4.1.1/tools' make -C check all make[2]: Entering directory `/var/tmp/portage/app-emulation/xen-tools-4.1.1-r5/work/xen-4.1.1/tools/check' PYTHON=python LIBXENAPI_BINDINGS=y ACM_SECURITY=n ./chk build Xen CHECK-BUILD Sun Oct 9 03:48:05 CEST 2011 Checking check_crypto_lib: OK Checking check_curl: *** check_curl FAILED: dependency libraries for curl are missing Checking check_openssl_devel: OK Checking check_python: OK Checking check_python_devel: OK Checking check_uuid_devel: OK Checking check_x11_devel: OK Checking check_xgettext: OK Checking check_xml2: OK Checking check_zlib_devel: OK Checking check_zlib_lib: OK make[2]: *** [check-build] Error 1 make[2]: Leaving directory `/var/tmp/portage/app-emulation/xen-tools-4.1.1-r5/work/xen-4.1.1/tools/check' make[1]: *** [subdir-all-check] Error 2 make[1]: Leaving directory `/var/tmp/portage/app-emulation/xen-tools-4.1.1-r5/work/xen-4.1.1/tools' make: *** [subdirs-all] Error 2 make: Leaving directory `/var/tmp/portage/app-emulation/xen-tools-4.1.1-r5/work/xen-4.1.1/tools' emake failed * ERROR: app-emulation/xen-tools-4.1.1-r5 failed (compile phase): * compile failed * * Call stack: * ebuild.sh, line 91: Called src_compile * environment, line 5254: Called die * The specific snippet of code: * emake -C tools ${myopt} || die "compile failed"; The check_curl script relies on the output of `curl-config --libs` and uses it to call ld. If curl was emerged with USE="nss" this will fail because the curl-config output looks like this: -lcurl -lcares -lidn -lldap -lrt -lz -Wl,-R/usr/lib64 -lssl3 -lsmime3 -lnssutil3 -lnss3 -lplds4 -lplc4 -lnspr4 -lpthread ld doesn't understand the -W flag and thus fails. I'm not sure if the existence of the -W flag in that output is a bug in our curl per se (as in: e.g. other tools can rely on that output to work with ld) and if it can be removed somehow. Please advise if curl or xen-tools needs to be fixed.
Created attachment 289741 [details, diff] a patch for configuring curl It could go either way, but it can be managed in xen-tools with this one liner patch.
Created attachment 289743 [details, diff] diff patch for xen-tools 4.1.1 ebuild
I'd say fix xen. The -Wl,foo flags are for gcc so it passes them to the linker, changing that in curl will break other build systems that rely on the existance of the -Wl (i.e. those that use gcc for linking, autotools for example)
Created attachment 289751 [details, diff] another patch for configuring curl alternate method of making a fix for curl in xen-tools
*** This bug has been marked as a duplicate of bug 364565 ***
*** This bug has been marked as a duplicate of bug 361677 ***
*** Bug 361677 has been marked as a duplicate of this bug. ***
Reopening most useful report, as it has patches. Ian, please mark all patches you do not want to use as "obsolete".
Created attachment 290159 [details, diff] adjusted xen ebuild
Created attachment 290163 [details, diff] same as last, non-preferred obsoleted
Re-assigning wrt comment #3
Fixed in r6
Same problem in xen-tools-4.1.2 ... )-;
ahem any testing done here ? :) (this applies equally to 4.1.1-r6 4.1.2 etc as they use the same check_curl script) this doesn't even look right: @@ -9,5 +9,5 @@ fi has_or_fail curl-config -curl_libs=`curl-config --libs` || fail "curl-config --libs failed" +curl_libs=`echo $curl_libs |sed -e 's/-W[^[:space:]]*[[:space:]]//'` || fail "curl-config --libs failed" test_link $curl_libs || fail "dependency libraries for curl are missing" at this point curl_libs would not be set and although the sed is correct curl_libs is unset so this will do nothing for us ;) as a side note: the sed also needs to be extend slightly if you also have net-misc/curl[kerberos] in your system too, see attached updated check_curl patch it should be (excuse hand diff editing here :) : @@ -9,5 +9,6 @@ fi has_or_fail curl-config curl_libs=`curl-config --libs` || fail "curl-config --libs failed" +curl_libs=`echo $curl_libs |sed -e 's/-W[^[:space:]]*[[:space:]]//'` || fail "curl-config --libs failed" test_link $curl_libs || fail "dependency libraries for curl are missing" test case, in the ebuild add add shell bounds checking + debug to tools/check/check_curl sed -i -e 's|has_or_fail curl-config|has_or_fail curl-config\nset -ux|' tools/check/check_curl emerge... (4.1.2 used here but also applies to 4.1.1*) Checking check_curl: ./check_curl: line 13: curl_libs: unbound variable ++ sed -e 's/-W[^[:space:]]*[[:space:]]//' + curl_libs= + test_link + unset tmpfile + trap 'rm -f "$tmpfile"; exit' 0 1 2 15 ++ mktemp + tmpfile=/var/tmp/portage/app-emulation/xen-tools-4.1.2-r1/temp/tmp.LI3kr9Wc98 + ld -o /var/tmp/portage/app-emulation/xen-tools-4.1.2-r1/temp/tmp.LI3kr9Wc98 + return 1 ++ rm -f /var/tmp/portage/app-emulation/xen-tools-4.1.2-r1/temp/tmp.LI3kr9Wc98 ++ exit + fail 'dependency libraries for curl are missing' + echo ++ basename ./check_curl + echo ' *** check_curl FAILED: dependency libraries for curl are missing' *** check_curl FAILED: dependency libraries for curl are missing + exit 1 xen-tools-4.1.x compile correctly with the updated patch and net-misc/curl
Created attachment 290881 [details] fix xen check_curl script
Actually, it's not quite the same problem... It's the patch added in 4.1.1-r6 that seems to break things in both 4.1.1-r6 and 4.1.2 ... (4.1.1-r5 built fine with USE=api and no patch...)
Created attachment 290883 [details, diff] xen-tools-4.1.2.ebuild patch Verified that xen-tools-4.1.2 builds fine after removing the offending patch...
(In reply to comment #17) > Created attachment 290883 [details, diff] > xen-tools-4.1.2.ebuild patch > > Verified that xen-tools-4.1.2 builds fine after removing the offending patch... removing the patch will only work for the edge case where you have net-misc/curl[-kerberos,-nss] if you have either of those use flags enabled you will need the updated patch as they change the output of curl-config --libs
*** Bug 388627 has been marked as a duplicate of this bug. ***
Can somebody reopen bug while 4.1.2 is not fixed? :)
Btw, as I can see in work/xen-4.1.2/tools/check/funcs.sh — upstream added stripping of "-W*". In this way, I think it is just enough to remove patch for 4.1.1 from 4.1.2 ;)
(In reply to comment #21) > Btw, as I can see in work/xen-4.1.2/tools/check/funcs.sh — upstream added > stripping of "-W*". In this way, I think it is just enough to remove patch for > 4.1.1 from 4.1.2u ;) it's not enough as you need strip more than just -W, like -pipe -march= etc etc
Paul Freeman, you're welcome to hazard a suggested list of content to strip out, but your last suggestion appears to be off the mark. -lcurl -lcares -lidn -lssh2 -lssl -lcrypto -lrt -lssl -lcrypto -ldl -lz -lz -lssh2 at a glance appears a valid output, all -l entries, and it failed with use api without curl[nss]. Looking for any good way of patching it opposed to removing the thing entirely which allows an effective compile
(In reply to comment #23) > Paul Freeman, you're welcome to hazard a suggested list of content to strip > out, but your last suggestion appears to be off the mark. > hey I'm not here for any acrimonious disputes - just to get xen working :) > -lcurl -lcares -lidn -lssh2 -lssl -lcrypto -lrt -lssl -lcrypto -ldl -lz -lz > -lssh2 > at a glance appears a valid output, all -l entries, and it failed with use api > without curl[nss]. > Looking for any good way of patching it opposed to removing the thing entirely > which allows an effective compile well I guess there is always the argument for removing, perhaps you could say that if you have curl installed it will already have pulled in the required runtime depends (and usually headers + libs since it's not the Gentoo norm to separate the dev headers/libs into separate packages) and do we need the xen build check anyway? so you have a fail with xen-tools[api] & curl[-nss]? interesting, what are your use flags for curl ? FYI if you add kerberos to curl's use flags you also get -march= -pipe etc in the curl-config --libs output.
Paul, seems you forgot to tell me to read your comment 14, I completely missed it in between the to-ing and fro-ing between comments 1 -10, Chocolates to you, the patch was missing the line that defined the curl_libs, a broken patch. The notion of deleting it was mentioned in irc by the poster, the rationale exactly as you described in your last comment. Both the patch and deleting the check work to effect xen-tools to compile. gentoo64 xen-tools # ebuild xen-tools-4.1.2.ebuild clean compile make: Leaving directory `/var/tmp/portage/portage/app-emulation/xen-tools-4.1.2/work/xen-4.1.2/docs' >>> Source compiled. ditto gentoo64 xen-tools # ebuild xen-tools-4.1.1-r6.ebuild compile #gentoo64 xen-tools # eix curl Installed versions: 7.22.0(21:36:14 10/27/11)(gnutls kerberos ldap ssl static-libs threads -ares -idn -ipv6 -libssh2 -nss -test) gentoo64 xen-tools # curl-config --libs -lcurl -lgcrypt -lldap -lrt -L/usr/lib64 -march=athlon64 -fomit-frame-pointer -pipe -O3 -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lkeyutils -lresolv -ldl -lz -lgnutls I also tried the xen-tools-4.1.2 with your added sed statement sed -i -e 's|has_or_fail curl-config|has_or_fail curl-config\nset -ux|' tools/check/check_curl which also lead to an effective compile. Seems we are spoilt for choice. My recommend is the patch as it should have been, your sed statement can be an option for xen dev
Paul, care to test?
(In reply to comment #25) > Paul, > seems you forgot to tell me to read your comment 14, I completely missed it in > between the to-ing and fro-ing between comments 1 -10, Chocolates to you, the hehe easily done :)
(In reply to comment #26) > Paul, care to test? confirmed also working with simple rm of the check_curl script on 4.1.1-r6 & 4.1.2 as well as with the updated patch. just as a side note, there are some other check function scripts in the the same directory (tools/check) for checking libxml2 etc, they might also become an issue if for example xml2-config --libs were to change its output.
good one Paul, good contribution for checking libxml2 etc, duly noted
*** Bug 389025 has been marked as a duplicate of this bug. ***
Created attachment 303651 [details, diff] updated patch to fix check_curl i just ran into this bug again just now, when trying to compile app-emulation/xen-tools-4.1.2-r2 ... this time ld failed because of "-pthread", with this patch the check succeeded.
(In reply to comment #31) > Created attachment 303651 [details, diff] [details, diff] > updated patch to fix check_curl > > i just ran into this bug again just now, when trying to compile > app-emulation/xen-tools-4.1.2-r2 ... > this time ld failed because of "-pthread", with this patch the check > succeeded. eeeer, do you mean 4.1.2? It was dropped from portage. xen-4.2.1/tools/ has no check folder