[MacPorts] #74412: dtc 1.7.2: FTBS with a long custom macports root
MacPorts
noreply at macports.org
Thu Sep 10 14:29:53 UTC 2026
#74412: dtc 1.7.2: FTBS with a long custom macports root
--------------------------------+--------------------
Reporter: marcingomulkiewicz | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.12.6
Keywords: haspatch | Port: dtc
--------------------------------+--------------------
Fails to build from source when custom macports location is (too) long.
MacOS 26.6.2
Cause: dtc's Makefile links libfdt.dylib.1 with a relative install name
and relies on $(LDFLAGS), but MacPorts only exports LDFLAGS (with
-Wl,-headerpad_max_install_names) to the configure phase — and this port
uses a no-op configure (configure.cmd echo) with a custom build.cmd. So
the dylib is linked without header padding, and post-destroot's
install_name_tool -id (Portfile:41) cannot fit the long install name
/my/own/very/long/path/to/macports/lib/libfdt.dylib.1. With the default
/opt/local prefix it fits, which is why the custom location fails.
Potential quick fix, verified locally: add the flag to the link step in
Portfile:35:
build.cmd gmake V=1 NO_PYTHON=1 LDFLAGS=-Wl,-headerpad_max_install_names
"PREFIX=${destroot}${prefix}" install
--
Ticket URL: <https://trac.macports.org/ticket/74412>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list