[OE-core] [PATCH V2] curl: support multilib installation

Changqing Li changqing.li at windriver.com
Tue Jul 31 02:22:59 UTC 2018



On 07/31/2018 06:29 AM, Richard Purdie wrote:
> On Mon, 2018-07-30 at 10:32 +0800, changqing.li at windriver.com wrote:
>> From: Changqing Li <changqing.li at windriver.com>
>>
>> curl-config is generated to displays information about
>> the curl and libcurl installation. So the content is different
>> for 32bit and 64bit package. eg: maybe for 32bit, use
>> i686-linux-gnu-gcc, and for 64bit, use x86-64-linux-gnu-gcc.
>>
>> Use update-alternatives to add base_libdir as suffix to create
>> seperate curl-config, so user can check both info of 32/64 bit
>> curl.
>>
>> Signed-off-by: Changqing Li <changqing.li at windriver.com>
>> ---
>>   meta/recipes-support/curl/curl_7.61.0.bb | 13 ++++++++++++-
>>   1 file changed, 12 insertions(+), 1 deletion(-)
>>
>> diff --git a/meta/recipes-support/curl/curl_7.61.0.bb b/meta/recipes-support/curl/curl_7.61.0.bb
>> index cc983fd..1841c50 100644
>> --- a/meta/recipes-support/curl/curl_7.61.0.bb
>> +++ b/meta/recipes-support/curl/curl_7.61.0.bb
>> @@ -13,7 +13,7 @@ SRC_URI[md5sum] = "31d0a9f48dc796a7db351898a1e5058a"
>>   SRC_URI[sha256sum] = "5f6f336921cf5b84de56afbd08dfb70adeef2303751ffb3e570c936c6d656c9c"
>>   
>>   CVE_PRODUCT = "libcurl"
>> -inherit autotools pkgconfig binconfig multilib_header
>> +inherit autotools pkgconfig binconfig multilib_header update-alternatives
>>   
>>   PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} gnutls proxy threaded-resolver verbose zlib"
>>   PACKAGECONFIG_class-native = "ipv6 proxy ssl threaded-resolver verbose zlib"
>> @@ -48,6 +48,17 @@ PACKAGECONFIG[threaded-resolver] = "--enable-threaded-resolver,--disable-threade
>>   PACKAGECONFIG[verbose] = "--enable-verbose,--disable-verbose"
>>   PACKAGECONFIG[zlib] = "--with-zlib=${STAGING_LIBDIR}/../,--without-zlib,zlib"
>>   
>> +MULTILIB_SUFFIX = "${@d.getVar('base_libdir',1).split('/')[-1]}"
>> +ALTERNATIVE_${PN}-dev = "curl-config"
>> +ALTERNATIVE_LINK_NAME[curl-config] = "${bindir}/curl-config"
>> +ALTERNATIVE_TARGET[curl-config] = "${bindir}/curl-config-${MULTILIB_SUFFIX}"
>> +
>> +PACKAGE_PREPROCESS_FUNCS += "alternative_rename"
>> +
>> +alternative_rename() {
>> +        mv ${PKGD}${bindir}/curl-config ${PKGD}${bindir}/curl-config-${MULTILIB_SUFFIX}
>> +}
>> +
>>   EXTRA_OECONF = " \
>>       --disable-libcurl-option \
>>       --disable-ntlm-wb \
> We're going to keep having this problem with other files and I really
> don't want to impact non-multilib systems with the problems multilib
> causes.
>
> I started writing a reply suggesting we create multilib_script.bbclass
> and then realised it would also solve my libtool issue with multilib
> and kernel-devsrc.
>
> I've therefore written a patch which I've just sent out which fixes
> this kind of issue in libtool. You should be able to use the same
> mechanism for curl.
>
> That said, is it not possible to just patch curl-config to use pkg-
> config instead and remove the differences between the two multilib
> cases, thereby solving this problem in a better way?
>
> Cheers,
>
> Richard

Thanks, I will try with your patch way.

>

-- 
BRs

Sandy(Li Changqing)
+861084778653




More information about the Openembedded-core mailing list