qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] configure: Improve zstd test


From: Michal Prívozník
Subject: Re: [PATCH] configure: Improve zstd test
Date: Fri, 6 Mar 2020 09:49:59 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0

On 5. 3. 2020 16:27, Juan Quintela wrote:
> Alex Bennée <address@hidden> wrote:
>> Juan Quintela <address@hidden> writes:
>>
>>> There were one error on the test (missing an s for --exists).
>>> But we really need a recent zstd (0.8.1).
>>> That version was released in 2016, so it is newer that some of our travis
>>> images.  Just check for the version that we need.
>>>
>>> Signed-off-by: Juan Quintela <address@hidden>
>>> Reported-by: Richard Henderson <address@hidden>
>>> ---
>>>  configure | 3 ++-
>>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/configure b/configure
>>> index 7b373bc0bb..1bf48df1ef 100755
>>> --- a/configure
>>> +++ b/configure
>>> @@ -2464,7 +2464,8 @@ fi
>>>  # zstd check
>>>  
>>>  if test "$zstd" != "no" ; then
>>> -    if $pkg_config --exist libzstd ; then
>>> +    libzstd_minver="0.8.1"
>>> +    if $pkg_config --atleast-version=$libzstd_minver libzstd ; then
>>>          zstd_cflags="$($pkg_config --cflags libzstd)"
>>>          zstd_libs="$($pkg_config --libs libzstd)"
>>>          LIBS="$zstd_libs $LIBS"
>>
>> Hmm still breaks with:
>>
>>    make docker-test-build@ubuntu J=9 V=1
> 
> Thanks.
> 
>> With:
>>
>>   FY_SOURCE=2 -g   -c -o monitor/qmp.o /tmp/qemu-test/src/monitor/qmp.c
>>   /tmp/qemu-test/src/migration/multifd-zstd.c: In function 
>> 'zstd_send_prepare':
>>   /tmp/qemu-test/src/migration/multifd-zstd.c:125:9: error: unknown type 
>> name 'ZSTD_EndDirective'; did you mean 'ZSTD_DDict'?
>>            ZSTD_EndDirective flush = ZSTD_e_continue;
>>            ^~~~~~~~~~~~~~~~~
> 
> Greate, more things were introduced later.
> As it would be too easy, the zstd repository is not lineal, you need to
> checkout the tag you want to see when something has been introduced.
> 
> Will try to get this fixed.
> 
> Sorry for the inconveniences.
> 
> 
>>   Version: 1.3.8+dfsg-3
>>   Depends: libzstd1 (= 1.3.8+dfsg-3)
>>   Description: fast lossless compression algorithm -- development files
> 
> I don't undertsand now.
> 
> ZSTD_EndDirective was included in 1.3.0.
> 
> I can just change that for 1.3.9, but I don't know why is that there.
> Could you do a grep ZSTD_EndDirective /usr/lib/zstd.h?

Thing is, they have so called experimental APIs. You get them only if
you define ZSTD_STATIC_LINKING_ONLY before including zstd.h. So the
plain grep of a symbol tells us nothing. We need to check if it's not in
#ifdef. Looks like 1.3.9 is the minimal version which has everything we
want.

Michal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]