Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 895430 - sys-devel/gdb: build failed on macOS 13 / Apple M1's Gentoo Prefix, confirmed upstream
Summary: sys-devel/gdb: build failed on macOS 13 / Apple M1's Gentoo Prefix, confirmed...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM64 OS X
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: https://inbox.sourceware.org/gdb/3185...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-19 15:01 UTC by Tom Li
Modified: 2023-09-04 20:34 UTC (History)
2 users (show)

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


Attachments
emerge output when building gdb (gdb_log,319.55 KB, text/plain)
2023-02-19 15:01 UTC, Tom Li
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Li 2023-02-19 15:01:40 UTC
Created attachment 853068 [details]
emerge output when building gdb

When building sys-devel/gdb-12.1-r4 in a Gentoo Prefix on macOS 13.2 (Ventura) running on an Apple M1 system, I've experienced a strange problem: no executables are built or installed.

make[3]: Leaving directory '/Users/ec2-user/gentoo/var/tmp/portage/sys-devel/gdb-12.1-r4/work/gdb-12.1/opcodes/po'
 * Optimize Python modules for /Users/ec2-user/gentoo/usr/share/gdb/python/gdb
Can't list '/Users/ec2-user/gentoo/var/tmp/portage/sys-devel/gdb-12.1-r4/image/Users/ec2-user/gentoo/usr/share/gdb/python/gdb'
>>> Completed installing sys-devel/gdb-12.1-r4 into /Users/ec2-user/gentoo/var/tmp/portage/sys-devel/gdb-12.1-r4/image

 * Final size of build directory: 246024 KiB (240.2 MiB)
 * Final size of installed tree:     396 KiB


>>> Installing (1 of 1) sys-devel/gdb-12.1-r4::gentoo_prefix
 * checking 7 files for package collisions
>>> Merging sys-devel/gdb-12.1-r4 to /
--- /Users/ec2-user/gentoo/usr/
--- /Users/ec2-user/gentoo/usr/share/
--- /Users/ec2-user/gentoo/usr/share/doc/
>>> /Users/ec2-user/gentoo/usr/share/doc/gdb-12.1-r4/
>>> /Users/ec2-user/gentoo/usr/share/doc/gdb-12.1-r4/sim/
>>> /Users/ec2-user/gentoo/usr/share/doc/gdb-12.1-r4/sim/MAINTAINERS.bz2
>>> /Users/ec2-user/gentoo/usr/share/doc/gdb-12.1-r4/sim/README-HACKING.bz2
>>> /Users/ec2-user/gentoo/usr/share/doc/gdb-12.1-r4/gdb/
>>> /Users/ec2-user/gentoo/usr/share/doc/gdb-12.1-r4/gdb/README.bz2
>>> /Users/ec2-user/gentoo/usr/share/doc/gdb-12.1-r4/gdb/MAINTAINERS.bz2
>>> /Users/ec2-user/gentoo/usr/share/doc/gdb-12.1-r4/gdb/PROBLEMS.bz2
>>> /Users/ec2-user/gentoo/usr/share/doc/gdb-12.1-r4/gdb/CONTRIBUTE.bz2
>>> /Users/ec2-user/gentoo/usr/share/doc/gdb-12.1-r4/gdb/NEWS.bz2
--- /Users/ec2-user/gentoo/usr/share/info/
>>> Safely unmerging already-installed instance...
No package files given... Grabbing a set.
<<<          obj /Users/ec2-user/gentoo/usr/share/info/sframe-spec.info.bz2
--- replaced dir /Users/ec2-user/gentoo/usr/share/info
<<<          obj /Users/ec2-user/gentoo/usr/share/doc/gdb-13.0.91/sim/README-HACKING.bz2
<<<          obj /Users/ec2-user/gentoo/usr/share/doc/gdb-13.0.91/sim/MAINTAINERS.bz2
<<<          obj /Users/ec2-user/gentoo/usr/share/doc/gdb-13.0.91/gdb/README.bz2
<<<          obj /Users/ec2-user/gentoo/usr/share/doc/gdb-13.0.91/gdb/PROBLEMS.bz2
<<<          obj /Users/ec2-user/gentoo/usr/share/doc/gdb-13.0.91/gdb/NEWS.bz2
<<<          obj /Users/ec2-user/gentoo/usr/share/doc/gdb-13.0.91/gdb/MAINTAINERS.bz2
<<<          obj /Users/ec2-user/gentoo/usr/share/doc/gdb-13.0.91/gdb/CONTRIBUTE.bz2
--- replaced dir /Users/ec2-user/gentoo/usr/share/doc
--- replaced dir /Users/ec2-user/gentoo/usr/share
--- replaced dir /Users/ec2-user/gentoo/usr
<<<          dir /Users/ec2-user/gentoo/usr/share/doc/gdb-13.0.91/sim
<<<          dir /Users/ec2-user/gentoo/usr/share/doc/gdb-13.0.91/gdb
<<<          dir /Users/ec2-user/gentoo/usr/share/doc/gdb-13.0.91
>>> Original instance of package unmerged safely.
 * gdb is unable to get a mach task port when installed by Prefix
 * Portage, unprivileged.  To make gdb fully functional you'll
 * have to perform the following steps:
 *   % sudo chgrp procmod /Users/ec2-user/gentoo/usr/bin/gdb
 *   % sudo chmod g+s /Users/ec2-user/gentoo/usr/bin/gdb
>>> sys-devel/gdb-12.1-r4 merged.

Building the experimental sys-devel/gdb-13.0.91 has the same problem. What's going on? Is it an ebuild bug, or is it simply unsupported?

Full emerge output is attached.
Comment 1 Tom Li 2023-02-19 15:07:05 UTC
Confirmed. It's an upstream problem. Apple M1 (AArch64) is supported by gdb when running Linux, but not on macOS currently.

https://inbox.sourceware.org/gdb/3185c3b8-8a91-4beb-a5d5-9db6afb93713@Spark/
Comment 2 Andreas K. Hüttel archtester gentoo-dev 2023-09-04 20:34:52 UTC
(In reply to Tom Li from comment #1)
> Confirmed. It's an upstream problem. Apple M1 (AArch64) is supported by gdb
> when running Linux, but not on macOS currently.
> 
> https://inbox.sourceware.org/gdb/3185c3b8-8a91-4beb-a5d5-9db6afb93713@Spark/

OK not much we can do then.