tools: Failure while building for arm64 / NanoPI R4S

Getting an error when building the packages (base and kernel work fine). Error message looks like below and occurs for every package:

[20220201072918] ===> License OpenSSL accepted by the user ===> openssl-1.1.1m_1,1 depends on file: /usr/local/sbin/pkg - not found [20220201072918] ===> License BSD2CLAUSE accepted by the user [20220201072918] => freebsd-pkg-1.16.3_GH0.tar.gz doesn't seem to exist in /usr/ports/distfiles/. [20220201072918] => Attempting to fetch https://codeload.github.com/freebsd/pkg/tar.gz/1.16.3?dummy=/freebsd-pkg-1.16.3_GH0.tar.gz fetch: https://codeload.github.com/freebsd/pkg/tar.gz/1.16.3?dummy=/freebsd-pkg-1.16.3_GH0.tar.gz: size unknown fetch: https://codeload.github.com/freebsd/pkg/tar.gz/1.16.3?dummy=/freebsd-pkg-1.16.3_GH0.tar.gz: size of remote file is not known freebsd-pkg-1.16.3_GH0.tar.gz 3744 kB 4202 kBps 01s [20220201072920] ===> Fetching all distfiles required by pkg-1.16.3_1 for building [20220201072920] ===> Extracting for pkg-1.16.3_1 [20220201072920] ===> License BSD2CLAUSE accepted by the user [20220201072920] ===> Fetching all distfiles required by pkg-1.16.3_1 for building [20220201072920] => SHA256 Checksum OK for freebsd-pkg-1.16.3_GH0.tar.gz. [20220201072920] ===> Patching for pkg-1.16.3_1 [20220201072920] ===> Applying FreeBSD patches for pkg-1.16.3_1 from /usr/ports/ports-mgmt/pkg/files /usr/bin/sed -i.bak -e "s|-llzma|-llzma -lmd|g" /usr/obj/usr/ports/ports-mgmt/pkg/work/pkg-1.16.3/auto.def /usr/obj/usr/ports/ports-mgmt/pkg/work/pkg-1.16.3/src/Makefile.autosetup /usr/obj/usr/ports/ports-mgmt/pkg/work/pkg-1.16.3/tests/Makefile.autosetup [20220201072920] ===> Configuring for pkg-1.16.3_1 No installed jimsh or tclsh, building local bootstrap jimsh0 No working C compiler found. Tried cc and gcc. [20220201072920] ===> Script "configure" failed unexpectedly. Any clue what might be wrong ?

Building on a clean FreeBSD 13.0 release and building OPNsense stable/22.1

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 33 (20 by maintainers)

Most upvoted comments

@yrzr Glad to hear that it worked out in the end and thank you for the link to the repo 😃 Will definitely have a look at it. I am actually using a modified arm.sh build script and a device config for my ROCKPRO64. If all goes well, I will submit a PR.

UPDATE: With my modified arm.sh script and adjusted extra.conf, the image generation for ROCKPRO64 works. Just need to try out the image on my device later 😃 (The additional output messages are just for debugging)


Message from opnsense-22.1:

--
Owl be watching you
>>> Begin extra: arm_hook
>>> End extra: arm_hook
>>> Setting up entropy in /usr/obj/usr/tools/config/22.1/OpenSSL:aarch64
1+0 records in
1+0 records out
4096 bytes transferred in 0.000047 secs (86803569 bytes/sec)
1+0 records in
1+0 records out
4096 bytes transferred in 0.000041 secs (100722963 bytes/sec)
>>> ...install efi
..../usr/obj/usr/tools/config/22.1/fat...
..../usr/obj/usr/tools/config/22.1/ufs...
/usr/obj/usr/tools/config/22.1/fat
/usr/obj/usr/tools/config/22.1/ufs
..../dev/md0p1...
..../dev/md0p2...
DEVICE         MAJ:MIN SIZE TYPE                                          LABEL MOUNT
md0              0:60  3.0G GPT                                               - -
  <FREE>         -:-    16M -                                                 - -
  md0p1          0:62   50M efi                                         gpt/efi /usr/obj/usr/tools/config/22.1/fat
  md0p2          0:109 2.9G freebsd-ufs                              ufs/rootfs /usr/obj/usr/tools/config/22.1/ufs
  <FREE>         -:-    44K -                                                 - -
vtbd0            0:51   80G GPT                                               - -
  vtbd0p1        0:52   64K freebsd-boot                             gpt/bootfs -
  vtbd0p2        0:53   33M efi                                      gpt/efiesp /boot/efi
  vtbd0p3        0:54  1.0G freebsd-swap                             gpt/swapfs -
  vtbd0p4        0:55   79G freebsd-ufs                              ufs/rootfs /
/usr/obj/usr/tools/config/22.1/fat/EFI
/usr/obj/usr/tools/config/22.1/fat/EFI/BOOT
>>> ...install uboot
322+0 records in
322+0 records out
164864 bytes transferred in 0.022411 secs (7356276 bytes/sec)
1880+0 records in
1880+0 records out
962560 bytes transferred in 0.153069 secs (6288411 bytes/sec)
...done!

UPDATE 2: Up and running on my ROCKPRO64

image

Actually, I am still facing the problem in issue 258. Are you building the following stages with the official base package from FreeBSD 13?

Didn’t encounter any issues so far. It’s been almost 24 hours and roughly 25% of the parts are built. Kinda getting impatient as it’s taking ages. If I have time, I will look into the xtools issue and maybe will come up with something.

The issue somehow looks familiar. I recall there being a thread on the forums. What worked out for me was downgrading to pkg version 1.16.3 manually (I guess a fresh FreeBSD 13.0 install downloads 1.17.5 atm). Not all packages could be built though (specifically those ones requiring go). I had to build the latter on my arm device. It’s a little bit of a headache to go back and forth, but it worked out in the end (at least during the 22.1 beta).

Maybe @yrzr has a better solution. It would be very convenient if someone could simply provide the generic arm64 packages (base, kernel etc.) for 22.1. Unfortunately, I don’t have a powerful machine atm and building all ports, plugins, core etc. from scratch took almost 2 days.

EDIT: Here is the thread in the forums https://forum.opnsense.org/index.php?topic=25498.msg124417#msg124417