[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 07/10] configure: fix check for libzstd
From: |
Juan Quintela |
Subject: |
Re: [PATCH v1 07/10] configure: fix check for libzstd |
Date: |
Thu, 05 Mar 2020 10:43:08 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Alex Bennée <address@hidden> wrote:
> Alex Bennée <address@hidden> writes:
>
>> Fixes: 3a67848134d0
>> Signed-off-by: Alex Bennée <address@hidden>
>> ---
>> configure | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/configure b/configure
>> index 7b373bc0bb8..caa65f58831 100755
>> --- a/configure
>> +++ b/configure
>> @@ -2464,7 +2464,7 @@ fi
>> # zstd check
>>
>> if test "$zstd" != "no" ; then
>> - if $pkg_config --exist libzstd ; then
>> + if $pkg_config --exists libzstd ; then
Hi
several things:
a- I found why I didn't get the error. Fedora pkg-config is really
"smart":
b- I have tried (with this patch), the following configurations:
* --enable-zstd
* --disable-zstd
with both libzstd-devel installed and not installed. Everything
worked as expected.
(BTW, I tested that before submmiting the patch in the first place, I
thought that I had done all testing needed for such a check).
Can you told me what architecture/distro/os are you using.
> Dropping this patch as it breaks the build even more!
>
> CC migration/block.o
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:24:5: error: unknown
> type name ‘ZSTD_CStream’
>
> ZSTD_CStream *zcs;
>
> ^
This is really weird. if you arrive here, that means:
- you have zstd devel installed (whatever is that called for your
os/distro/whatever).
- pkg-config has found zstd devel packages and configured them (that
file depends on CONFiG_ZSTD beoing defined)
- gcc has found <zstd.h> (i.e. it don't give one error about that
include file not found).
And zstd don't have ZSTD_CStream defined? What is going on here?
Can you post/show what is on your zstd.h file?
What zstd library version do you have?
I thought that zstd was a new library, and that we didn't need to check
for versions. It appears that I was wrong. And no, the include file
don't show what features are new/old.
Sorry for the inconveniences.
Later, Juan.
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:26:5: error: unknown
> type name ‘ZSTD_DStream’
>
> ZSTD_DStream *zds;
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:28:5: error: unknown
> type name ‘ZSTD_inBuffer’
>
> ZSTD_inBuffer in;
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:29:5: error: unknown
> type name ‘ZSTD_outBuffer’
>
> ZSTD_outBuffer out;
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c: In function
> ‘zstd_send_setup’:
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:55:14: error:
> implicit declaration of function ‘ZSTD_createCStream’
> [-Werror=implicit-function-declaration]
>
> z->zcs = ZSTD_createCStream();
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:55:5: error: nested
> extern declaration of ‘ZSTD_createCStream’ [-Werror=nested-externs]
>
> z->zcs = ZSTD_createCStream();
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:55:12: error:
> assignment makes pointer from integer without a cast [-Werror=int-conversion]
>
> z->zcs = ZSTD_createCStream();
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:62:11: error:
> implicit declaration of function ‘ZSTD_initCStream’
> [-Werror=implicit-function-declaration]
>
> res = ZSTD_initCStream(z->zcs, migrate_multifd_zstd_level());
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:62:5: error: nested
> extern declaration of ‘ZSTD_initCStream’ [-Werror=nested-externs]
>
> res = ZSTD_initCStream(z->zcs, migrate_multifd_zstd_level());
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:64:9: error:
> implicit declaration of function ‘ZSTD_freeCStream’
> [-Werror=implicit-function-declaration]
>
> ZSTD_freeCStream(z->zcs);
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:64:9: error: nested
> extern declaration of ‘ZSTD_freeCStream’ [-Werror=nested-externs]
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c: In function
> ‘zstd_send_prepare’:
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:120:11: error:
> request for member ‘dst’ in something not a structure or union
>
> z->out.dst = z->zbuff;
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:121:11: error:
> request for member ‘size’ in something not a structure or union
>
> z->out.size = z->zbuff_len;
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:122:11: error:
> request for member ‘pos’ in something not a structure or union
>
> z->out.pos = 0;
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:125:9: error:
> unknown type name ‘ZSTD_EndDirective’
>
> ZSTD_EndDirective flush = ZSTD_e_continue;
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:125:35: error:
> ‘ZSTD_e_continue’ undeclared (first use in this function)
>
> ZSTD_EndDirective flush = ZSTD_e_continue;
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:125:35: note: each
> undeclared identifier is reported only once for each function it appears in
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:128:21: error:
> ‘ZSTD_e_flush’ undeclared (first use in this function)
>
> flush = ZSTD_e_flush;
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:130:14: error:
> request for member ‘src’ in something not a structure or union
>
> z->in.src = iov[i].iov_base;
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:131:14: error:
> request for member ‘size’ in something not a structure or union
>
> z->in.size = iov[i].iov_len;
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:132:14: error:
> request for member ‘pos’ in something not a structure or union
>
> z->in.pos = 0;
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:143:19: error:
> implicit declaration of function ‘ZSTD_compressStream2’
> [-Werror=implicit-function-declaration]
>
> ret = ZSTD_compressStream2(z->zcs, &z->out, &z->in, flush);
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:143:13: error:
> nested extern declaration of ‘ZSTD_compressStream2’ [-Werror=nested-externs]
>
> ret = ZSTD_compressStream2(z->zcs, &z->out, &z->in, flush);
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:144:35: error:
> request for member ‘size’ in something not a structure or union
>
> } while (ret > 0 && (z->in.size - z->in.pos > 0)
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:144:48: error:
> request for member ‘pos’ in something not a structure or union
>
> } while (ret > 0 && (z->in.size - z->in.pos > 0)
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:145:36: error:
> request for member ‘size’ in something not a structure or union
>
> && (z->out.size - z->out.pos > 0));
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:145:50: error:
> request for member ‘pos’ in something not a structure or union
>
> && (z->out.size - z->out.pos > 0));
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:146:30: error:
> request for member ‘size’ in something not a structure or union
>
> if (ret > 0 && (z->in.size - z->in.pos > 0)) {
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:146:43: error:
> request for member ‘pos’ in something not a structure or union
>
> if (ret > 0 && (z->in.size - z->in.pos > 0)) {
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:157:33: error:
> request for member ‘pos’ in something not a structure or union
>
> p->next_packet_size = z->out.pos;
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c: In function
> ‘zstd_recv_setup’:
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:199:14: error:
> implicit declaration of function ‘ZSTD_createDStream’
> [-Werror=implicit-function-declaration]
>
> z->zds = ZSTD_createDStream();
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:199:5: error: nested
> extern declaration of ‘ZSTD_createDStream’ [-Werror=nested-externs]
>
> z->zds = ZSTD_createDStream();
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:199:12: error:
> assignment makes pointer from integer without a cast [-Werror=int-conversion]
>
> z->zds = ZSTD_createDStream();
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:206:11: error:
> implicit declaration of function ‘ZSTD_initDStream’
> [-Werror=implicit-function-declaration]
>
> ret = ZSTD_initDStream(z->zds);
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:206:5: error: nested
> extern declaration of ‘ZSTD_initDStream’ [-Werror=nested-externs]
>
> ret = ZSTD_initDStream(z->zds);
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:208:9: error:
> implicit declaration of function ‘ZSTD_freeDStream’
> [-Werror=implicit-function-declaration]
>
> ZSTD_freeDStream(z->zds);
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:208:9: error: nested
> extern declaration of ‘ZSTD_freeDStream’ [-Werror=nested-externs]
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c: In function
> ‘zstd_recv_pages’:
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:281:10: error:
> request for member ‘src’ in something not a structure or union
>
> z->in.src = z->zbuff;
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:282:10: error:
> request for member ‘size’ in something not a structure or union
>
> z->in.size = in_size;
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:283:10: error:
> request for member ‘pos’ in something not a structure or union
>
> z->in.pos = 0;
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:288:15: error:
> request for member ‘dst’ in something not a structure or union
>
> z->out.dst = iov->iov_base;
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:289:15: error:
> request for member ‘size’ in something not a structure or union
>
> z->out.size = iov->iov_len;
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:290:15: error:
> request for member ‘pos’ in something not a structure or union
>
> z->out.pos = 0;
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:301:19: error:
> implicit declaration of function ‘ZSTD_decompressStream’
> [-Werror=implicit-function-declaration]
>
> ret = ZSTD_decompressStream(z->zds, &z->out, &z->in);
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:301:13: error:
> nested extern declaration of ‘ZSTD_decompressStream’ [-Werror=nested-externs]
>
> ret = ZSTD_decompressStream(z->zds, &z->out, &z->in);
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:302:35: error:
> request for member ‘size’ in something not a structure or union
>
> } while (ret > 0 && (z->in.size - z->in.pos > 0)
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:302:48: error:
> request for member ‘pos’ in something not a structure or union
>
> } while (ret > 0 && (z->in.size - z->in.pos > 0)
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:303:36: error:
> request for member ‘pos’ in something not a structure or union
>
> && (z->out.pos < iov->iov_len));
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:304:31: error:
> request for member ‘pos’ in something not a structure or union
>
> if (ret > 0 && (z->out.pos < iov->iov_len)) {
>
> ^
>
> /home/travis/build/stsquad/qemu/migration/multifd-zstd.c:314:27: error:
> request for member ‘pos’ in something not a structure or union
>
> out_size += z->out.pos;
>
> ^
>
> cc1: all warnings being treated as errors
>
> /home/travis/build/stsquad/qemu/rules.mak:69: recipe for target
> 'migration/multifd-zstd.o' failed
>
> make: *** [migration/multifd-zstd.o] Error 1
>
> make: *** Waiting for unfinished jobs....
>
> rm tests/qemu-iotests/socket_scm_helper.o
>
>> zstd_cflags="$($pkg_config --cflags libzstd)"
>> zstd_libs="$($pkg_config --libs libzstd)"
>> LIBS="$zstd_libs $LIBS"
- Re: [PATCH v1 01/10] tests/vm: use $(PYTHON) consistently, (continued)
- [PATCH v1 02/10] tests/vm: Debug mode shows ssh output., Alex Bennée, 2020/03/02
- [PATCH v1 06/10] travis: enable tools build on OS X, Alex Bennée, 2020/03/02
- [PATCH v1 09/10] tests/acceptance: move @skipUnless decoration to test itself, Alex Bennée, 2020/03/02
- [PATCH v1 08/10] configure: detect and report genisoimage, Alex Bennée, 2020/03/02
- [PATCH v1 07/10] configure: fix check for libzstd, Alex Bennée, 2020/03/02
[PATCH v1 04/10] tests/vm: give wait_ssh() option to wait for root, Alex Bennée, 2020/03/02
[PATCH v1 03/10] tests/vm: increased max timeout for vm boot., Alex Bennée, 2020/03/02
[PATCH v1 05/10] tests/vm: Added gen_cloud_init_iso() to basevm.py, Alex Bennée, 2020/03/02
[PATCH v1 10/10] travis.yml: install python3 numpy and opencv libraries, Alex Bennée, 2020/03/02