Opened 20 months ago

Last modified 2 months ago

#67162 reopened defect

mips-elf-gcc: build fails on macOS/arm64 (Invalid configuration `arm64-apple-darwin22.3.0': machine `arm64-apple' not recognized)

Reported by: tmcintos Owned by: jmroot (Joshua Root)
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: Cc: cooljeanius (Eric Gallager)
Port: mips-elf-gcc

Description

mips-elf-gcc fails to install on an M2 MacBook Air running macOS 13.2.1 with error machine arm64-apple' not recognized` in several places:

:debug:configure system:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_cross_mips-elf-gcc/mips-elf-gcc/work/build" && /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_cross_mips-elf-gcc/mips-elf-gcc/work/gcc-3.4.6/configure --prefix=/opt/local --infodir='/opt/local/share/info' --mandir='/opt/local/share/man' --target=mips-elf --program-prefix=mips-elf- --program-suffix=-3.4.6 --with-included-gettext --enable-obsolete --with-newlib --enable-multilib --with-gxx-include-dir=/opt/local/mips-elf/include/c++/3.4.6/ --enable-languages="c,c++,f77,objc" --build=arm64-apple-darwin22.3.0 --host=arm64-apple-darwin22.3.0 
:info:configure creating cache ./config.cache
:info:configure checking host system type... Invalid configuration `arm64-apple-darwin22.3.0': machine `arm64-apple' not recognized
:info:configure checking target system type... mips-unknown-elf
:info:configure checking build system type... Invalid configuration `arm64-apple-darwin22.3.0': machine `arm64-apple' not recognized
:info:configure checking for a BSD compatible install... /usr/bin/install -c
:info:configure *** This configuration is not supported in the following subdirectories:
:info:configure      target-libffi target-boehm-gc target-zlib target-libjava zlib fastjar
:info:configure     (Any other directories should still work fine.)

...

:info:build Configuring in libiberty
:info:build creating cache ./config.cache
:info:build checking for non-GNU ld... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
:info:build checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
:info:build checking how to run the C preprocessor... /usr/bin/clang -E
:info:build checking for inttypes.h... configure: creating cache ./config.cache
:info:build checking whether to enable maintainer-specific portions of Makefiles... no
:info:build checking for makeinfo... makeinfo
:info:build yes
:info:build checking for stdint.h... yes
:info:build checking for unsigned long long... yes
:info:build checking for shared library run path origin... done
:info:build checking whether make sets ${MAKE}... yes
:info:build checking for a BSD compatible install... /opt/local/bin/ginstall -c
:info:build checking whether NLS is requested... yes
:info:build checking for gcc... /usr/bin/clang
:info:build checking whether the C compiler (/usr/bin/clang -Os -DLIBICONV_PLUG -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.sdk ) works... checking for perl... perl
:info:build checking build system type... Invalid configuration `arm64-apple-darwin22.3.0': machine `arm64-apple' not recognized
:info:build configure: error: /bin/sh /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_cross_mips-elf-gcc/mips-elf-gcc/work/gcc-3.4.6/libiberty/../config.sub arm64-apple-darwin22.3.0 failed
:info:build make: *** [configure-libiberty] Error 1
:info:build make: *** Waiting for unfinished jobs....
:info:build yes
:info:build checking whether the C compiler (/usr/bin/clang -Os -DLIBICONV_PLUG -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.sdk ) is a cross-compiler... no
:info:build checking whether we are using GNU C... yes
:info:build checking whether /usr/bin/clang accepts -g... yes
:info:build checking host system type... Invalid configuration `arm64-apple-darwin22.3.0': machine `arm64-apple' not recognized

Attachments (1)

main.log (149.8 KB) - added by tmcintos 20 months ago.
main.log

Download all attachments as: .zip

Change History (7)

Changed 20 months ago by tmcintos

Attachment: main.log added

main.log

comment:1 Changed 20 months ago by tmcintos

Note: I was able to successfully install i386-elf-gcc on the same system. That port is based on a much later version of gcc:

/opt/local/bin/i386-elf-gcc --version
i386-elf-gcc (GCC) 12.2.0

whereas this port is still using GCC 3.4.6.

Last edited 20 months ago by tmcintos (previous) (diff)

comment:2 Changed 20 months ago by jmroot (Joshua Root)

Owner: set to jmroot
Resolution: fixed
Status: newclosed

In ac93252ebbf0ca0712fb6ac528aadd8991937c19/macports-ports (master):

mips-elf-gcc: map arm64->aarch64 for configure

Fixes: #67162

comment:3 Changed 20 months ago by jmroot (Joshua Root)

Resolution: fixed
Status: closedreopened

OK, that didn't help. Probably needs to be updated, as you say.

comment:4 Changed 20 months ago by tmcintos

m68k-elf-gcc seems to be in a similar situation, see #67163.

comment:5 Changed 20 months ago by jmroot (Joshua Root)

In af7f5b809aed0237c02b5138151555380971cb37/macports-ports (master):

mips-elf-gcc: update config.{guess,sub} for arm64

See: #67162

comment:6 Changed 2 months ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added
Note: See TracTickets for help on using tickets.