Fun and games installing ports - rust needs >16GB, dependencies aren't installed

Hi,
It's been a while that I've tried to install anything on FreeBSD, so I was dismayed recently trying to install the latest security/vaultwarden.
I fired up a new 14.1 VM; 20GB for the / partition, separate 4GB swap drive.
I firstly, from ports, installed a bunch of utilities (sysutils/tmux, emulators/open-vm-tools, editors/vim, etc.). A few times the builds failed with messages like:
Code:
===>   vim-9.1.0708 depends on executable: xxd - not found
that I needed to fix with:
Code:
cd /usr/ports/*/xxd
make clean install clean
Before resuming the original port.

Back to vaultwarden. Firstly, https://www.freshports.org/security/vaultwarden/ tells me that the version in ports is 1.32.0_2, which is what I need due to a problem with the iOS app. Great. But FreshPorts also suggests I could:
To add the package, run one of these commands:
  • pkg install security/vaultwarden
  • pkg install vaultwarden
Which may be true, but I won't get 1.32.0_2, I'll get 1.30.5_4 instead:
Code:
# pkg search vaultwarden
vaultwarden-1.30.5_4           Bitwarden compatible backend server

Seriously misleading. Can FreshPorts not show the current package version?

Finally, the compilation of the port requires rust. Of course I can't use the package version of rust since a) "don't mix ports and packages unless you know what you're doing" (which I don't) and b) the package version of rust is not the right version to allow me to compile vaultwarden.

This build dependency (rust) filled my 20GB disk and of course, crashed:
Code:
# du -hx -d 3 . | sort -h
499M    ./devel/cmake-core/work
927M    ./security/vaultwarden/work
 16G    ./lang/rust/work

Is this just how things are now? Or am I doing it wrong?

Thanks.
 
What version is your pkg stuff set to? Latest or quarterly?

Freshports is showing the latest ports, so don’t think that’s misleading. That’s why maybe you‘re on quarterly?

I don’t use packages yet (so might be wrong above) but rust will force me to one day.
 
What version is your pkg stuff set to? Latest or quarterly?
Whatever comes out of the box in 14.1-RELEASE. Which I'm guessing is quarterly?:
Code:
FreeBSD: {
  url: "pkg+https://pkg.FreeBSD.org/${ABI}/quarterly",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}

Added
Code:
FreeBSD: { url: "pkg+https://pkg.FreeBSD.org/${ABI}/latest" }
to
/usr/local/etc/pkg/repos/FreeBSD.conf

And now, thanks:
Code:
# pkg search vaultwarden
vaultwarden-1.32.0_2           Bitwarden compatible backend server

Maybe that should get a mention on FreshPorts with an asterisk: *you may need to change your packagesite to latest.

Again, thanks for suggesting that.

But since I'd like to stay with ports only, I'm still needing to compile rust. I'm lucky in that I can add a new drive (temporarily) to house portswrkdir, which I've just done - and restarting the build. Hopefully 64GB is enough. Who knows? :)

Imagine this on an embedded system...

Scott
 
I think the table on freshports is quite explicit:

Packages (timestamps in pop-ups are UTC):
vaultwarden
ABIaarch64amd64armv6armv7i386powerpcpowerpc64powerpc64le
FreeBSD:13:latest-1.32.0_1------
FreeBSD:13:quarterly1.30.5_41.30.5_4------
FreeBSD:14:latest-1.32.0_2------
FreeBSD:14:quarterly1.30.5_41.30.5_4------
FreeBSD:15:latest1.32.0_11.32.0_2n/a-n/a-1.30.1-

I think if you're a newbie like me, the best is to:
  • Use packages,
  • If you need to install from ports: install deps as packages,
  • Build as a package (make package) and install that with pkg.
 
Packages (timestamps in pop-ups are UTC):
Nice one. I got stuck at the top of the page - should have read further. Thanks.


  • If you need to install from ports: install deps as packages,
Is there a way to install build dependencies as packages and run dependencies as ports? That way when you pkg autoremove you'd only be left with a system built from ports only. That would be nice.
 
make install-missing-packages
That almost does what I want (at least by my reading). To have a ports-only system it would be nice to be able to build all of the run dependencies but get all of the build dependencies via packages. That way you could remove all of the orphan dependencies but keep the built-from-ports dependencies. The man page describes that command as installing "missing dependencies from packages". Which I assume is all (build & run).

Anyway after adding a 64GB drive I was able to build rust. Thanks everyone for getting me over the line.
 
To have a ports-only system it would be nice to be able to build all of the run dependencies but get all of the build dependencies via packages.
pkg install -A $(make build-depends-list) ?

Code:
     build-depends-list, run-depends-list
                          Print a list of all the direct compile or run
                          dependencies for this port.
ports(7)
 
I don't have too many problems when I mix ports and packages. In a situation like this I would always do Rust from packages and deal with negative consequences (if any) later.

I am surprised you have to build dependency ports by cd'ing into their dir and `make install` in there by hand. Something is off.

If you wish to compile the usual suspects of large things yourself (Rust, Web browsers) then you should arm yourself with a beefy machine, especially with disk space. Spinning rust is fine (no pun intended). Also critical is to have enough RAM for the number of cores you have. That way you might still have a slow CPU and wait long (hard to avoid without getting a new computer), but at least you won't wait 17 hours and then fail.
 
Back
Top