qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Richard Henderson <richard.henderson@linaro.org>,
	Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org,
	"Daniel P . Berrange" <berrange@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH 2/3] capstone: Allow version 3.0.5 again
Date: Mon, 16 May 2022 21:22:16 +0200	[thread overview]
Message-ID: <f8cd57a9-d560-b483-c9ff-8ffde755e80e@redhat.com> (raw)
In-Reply-To: <be93a9aa-4edf-3152-c225-19abc291afd2@linaro.org>

On 16/05/2022 21.14, Richard Henderson wrote:
> On 5/16/22 09:53, Peter Maydell wrote:
>>> https://lists.gnu.org/archive/html/qemu-devel/2020-09/msg07542.html
>>
>> Is that this one?
>> https://lore.kernel.org/qemu-devel/87wo0no0wz.fsf@linaro.org/
> 
> Could well be.
> 
>>
>> Did we find out why Ubuntu's capstone in particular fell over ?
> 
> I vaguely recall that it was a snapshot of a capstone prior to the 4.0 
> release.  The error message you quote above is because CAPSTONE_API is not 
> defined to something reasonable.  I don't have an ubuntu 18 system to 
> quickly look at.

I just had a try with our Ubuntu 18.04 docker container (as it has not been
removed yet) and my patches applied:

$ make docker-test-build@ubuntu1804 \
   EXTRA_CONFIGURE_OPTS=--enable-capstone
   ...
   Dependencies
     ...
     capstone                     : YES 3.0.4
     ...
[1023/3301] Compiling C object libcommon.fa.p/disas_capstone.c.o
FAILED: libcommon.fa.p/disas_capstone.c.o
cc -m64 -mcx16 -Ilibcommon.fa.p -I../src/common-user/host/x86_64 -I../src/dtc/libfdt -I../src/slirp -I../src/slirp/src -I/usr/include/capstone -I/usr/include/pixman-1 -I/usr/include/libpng16 -I/usr/include/spice-server -I/usr/include/spice-1 -I/usr/include/p11-kit-1 -I/usr/include/libusb-1.0 -I/usr/include/SDL2 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/gio-unix-2.0/ -I/usr/include/alsa -I/usr/include/virgl -I/usr/include/ncursesw -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/vte-2.91 -fdiagnostics-color=auto -Wall -Winvalid-pch -Werror -std=gnu11 -O2 -g -isystem /tmp/qemu-test/src/linux-headers -isystem linux-headers -iquote . -iquote /tmp/qemu-test/src -iquote /tmp/qemu-test/src/include -iquote /tmp/qemu-test/src/disas/libvixl -iquote /tmp/qemu-test/src/tcg/i386 -pthread -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wold-style-declaration -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-labels -Wexpansion-to-defined -Wimplicit-fallthrough=2 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -fPIE -D_GNU_SOURCE -D_DEFAULT_SOURCE -DNCURSES_WIDECHAR=1 -D_REENTRANT -Wno-undef -DSTRUCT_IOVEC_DEFINED -MD -MQ libcommon.fa.p/disas_capstone.c.o -MF libcommon.fa.p/disas_capstone.c.o.d -o libcommon.fa.p/disas_capstone.c.o -c ../src/disas/capstone.c
../src/disas/capstone.c:25:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘cap_skipdata_s390x_cb’
  cap_skipdata_s390x_cb(const uint8_t *code, size_t code_size,
  ^~~~~~~~~~~~~~~~~~~~~
../src/disas/capstone.c:49:17: error: ‘cap_skipdata_s390x_cb’ undeclared here (not in a function); did you mean ‘cap_skipdata_s390x’?
      .callback = cap_skipdata_s390x_cb
                  ^~~~~~~~~~~~~~~~~~~~~
                  cap_skipdata_s390x
ninja: build stopped: subcommand failed.
Makefile:163: recipe for target 'run-ninja' failed

So it seems like really only the capstone 3.0.4 from Ubuntu 18.04 is broken,
while this compiles fine with the capstone 3.0.5 from Ubuntu 20.04.

I think my patches should be ok to apply now that we dropped support
for Ubuntu 18.04.

  Thomas

  reply	other threads:[~2022-05-16 19:23 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-16 14:58 [RFC PATCH 0/3] Allow Capstone 3.0.5 again and remove the submodule Thomas Huth
2022-05-16 14:58 ` [PATCH 1/3] tests/vm: Add capstone to the NetBSD and OpenBSD VMs Thomas Huth
2022-05-17  5:37   ` Richard Henderson
2022-05-16 14:58 ` [PATCH 2/3] capstone: Allow version 3.0.5 again Thomas Huth
2022-05-16 15:46   ` Peter Maydell
2022-05-16 16:46     ` Richard Henderson
2022-05-16 16:53       ` Peter Maydell
2022-05-16 19:14         ` Richard Henderson
2022-05-16 19:22           ` Thomas Huth [this message]
2022-05-17  5:35             ` Richard Henderson
2022-05-17  5:40   ` Richard Henderson
2022-05-16 14:58 ` [PATCH 3/3] capstone: Remove the capstone submodule Thomas Huth
2022-05-17  5:42   ` Richard Henderson
2022-05-19 11:41   ` Peter Maydell
2022-05-23 12:15     ` Thomas Huth
2022-06-03  0:03       ` Richard Henderson
2022-06-03  0:56         ` Richard Henderson
2022-06-03  5:21           ` Thomas Huth
2022-06-03 13:48             ` Richard Henderson
2022-06-03 15:05               ` Thomas Huth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f8cd57a9-d560-b483-c9ff-8ffde755e80e@redhat.com \
    --to=thuth@redhat.com \
    --cc=berrange@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).