• NetBSD
  • Pkgin install gcc toolchain - package corrupted ?

Hello NetBSD Community,

It is my firsts hours on BSD system. I hope I will stay much longer hier.
I impressed how smoothly I installed NetBSD on my laptop. Although I prefer more manual form of installation. (I use Arch Linux dist). I guess it is possible on NetBSD as well.

Anyway, back on topic.
I used Pkgin to install some packages with successful, but after installing gcc12 it looks like this package is corrupted.
First I need to set up PATH environment variable to /usr/pkg/gcc12/bin . Second trying compile simple C file I got :
/usr/bin/ld: cannot find crt0.o: No such file or directory and indeed crt0.o isn't present on the system.

Some suggestion what is wrong?

  • rvp replied to this.

    karamba /usr/bin/ld: cannot find crt0.o: No such file or directory

    You very likely didn't select the comp package set when you installed NetBSD.

    Do you mean select the comp package in the sysinst tool ? I don't see any option to install this package. In Pkgin repository I see pkg_comp-2.1nb1. I've installed this package, upgrade the system. Nothing changed.

      karamba comp isn't a package but a part of the base system installation containing the default build environment. While i haven't used it myself i i guess it also contains the object files your gcc installation is looking for.

      As for installing said portion of the base system you could probably get away with simply extracting the respective tarball of the version of NetBSD you installed. Disclaimer: I am not a NetBSD expert by any means, so there might be better ways to archive this or i could even be just plain wrong.

        nettester You can be right I choose minimalist version of NetBSD in Installer. In this moment I've linked everything manually. For simple testing platform it is right now OK. In the future I'll look more deeply on the process of the installation.

          karamba Do you mean select the comp package in the sysinst tool ?

          Yes. As @nettester said, you can just extract that set anytime. Assuming the USB install disk is mounted at /mnt, as root do:

          tar -C/ -xf /mnt/amd64/binary/sets/comp.tar.xz
          • Jay likes this.