Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 843755 - dev-util/edb-debugger-1.3.0: fails to compile with dev-libs/capstone:0/5 - /.../Instruction.cpp: error: X86_INS_VCVTPD2DQX was not declared in this scope
Summary: dev-util/edb-debugger-1.3.0: fails to compile with dev-libs/capstone:0/5 - /....
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2022-05-11 09:39 UTC by Toralf Förster
Modified: 2022-09-13 17:15 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,21.10 KB, text/plain)
2022-05-11 09:39 UTC, Toralf Förster
Details
dev-util:edb-debugger-1.3.0:20220511-060109.log (dev-util:edb-debugger-1.3.0:20220511-060109.log,105.64 KB, text/plain)
2022-05-11 09:39 UTC, Toralf Förster
Details
emerge-history.txt.bz2 (emerge-history.txt.bz2,111.45 KB, application/x-bzip)
2022-05-11 09:39 UTC, Toralf Förster
Details
environment (environment,96.96 KB, text/plain)
2022-05-11 09:39 UTC, Toralf Förster
Details
etc.portage.tar.bz2 (etc.portage.tar.bz2,25.83 KB, application/x-bzip)
2022-05-11 09:39 UTC, Toralf Förster
Details
logs.tar.bz2 (logs.tar.bz2,3.99 KB, application/x-bzip)
2022-05-11 09:39 UTC, Toralf Förster
Details
temp.tar.bz2 (temp.tar.bz2,28.39 KB, application/x-bzip)
2022-05-11 09:39 UTC, Toralf Förster
Details
edb-debugger-1.3.0-drop-unsupported-instructions.patch (edb-debugger-1.3.0-drop-unsupported-instructions.patch,625 bytes, patch)
2022-08-21 15:03 UTC, Melker Narikka
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2022-05-11 09:39:42 UTC
too long lines were shrinked:

[48/233] /usr/bin/x86_64-pc-linux-gnu-g++ -DDEFAULT_PLUGIN_PATH=\"/usr/lib64/edb\" -DEDB_IS_32_BIT=false -DEDB_IS_64_BIT=true -DEDB_X86_64 -DGIT_BRANCH=Unknown -DHAVE_DOUBLE_CONVERSION -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_XMLPATTERNS_LIB -DQT_X
FAILED: src/CMakeFiles/edb.dir/capstone-edb/Instruction.cpp.o 
/usr/bin/x86_64-pc-linux-gnu-g++ -DDEFAULT_PLUGIN_PATH=\"/usr/lib64/edb\" -DEDB_IS_32_BIT=false -DEDB_IS_64_BIT=true -DEDB_X86_64 -DGIT_BRANCH=Unknown -DHAVE_DOUBLE_CONVERSION -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_XMLPATTERNS_LIB -DQT_XML_LIB -D
/var/tmp/portage/dev-util/edb-debugger-1.3.0/work/edb-debugger/src/capstone-edb/Instruction.cpp: In function bool CapstoneEDB::is_SIMD_PD(const Operand&)’:
/var/tmp/portage/dev-util/edb-debugger-1.3.0/work/edb-debugger/src/capstone-edb/Instruction.cpp:882:14: error: X86_INS_VCVTPD2DQX’ was not declared in this scope; did you mean X86_INS_VCVTPD2DQ’?
  882 |         case X86_INS_VCVTPD2DQX: // FIXME: what's this?
      |              ^~~~~~~~~~~~~~~~~~

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_no_multilib-j4-20220504-020004

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-9.3.1
 [2] x86_64-pc-linux-gnu-12.1.0 *
clang/llvm (if any):
clang version 14.0.3
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/14/bin
/usr/lib/llvm/14
14.0.3
Python 3.9.12
Available Ruby profiles:
  [1]   ruby26 (with Rubygems)
  [2]   ruby27 (with Rubygems)
  [3]   ruby31 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.60.0 *
The following VMs are available for generation-2:
*)	Eclipse Temurin JDK 11.0.14_p9 [openjdk-bin-11]
2)	Eclipse Temurin JDK 8.322_p06 [openjdk-bin-8]
Available Java Virtual Machines:
  [1]   openjdk-bin-8 
  [2]   openjdk-bin-11  system-vm

The Glorious Glasgow Haskell Compilation System, version 8.10.4
php cli:
  [1]   php7.4 *
  [2]   php8.0
  [3]   php8.1

  HEAD of ::gentoo
commit 5ebc7ebdea9efefe2e17460514dc51a76b18d1c9
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Wed May 11 04:18:22 2022 +0000

    2022-05-11 04:18:22 UTC

emerge -qpvO dev-util/edb-debugger
[ebuild   R   ] dev-util/edb-debugger-1.3.0  USE="-graphviz"
Comment 1 Toralf Förster gentoo-dev 2022-05-11 09:39:43 UTC
Created attachment 778094 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2022-05-11 09:39:44 UTC
Created attachment 778097 [details]
dev-util:edb-debugger-1.3.0:20220511-060109.log
Comment 3 Toralf Förster gentoo-dev 2022-05-11 09:39:45 UTC
Created attachment 778100 [details]
emerge-history.txt.bz2
Comment 4 Toralf Förster gentoo-dev 2022-05-11 09:39:47 UTC
Created attachment 778103 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2022-05-11 09:39:48 UTC
Created attachment 778106 [details]
etc.portage.tar.bz2
Comment 6 Toralf Förster gentoo-dev 2022-05-11 09:39:49 UTC
Created attachment 778109 [details]
logs.tar.bz2
Comment 7 Toralf Förster gentoo-dev 2022-05-11 09:39:50 UTC
Created attachment 778112 [details]
temp.tar.bz2
Comment 8 Melker Narikka 2022-08-21 15:03:29 UTC
Created attachment 800377 [details, diff]
edb-debugger-1.3.0-drop-unsupported-instructions.patch

This seems to be caused by >=dev-libs/capstone-5.0* no longer defining
X86_INS_VCVTPD2DQX and X86_INS_VCVTPD2PSX in /usr/include/capstone/x86.h.
Instead, the non-suffixed versions are still left in the header file. They also
happen to be in the same case group in the switch statement in the now failing
code. Attached is a simple patch to get it building again.
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-09-13 16:39:21 UTC
(In reply to Melker Narikka from comment #8)
> Created attachment 800377 [details, diff] [details, diff]
> edb-debugger-1.3.0-drop-unsupported-instructions.patch
> 
> This seems to be caused by >=dev-libs/capstone-5.0* no longer defining
> X86_INS_VCVTPD2DQX and X86_INS_VCVTPD2PSX in /usr/include/capstone/x86.h.
> Instead, the non-suffixed versions are still left in the header file. They
> also
> happen to be in the same case group in the switch statement in the now
> failing
> code. Attached is a simple patch to get it building again.

Yeah, it got dropped in https://github.com/capstone-engine/capstone/commit/dd91f03fef5102492352756e2adb5972dd79a70f but there's no explanation in the commit message.

I see some other capstone consumers like triton had to just drop the use too (used a macro based on capstone version): https://github.com/JonathanSalwan/Triton/pull/1118.

Given all that, it seems harmless to just apply the patch here but slightly modified, which I'll do now.
Comment 10 Larry the Git Cow gentoo-dev 2022-09-13 16:56:09 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b044751f25eeeeabe1e9c636b2c071855cbf1dad

commit b044751f25eeeeabe1e9c636b2c071855cbf1dad
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-09-13 16:55:58 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-09-13 16:56:04 +0000

    dev-util/edb-debugger: fix build with Capstone 5
    
    .. and add missing double-conversion slot dep
    
    Closes: https://bugs.gentoo.org/843755
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-util/edb-debugger/edb-debugger-1.3.0.ebuild    |  3 ++-
 .../files/edb-debugger-1.3.0-capstone-5.patch      | 29 ++++++++++++++++++++++
 2 files changed, 31 insertions(+), 1 deletion(-)
Comment 11 Larry the Git Cow gentoo-dev 2022-09-13 17:02:48 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64a7e6368a18ce304f1dfa8a5862f577bd8927cf

commit 64a7e6368a18ce304f1dfa8a5862f577bd8927cf
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-09-13 17:01:59 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-09-13 17:02:42 +0000

    dev-util/edb-debugger: sync live
    
    Bug: https://bugs.gentoo.org/843755
    Signed-off-by: Sam James <sam@gentoo.org>

 ...r-1.3.0.ebuild => edb-debugger-1.3.0-r1.ebuild} | 13 ++++--
 dev-util/edb-debugger/edb-debugger-9999.ebuild     | 47 +++++++++++-----------
 dev-util/edb-debugger/metadata.xml                 |  3 --
 3 files changed, 34 insertions(+), 29 deletions(-)