Package Details: gdb-multiarch 12.1-2

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: 19
Popularity: 0.011383
First Submitted: 2017-11-08 12:09 (UTC)
Last Updated: 2022-11-14 23:25 (UTC)

Latest Comments

1 2 3 Next › Last »

jcelerier commented on 2022-12-28 17:41 (UTC)

Build currently fails:

  CC     machs.o
In function ‘bfin_otp_transfer’,
    inlined from ‘bfin_otp_read_page’ at /home/jcelerier/.cache/yay/gdb-multiarch/src/gdb-12.1/build/sim/../../sim/bfin/dv-bfin_otp.c:77:3,
    inlined from ‘bfin_otp_io_write_buffer’ at /home/jcelerier/.cache/yay/gdb-multiarch/src/gdb-12.1/build/sim/../../sim/bfin/dv-bfin_otp.c:145:4:
/home/jcelerier/.cache/yay/gdb-multiarch/src/gdb-12.1/build/sim/../../sim/bfin/dv-bfin_otp.c:71:17: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
   71 |       dst[bidx] = src[bidx];
      |       ~~~~~~~~~~^~~~~~~~~~~

VorpalGun commented on 2022-11-15 18:44 (UTC)

Hi,

The build fails for me. As the build log is quite long, I have posted it to a pastebin. The relevant lines seem to be:

../../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

and

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

The full build log is at https://0x0.st/oIaV.log

Note: I'm building in a clean chroot using aurutils (analogous to using extra-x86_64-build from devtools). However, building outside a chroot with plain makepkg does not solve the issue.

kovdan01 commented on 2022-11-14 21:28 (UTC) (edited on 2022-11-14 21:32 (UTC) by kovdan01)

Hello @aviel . There are currently several issues with building the package:

  • current PKGBUILD implies guile library version 2.2, while it was updated to 3.0 recently; just removing that condition seems working nice (also, regular gdb is built in arch without guile version restriction);

  • there is a compiler error related to the readline library update leading to violating const-correctness rules, it is fixed in regular gdb build with the following patch https://github.com/archlinux/svntogit-packages/blob/packages/gdb/trunk/readline8.patch

I've fixed the issues. See the patch and the fixes description here: https://paste.debian.net/1260718/. Please consider applying the changes.

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.