pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/56003: mk/gnu-config - config.guess doesn't recognize M1 Macs



>Number:         56003
>Category:       pkg
>Synopsis:       mk/gnu-config - config.guess doesn't recognize M1 Macs
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Feb 21 22:35:00 +0000 2021
>Originator:     Colin Simmonds
>Release:        pkgsrc git commit e4dd34979ea10f1a2a56831d9e6d1e437a7e4e37
>Organization:
>Environment:
Darwin mirage.local 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:06:51 PST 2021; root:xnu-7195.81.3~1/RELEASE_ARM64_T8101 arm64 arm64 MacBookAir10,1 Darwin
>Description:
Some packages fail to build on M1-based Macs because the GNU config.guess script is out of date and doesn't recognize ARM64 on Darwin as a valid platform.

For example, trying to build graphics/jbig2dec fails with:
checking build system type... Invalid configuration `arm64-apple-darwin20.3.0': machine `arm64-apple' not recognized
configure: error: /bin/sh ./config.sub arm64-apple-darwin20.3.0 failed

>How-To-Repeat:
$ cd graphics/jbig2dec
$ bmake

>Fix:
Below is a quick patch for this based on the latest version of config.guess from the automake project on Savannah <https://git.savannah.gnu.org/cgit/automake.git/commit/lib/config.guess?id=f50685a5f5c04bd8ec2a9577e1a7b8d7cf8967cb>

--- config.guess.orig	2021-02-21 17:16:23.000000000 -0500
+++ config.guess	2021-02-21 17:17:05.000000000 -0500
@@ -1312,6 +1312,9 @@
     *:Rhapsody:*:*)
 	echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
 	exit ;;
+    arm64:Darwin:*:*)
+	echo aarch64-apple-darwin"$UNAME_RELEASE"
+	exit ;;
     *:Darwin:*:*)
 	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
 	set_cc_for_build

Since this is from upstream, updating all of files in mk/gnu-config to the latest would also resolve it.


Home | Main Index | Thread Index | Old Index