While porting and adapting a complete FreeBSD LoongArch system, an error occurs when compiling and building ports software on a running FreeBSD LoongArch (unofficial version) system:
root@slackwarecn:/usr/ports/devel/gettext-runtime # make install ===> License LGPL21+ GPLv3+ accepted by the user ===> gettext-runtime-1.0_1 depends on file: /usr/local/sbin/pkg - found ===> Fetching all distfiles required by gettext-runtime-1.0_1 for building ===> Extracting for gettext-runtime-1.0_1 => SHA256 Checksum OK for gettext-1.0.tar.xz. ===> Patching for gettext-runtime-1.0_1 ===> Applying FreeBSD patches for gettext-runtime-1.0_1 from /usr/ports/devel/gettext-runtime/files ===> Configuring for gettext-runtime-1.0_1 configure: loading site script /usr/ports/Templates/config.site configure: creating cache config.cache checking for a BSD-compatible install... /usr/bin/install -c checking whether sleep supports fractional seconds... yes checking filesystem timestamp resolution... 2 checking whether build environment is sane... yes checking for a race-free mkdir -p... (cached) /bin/mkdir -p checking for gawk... (cached) /usr/bin/awk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking xargs -n works... yes checking whether UID '0' is supported by ustar format... yes checking whether GID '0' is supported by ustar format... yes checking how to create a ustar tar archive... (cached) /usr/bin/tar checking build system type... Invalid configuration `loongarch64-portbld-freebsd16.0': machine `loongarch64-portbld' not recognized configure: error: /bin/sh ./../build-aux/config.sub loongarch64-portbld-freebsd16.0 failed
Based on the error output, the Templates/{config.sub,config.guess} files need to be updated to add LoongArch-related information in order to resolve it.
This issue has been reported on Bugzilla as a record of the problem:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=299273