Skip to contentSkip to conversation

Fix unable to detect libpci

PATCH Applied Sheng Yang 3 participants 3 messages Nov 13, 2009 – Nov 15, 2009 KVM

lore
Share & tools
lore

Sheng Yang

author
#0 lore raw

PATCH 1/1 Fix unable to detect libpci

commit 75fe7882 "Test for libpci, not only for header" compile a libpci test file. But the pciutils with defined PCI_COMPRESSED_IDS also need zlib when compile, otherwise the compile would fail, and detection fail then

CC Juan Quintela <[email protected]>
---
 configure |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
configure +2 -2
index 9d3b840..5b08367 100755
@@ -1477,8 +1477,8 @@ if test $kvm_cap_device_assignment = "yes" ; then
 #endif
 int main(void) { struct pci_access a; pci_init(&a); return 0; }
 EOF
-  if compile_prog "" "-lpci" ; then
-    libs_softmmu="-lpci $libs_softmmu"
+  if compile_prog "" "-lpci -lz" ; then
+    libs_softmmu="-lpci -lz $libs_softmmu"
   else
     echo
     echo "Error: libpci check failed"
Signature · 1 line
1.5.4.5
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Sheng Yang

commit 75fe7882 "Test for libpci, not only for header" compile a libpci test file. But the pciutils with defined PCI_COMPRESSED_IDS also need zlib when compile, otherwise the compile would fail, and detection fail then

CC Juan Quintela <[email protected]>

configure already requires -lz sooner, i.e. nothing new, and everything execpt *-user links with -lz already.

Later, Juan.

Quoted 19 lines
---
 configure |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
configure +2 -2
index 9d3b840..5b08367 100755
@@ -1477,8 +1477,8 @@ if test $kvm_cap_device_assignment = "yes" ; then
 #endif
 int main(void) { struct pci_access a; pci_init(&a); return 0; }
 EOF
-  if compile_prog "" "-lpci" ; then
-    libs_softmmu="-lpci $libs_softmmu"
+  if compile_prog "" "-lpci -lz" ; then
+    libs_softmmu="-lpci -lz $libs_softmmu"
   else
     echo
     echo "Error: libpci check failed"
Applied
#2 lore raw
In reply to Sheng Yang
Quoted 4 lines · Sheng Yang

commit 75fe7882 "Test for libpci, not only for header" compile a libpci test file. But the pciutils with defined PCI_COMPRESSED_IDS also need zlib when compile, otherwise the compile would fail, and detection fail then

Applied, thanks.

Signature · 1 line
error compiling committee.c: too many arguments to function