Solved pkg upgrade

Hello,
I have some doubts about how the package system works.

I was on FreeBSD13.0-RELEASE and ran pkg upgrade
After that, the net-mgmt/netdata was updated and stopped working.
And error was libgcc_s.so.1: version GCC_4.6.0 required...

My pkg repo:

# grep url /etc/pkg/FreeBSD.conf
url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly",


Seeing this error ... version GCC_4.6.0 required... , I thought that package net-mgmt/netdata was compiled for another FreeBSD version for FreeBSD13.1-RELEASE.

Then I decided to upgrade to FreeBSD13.1-RELEASE and the package started working without errors!

I always thought that packages were compiled for every version of the FreeBSD.
And if I'm on FreeBSD13.0-RELEASE I can update my packages while on the 13.0 branch.
Up to a certain point, of course, as long as there is support for the FreeBSD13.0-RELEASE.
I mean, I don't really understand what happened.

I understand that it may be necessary to upgrade the system to install a new version of a package.
But if I want to stay on 13.0-RELEASE then pkg upgrade should probably just say that there is no update for package net-mgmt/netdata for your OS version.

Or am I misunderstanding something?

Best regards,
 
I was on FreeBSD13.0-RELEASE and ran pkg upgrade
13.0-RELEASE is end-of-life, packages are built for 13.1.

I always thought that packages were compiled for every version of the FreeBSD.
No, they are built per major version. When a new minor version is released packages continue to get built for the lowest supported version, right up until that minor version is end-of-life (three months after the release of the new version). 99.9% of packages built for 13.0 will work fine on 13.1. But packages built for 13.1 will not work on 13.0. So during this three month 'transition' period packages continue to get built for 13.0.

And if I'm on FreeBSD13.0-RELEASE I can update my packages while on the 13.0 branch.
The ports tree has nothing to do with the version of the base OS.
 
I always thought that packages were compiled for every version of the FreeBSD.
You thought wrong ?.

Packages are compiled for every ABI, which is the combination of the major release and the hardware architecture, e.g. FreeBSD:13:amd64. The ABI doesn't change with minor releases, so a package built on 13.0 WILL work on 13.1 etc. But not necessarily the other way around if for example shared libraries in base were updated.

13.0 is EOL. As soon as a minor release is EOL, the official package builders are upgraded to the next (here, 13.1). You just should not run an EOL version. Minor upgrades are painless, just do them in time (you have a 3 month transition phase).

But if I want to stay on 13.0-RELEASE then pkg upgrade should probably just say that there is no update for package net-mgmt/netdata for your OS version.
There's no way pkg could know there might be a problem. It's the same ABI, the same repository. You're supposed to upgrade your base system in time....
 
Thanks for reply SirDice
Yes, that's I understood it.
I don't quite understand why pkg installs packages that are compiled for a different version.
It would probably make more sense to simply say that there are no packages for your current version?
 
>Packages are compiled for every ABI, which is the combination of the major release and the hardware architecture, e.g. FreeBSD:13:amd64

Ok, ok I understood it!
 
I don't quite understand why pkg installs packages that are compiled for a different version.
As far as pkg is concerned, it is the same version, as all that matters here is the ABI. Therefore, the builders will stick to the lower version unless it goes EOL.
 
You got a warning you're installing packages for a newer version of FreeBSD, you probably ignored that warning.
Ah right, forgot that one existed. And it makes sense it's "only" a warning, because more often than not, packages will also work on an older version of the same ABI....
 
Back
Top