Skip to contentSkip to conversation

"Unknown option --exist" message when building qemu

DISCUSSION Guenter Roeck 3 participants 4 messages Mar 10, 2020

lore
Share & tools
lore
#0 lore raw

Hi,

when building qemu, I keep seeing the following message.

Unknown option --exist

This was introduced with commit 3a67848134d0 ("configure: Enable test and libs for zstd"). If I replace "--exist" with "--exists", on a system with libzstd-dev installed, I get a number of error messages.

migration/multifd-zstd.c:125:9: error: unknown type name ‘ZSTD_EndDirective’; did you mean ‘ZSTD_DDict’? migration/multifd-zstd.c:125:35: error: ‘ZSTD_e_continue’ undeclared migration/multifd-zstd.c:128:21: error: ‘ZSTD_e_flush’ undeclared migration/multifd-zstd.c:143:19: error: implicit declaration of function ‘ZSTD_compressStream2’ migration/multifd-zstd.c:143:19: error: nested extern declaration of ‘ZSTD_compressStream2’

Any idea, anyone, what might be wrong ?

Thanks,
Guenter

#1 lore raw
Quoted 10 lines · * Guenter Roeck ([email protected]) wrote:

Hi,

when building qemu, I keep seeing the following message.

Unknown option --exist

This was introduced with commit 3a67848134d0 ("configure: Enable test and libs for zstd"). If I replace "--exist" with "--exists", on a system with libzstd-dev installed, I get a number of error messages.

Quoted 7 lines

migration/multifd-zstd.c:125:9: error: unknown type name ‘ZSTD_EndDirective’; did you mean ‘ZSTD_DDict’? migration/multifd-zstd.c:125:35: error: ‘ZSTD_e_continue’ undeclared migration/multifd-zstd.c:128:21: error: ‘ZSTD_e_flush’ undeclared migration/multifd-zstd.c:143:19: error: implicit declaration of function ‘ZSTD_compressStream2’ migration/multifd-zstd.c:143:19: error: nested extern declaration of ‘ZSTD_compressStream2’

Any idea, anyone, what might be wrong ?

Yep, Juan's just trying to fix it.

Dave

Quoted 3 lines

Thanks,
Guenter

--
Dr. David Alan Gilbert / [email protected] / Manchester, UK

#2 lore raw
In reply to Guenter Roeck
Quoted 11 lines · Guenter Roeck

Hi,

when building qemu, I keep seeing the following message.

Unknown option --exist

This was introduced with commit 3a67848134d0 ("configure: Enable test and libs for zstd").
If I replace "--exist" with "--exists", on a system with libzstd-dev installed, I get
a number of error messages.

Patch is on the line already. You need to change the test to:

if test "$zstd" != "no" ; then

-    if $pkg_config --exist libzstd ; then
+    libzstd_minver="1.4.0"
+    if $pkg_config --atleast-version=$libzstd_minver libzstd ; then
         zstd_cflags="$($pkg_config --cflags libzstd)"

It is not enough with having zstd installed, you need to have version 1.4.0 for it to work.

Sorry, Juan.

Quoted 14 lines

migration/multifd-zstd.c:125:9: error: unknown type name ‘ZSTD_EndDirective’; did you mean ‘ZSTD_DDict’? migration/multifd-zstd.c:125:35: error: ‘ZSTD_e_continue’ undeclared migration/multifd-zstd.c:128:21: error: ‘ZSTD_e_flush’ undeclared migration/multifd-zstd.c:143:19: error: implicit declaration of function ‘ZSTD_compressStream2’ migration/multifd-zstd.c:143:19: error: nested extern declaration of ‘ZSTD_compressStream2’

Any idea, anyone, what might be wrong ?

Thanks,
Guenter

#3 lore raw
Quoted 21 lines · Juan Quintela
Quoted 11 lines · Guenter Roeck

Hi,

when building qemu, I keep seeing the following message.

Unknown option --exist

This was introduced with commit 3a67848134d0 ("configure: Enable test and libs for zstd").
If I replace "--exist" with "--exists", on a system with libzstd-dev installed, I get
a number of error messages.

Patch is on the line already. You need to change the test to:

if test "$zstd" != "no" ; then

(quoted diff) +2 -1
-    if $pkg_config --exist libzstd ; then
+    libzstd_minver="1.4.0"
+    if $pkg_config --atleast-version=$libzstd_minver libzstd ; then
         zstd_cflags="$($pkg_config --cflags libzstd)"
Quoted 3 lines

It is not enough with having zstd installed, you need to have version 1.4.0 for it to work.

Quoted 1 line

Sorry, Juan.

No problem; I can live with the message. I just wanted to make sure that it gets fixed if there was a problem.

Thanks,
Guenter