DevHeads.net

Unannounced soname bump: libcapstone.so.3 -> libcapstone.so.4

<a href="https://koji.fedoraproject.org/koji/buildinfo?buildID=1178711" title="https://koji.fedoraproject.org/koji/buildinfo?buildID=1178711">https://koji.fedoraproject.org/koji/buildinfo?buildID=1178711</a>

This broke qemu, and indirectly libvirt.

I will submit a new build for qemu to see if that fixes things. I
didn't look closely to see if there are API changes.

Rich.

Comments

Re: Unannounced soname bump: libcapstone.so.3 -> libcapstone.so.

By Richard W.M. Jones at 01/11/2019 - 05:24

On Fri, Jan 11, 2019 at 09:14:29AM +0000, Richard W.M. Jones wrote:
The rebuild failed - it looks like there are some changes to capstone,
at least the location of the <capstone.h> headers file, which break
qemu source. I'll see if there's anything we can backport from
upstream.

<a href="https://koji.fedoraproject.org/koji/taskinfo?taskID=31952591" title="https://koji.fedoraproject.org/koji/taskinfo?taskID=31952591">https://koji.fedoraproject.org/koji/taskinfo?taskID=31952591</a>

Rich.

Re: Unannounced soname bump: libcapstone.so.3 -> libcapstone.so.

By Daniel P. Berrange at 01/11/2019 - 05:30

On Fri, Jan 11, 2019 at 09:24:12AM +0000, Richard W.M. Jones wrote:
The headers haven't moved. It looks like the capstone pkgconfig file is
broken.

In 3.0.5 it had

includedir=/usr/include/capstone

In 4.0.1 is has

includedir=/usr/include

Regards,
Daniel

Re: Unannounced soname bump: libcapstone.so.3 -> libcapstone.so.

By Richard W.M. Jones at 01/11/2019 - 05:40

On Fri, Jan 11, 2019 at 09:30:29AM +0000, Daniel P. Berrangé wrote:
While I don't disagree that this file looks broken, it does seem as if
capstone wants you to use <capstone/capstone.h>. See the tests, for
example:

<a href="https://github.com/aquynh/capstone/blob/master/tests/test_basic.c" title="https://github.com/aquynh/capstone/blob/master/tests/test_basic.c">https://github.com/aquynh/capstone/blob/master/tests/test_basic.c</a>

The below patch fixes qemu when using the system capstone, but
probably breaks when using the git-submodule capstone. However I'll
drop this in as a *temporary* workaround to get Fedora building.

Rich.

diff --git a/include/disas/capstone.h b/include/disas/capstone.h
index 84e214956d..2eb6be222b 100644
--- a/include/disas/capstone.h
+++ b/include/disas/capstone.h
@@ -3,7 +3,7 @@

#ifdef CONFIG_CAPSTONE

-#include <capstone.h>
+#include <capstone/capstone.h>

#else

Re: Unannounced soname bump: libcapstone.so.3 -> libcapstone.so.

By Daniel P. Berrange at 01/11/2019 - 05:43

On Fri, Jan 11, 2019 at 09:40:59AM +0000, Richard W.M. Jones wrote:
We should really just fix the pkg-config file in capstone locally.

I've filed a bug in upstream capstone, as they really do intend
includedir=/usr/include/capstone to be used.

<a href="https://github.com/aquynh/capstone/issues/1339" title="https://github.com/aquynh/capstone/issues/1339">https://github.com/aquynh/capstone/issues/1339</a>

Regards,
Daniel

Re: Unannounced soname bump: libcapstone.so.3 -> libcapstone.so.

By =?UTF-8?Q?Bj=c3... at 01/11/2019 - 06:18

Am Freitag, den 11.01.2019, 09:43 +0000 schrieb Daniel P. Berrangé:
Index: capstone-4.0.1/Makefile
===================================================================
--- capstone-4.0.1.orig/Makefile
+++ capstone-4.0.1/Makefile
@@ -517,5 +517,5 @@ define generate-pkgcfg
echo 'includedir=$(INCDIR)' >> $(PKGCFGF)
echo 'archive=$${libdir}/libcapstone.a' >> $(PKGCFGF)
echo 'Libs: -L$${libdir} -lcapstone' >> $(PKGCFGF)
- echo 'Cflags: -I$${includedir}' >> $(PKGCFGF)
+ echo 'Cflags: -I$${includedir}/$(LIBNAME)' >> $(PKGCFGF)
endef

Re: Unannounced soname bump: libcapstone.so.3 -> libcapstone.so.

By Richard W.M. Jones at 01/12/2019 - 03:32

This was fixed upstream in capstone. I'm rebuilding capstone &
qemu (again) now.

Rich.

Re: Unannounced soname bump: libcapstone.so.3 -> libcapstone.so.

By =?us-ascii?Q?Mi... at 01/14/2019 - 20:12

Thank you.

Michal Ambroz

---------- Původní e-mail ----------
Od: Richard W.M. Jones < ... at redhat dot com>
Komu: Björn'besser82' Esser < ... at fedoraproject dot org>
Datum: 12. 1. 2019 8:35:45
Předmět: Re: Unannounced soname bump: libcapstone.so.3 -> libcapstone.so.4
"
This was fixed upstream in capstone. I'm rebuilding capstone &
qemu (again) now.

Rich.

Re: Unannounced soname bump: libcapstone.so.3 -> libcapstone.so.

By Daniel P. Berrange at 01/11/2019 - 05:39

On Fri, Jan 11, 2019 at 09:30:29AM +0000, Daniel P. Berrangé wrote:
It seems they fixed this problem upstream in:

<a href="https://github.com/aquynh/capstone/pull/1276/commits/851c0ebdcd8f92a2845d03d901776731dfb42b2a" title="https://github.com/aquynh/capstone/pull/1276/commits/851c0ebdcd8f92a2845d03d901776731dfb42b2a">https://github.com/aquynh/capstone/pull/1276/commits/851c0ebdcd8f92a2845...</a>

except the capstone.pc.in file is only used when building capstone
with cmake. Our RPM builds it with plain make, and that calls
a generate-pkgconfig rule which is still broken.

Regards,
Daniel