Package Details: gdb-multiarch 12.1-1

Git Clone URL: https://aur.archlinux.org/gdb-multiarch.git (read-only, click to copy)
Package Base: gdb-multiarch
Description: The GNU Debugger for all gdb supported architectures (i386/arm/mips...)
Upstream URL: http://www.gnu.org/software/gdb/
Licenses: GPL3
Submitter: aviel
Maintainer: aviel
Last Packager: aviel
Votes: 20
Popularity: 0.109076
First Submitted: 2017-11-08 12:09 (UTC)
Last Updated: 2022-05-15 08:01 (UTC)

Latest Comments

1 2 3 Next › Last »

VorpalGun commented on 2022-09-10 11:21 (UTC)

Unfortunately the build fails if lto is enabled. The output is a bit mangled due to make -j32 and the parallel subprocesses outputting on top of each other.

../../opcodes/../../opcodes/ft32-dis.c:30:30: error: type of ‘ft32_opc_info’ does not match original declaration [-Werror=lto-type-mismatch]
   30 | extern const ft32_opc_info_t ft32_opc_info[128];
      |                              ^
../../opcodes/../../opcodes/ft32-opc.c:25:23: note: array types have different bounds
   25 | const ft32_opc_info_t ft32_opc_info[] =
      |                       ^
../../opcodes/../../opcodes/ft32-opc.c:25:23: note: ‘ft32_opc_info’ was previously declared here

lto1: all warnings being treated as errors
lto-wrapper: fatal error: gcc returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:270: run] Error 1
make[4]: Leaving directory '/build/gdb-multiarch/src/gdb-12.1/build/sim/bpf'
make[3]: *** [Makefile:1872: all-recursive] Error 1
make[3]: Leaving directory '/build/gdb-multiarch/src/gdb-12.1/build/sim'
make[2]: *** [Makefile:1174: all] Error 2
make[2]: Leaving directory '/build/gdb-multiarch/src/gdb-12.1/build/sim'
make[1]: *** [Makefile:9572: all-sim] Error 2
make[1]: *** Waiting for unfinished jobs....

Adding !lto to options solves this. However I suspect this is not the correct solution as the standard gdb is not built with !lto.

Gamesmes90 commented on 2022-04-15 15:00 (UTC)

I edited the PKGBUILD to automatically apply the patch

# Maintainer: Aviel Warschawski <mail@aviel.org>

pkgname=gdb-multiarch
pkgver=11.2
pkgrel=1
pkgdesc='The GNU Debugger for all gdb supported architectures (i386/arm/mips...)'
arch=(i686 x86_64) # Cross compile it if you can :)
url='http://www.gnu.org/software/gdb/'
license=(GPL3)
depends=(xz ncurses expat python guile gdb-common=$pkgver)
options=(!emptydirs)
source=(https://ftp.gnu.org/gnu/gdb/gdb-11.2.tar.xz{,.sig})
sha256sums=('1497c36a71881b8671a9a84a0ee40faab788ca30d7ba19d8463c3cc787152e32'
            'SKIP')
validpgpkeys=('F40ADB902B24264AA42E50BF92EDB04BFF325CF3') # Joel Brobecker <brobecker@adacore.com>

prepare() {
  cd gdb-$pkgver
  sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure

  wget "https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=a532eb7277ff64fb073e209d418b0a97f686c0e3" -O ../../gdb-patch.patch # Donwload the patch
  patch -p1 <../../gdb-patch.patch || true #Apply the patch
}

build() {
  # Comment these lines if you don't need to compile
  cd gdb-$pkgver

  mkdir -p build && cd build
  ../configure \
    --enable-targets=all \
    --prefix=/build \
    --enable-languages=all \
    --enable-multilib \
    --enable-interwork \
    --with-system-readline \
    --disable-nls \
    --with-python=/usr/bin/python \
    --with-guile=guile-2.2 \
    --with-system-gdbinit=/etc/gdb/gdbinit

  make
}

package() {
  cd gdb-$pkgver/build

  make DESTDIR="$pkgdir" install

  # Following files conflict with 'gdb' package
  mkdir -p "$pkgdir"/usr/bin
  mv "$pkgdir"/build/bin/gdb "$pkgdir"/usr/bin/gdb-multiarch
  rm -r "$pkgdir"/build
}

misz commented on 2022-03-04 07:06 (UTC) (edited on 2022-03-04 07:09 (UTC) by misz)

Patch to fix building with glibc 2.35 available in commit a532eb7277ff64fb073e209d418b0a97f686c0e3.

Link: https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=a532eb7277ff64fb073e209d418b0a97f686c0e3

Here is a version of the patch applicable to the package:

diff --git a/opcodes/microblaze-opc.h b/opcodes/microblaze-opc.h
index 81bf2e19548..ffb0f08c692 100644
--- a/opcodes/microblaze-opc.h
+++ b/opcodes/microblaze-opc.h
@@ -268,7 +268,7 @@ const struct op_code_struct
   {"fcmp.un", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000200, OPCODE_MASK_H4, fcmp_un, arithmetic_inst },
   {"flt",   INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000280, OPCODE_MASK_H4, flt,   arithmetic_inst },
   {"fint",  INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000300, OPCODE_MASK_H4, fint,  arithmetic_inst },
-  {"fsqrt", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000380, OPCODE_MASK_H4, fsqrt, arithmetic_inst },
+  {"fsqrt", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000380, OPCODE_MASK_H4, microblaze_fsqrt, arithmetic_inst },
   {"tget",   INST_TYPE_RD_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C001000, OPCODE_MASK_H32, tget,   anyware_inst },
   {"tcget",  INST_TYPE_RD_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C003000, OPCODE_MASK_H32, tcget,  anyware_inst },
   {"tnget",  INST_TYPE_RD_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C005000, OPCODE_MASK_H32, tnget,  anyware_inst },
diff --git a/opcodes/microblaze-opcm.h b/opcodes/microblaze-opcm.h
index 1b0955c4e0f..8e293465fec 100644
--- a/opcodes/microblaze-opcm.h
+++ b/opcodes/microblaze-opcm.h
@@ -42,7 +42,8 @@ enum microblaze_instr
   shr, sw, swr, swx, lbui, lhui, lwi,
   sbi, shi, swi, msrset, msrclr, tuqula, mbi_fadd, frsub, mbi_fmul, mbi_fdiv,
   fcmp_lt, fcmp_eq, fcmp_le, fcmp_gt, fcmp_ne, fcmp_ge, fcmp_un, flt,
-  fint, fsqrt,
+  /* 'fsqrt' is a glibc:math.h symbol.  */
+  fint, microblaze_fsqrt,
   tget, tcget, tnget, tncget, tput, tcput, tnput, tncput,
   eget, ecget, neget, necget, eput, ecput, neput, necput,
   teget, tecget, tneget, tnecget, teput, tecput, tneput, tnecput,
-- 
2.27.0

USRapt0r commented on 2022-03-03 21:23 (UTC)

Anyone else getting this?

In file included from /home/<user>/.cache/yay/gdb-multiarch/src/gdb-11.2/build/sim/../../sim/microblaze/microblaze.h:21,
                 from /home/<user>/.cache/yay/gdb-multiarch/src/gdb-11.2/build/sim/../../sim/microblaze/sim-main.h:21,
                 from /home/<user>/.cache/yay/gdb-multiarch/src/gdb-11.2/build/sim/../../sim/microblaze/../common/dv-cfi.c:37:
/home/<user>/.cache/yay/gdb-multiarch/src/gdb-11.2/build/sim/../../sim/microblaze/../../opcodes/microblaze-opcm.h:45:9: error: ‘fsqrt’ redeclared as different kind of symbol
   45 |   fint, fsqrt,
      |         ^~~~~
In file included from ../../gnulib/import/math.h:41,
                 from /home/<user>/.cache/yay/gdb-multiarch/src/gdb-11.2/build/sim/../../sim/microblaze/../common/dv-cfi.c:28:
/usr/include/bits/mathcalls-narrow.h:36:20: note: previous declaration of ‘fsqrt’ with type ‘float(double)’
   36 | __MATHCALL_NARROW (__MATHCALL_NAME (sqrt), __MATHCALL_REDIR_NAME2 (sqrt), 1);
      |                    ^~~~~~~~~~~~~~~
make[4]: *** [Makefile:513: dv-cfi.o] Error 1
make[4]: Leaving directory '/home/<user>/.cache/yay/gdb-multiarch/src/gdb-11.2/build/sim/microblaze'
make[3]: *** [Makefile:1271: all-recursive] Error 1
make[3]: Leaving directory '/home/<user>/.cache/yay/gdb-multiarch/src/gdb-11.2/build/sim'
make[2]: *** [Makefile:898: all] Error 2
make[2]: Leaving directory '/home/<user>/.cache/yay/gdb-multiarch/src/gdb-11.2/build/sim'
make[1]: *** [Makefile:8031: all-sim] Error 2
make[1]: Leaving directory '/home/<user>/.cache/yay/gdb-multiarch/src/gdb-11.2/build'
make: *** [Makefile:903: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...

vleon1 commented on 2022-02-16 17:06 (UTC) (edited on 2022-02-16 17:06 (UTC) by vleon1)

aarch64 works (if you want to add it) but pgp key validation doesn't on my pi 400 (could it even be related? I mean it is the same file). So I had to remove the pgp part to be able to build the package.

Forgot to mention that I am on manjaro for arm, not arch.

nihonsuki commented on 2022-01-26 19:50 (UTC) (edited on 2022-01-27 10:06 (UTC) by nihonsuki)

Missing dependencies: -> gdb-common=11.2

Appears to be a Manjaro issue as gdb-common 11.2 is available in Extra

Will remove when Manjaro catches up.

antoniovazquez commented on 2021-12-20 18:14 (UTC) (edited on 2021-12-20 18:15 (UTC) by antoniovazquez)

I confirm the issue and that the proposed solution by @vmarangoni works.

vmarangoni commented on 2021-09-20 03:48 (UTC)

I was getting this error:

┌─╼ arch [/tmp/gdb/gdb-multiarch]
└────╼ gdb-multiarch 
Exception caught while booting Guile.
Error in function "make_objcode_from_file":
bad header on object file: "\x7fELF\x02\x01\x01ÿ\x00\x00\x00\x00\x00\x00\x00\x00"
gdb-multiarch: warning: Could not complete Guile gdb module initialization from:
/usr/share/gdb/guile/gdb/boot.scm.
Limited Guile support is available.
Suggest passing --data-directory=/path/to/gdb/data-directory.
GNU gdb (GDB) 11.1

After searching about it I've found this thread reporting the same problem with arm-none-eabi-gdb: https://bbs.archlinux.org/viewtopic.php?id=260681

I've modified PKGBUILD as mentioned in that thread the problem was solved. You can find below the diff what fixes the issue:

┌─╼ arch [/tmp/gdb]
└────╼ diff gdb-multiarch/PKGBUILD gdb-multiarch-fix/PKGBUILD 
10c10
< depends=(xz ncurses expat python guile2.0 gdb-common=$pkgver)
---
> depends=(xz ncurses expat python guile gdb-common=$pkgver)
35c35
<     --with-guile=guile-2.0 \
---
>     --with-guile=guile-2.2 \

legalize_ranch commented on 2021-09-17 05:30 (UTC)

While this is no updated in AUR you can do it manually:

From fbd48b0325adf98086187363a2b9a971f1c16842 Mon Sep 17 00:00:00 2001
Subject: [PATCH] update to 11.1

---
 PKGBUILD | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/PKGBUILD b/PKGBUILD
index 5e97937..69ec30a 100755
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
 # Maintainer: Aviel Warschawski <mail@aviel.org>

 pkgname=gdb-multiarch
-pkgver=10.2
+pkgver=11.1
 pkgrel=1
 pkgdesc='The GNU Debugger for all gdb supported architectures (i386/arm/mips...)'
 arch=(i686 x86_64)
@@ -9,8 +9,8 @@ url='http://www.gnu.org/software/gdb/'
 license=(GPL3)
 depends=(xz ncurses expat python guile2.0 gdb-common=$pkgver)
 options=(!emptydirs)
-source=(https://ftp.gnu.org/gnu/gdb/gdb-10.2.tar.xz{,.sig})
-sha256sums=('aaa1223d534c9b700a8bec952d9748ee1977513f178727e1bee520ee000b4f29'
+source=(https://ftp.gnu.org/gnu/gdb/gdb-11.1.tar.xz{,.sig})
+sha256sums=('cccfcc407b20d343fb320d4a9a2110776dd3165118ffd41f4b1b162340333f94'
             'SKIP')
 validpgpkeys=('F40ADB902B24264AA42E50BF92EDB04BFF325CF3') # Joel Brobecker <brobecker@adacore.com>

-- 
2.33.0

greedisgood commented on 2021-09-11 18:50 (UTC)

gdb crashed a lot for me, so I had to change the --with-python option from /usr/bin/python to /usr/bin/python2