Solved pkg: wrong architecture: FreeBSD:12.0:amd64 instead of FreeBSD:12:amd64

obsigna

Profile disabled
I got a few systems running FreeBSD 12.1-RELEASE-p2. In /usr/local/etc/pkg/repos/FreeBSD.conf I have:
Code:
FreeBSD: {
  url: "pkg+https://pkg.FreeBSD.org/${ABI}/latest",
}

Since today (or yesterday), when executing # pkg update -f on any of the said machines, I see without exception:
Code:
Updating FreeBSD repository catalogue...
Fetching meta.conf: 100%    163 B   0.2kB/s    00:01 
Fetching packagesite.txz: 100%    6 MiB   1.1MB/s    00:06 
Processing entries:  63%
pkg: wrong architecture: FreeBSD:12.0:amd64 instead of FreeBSD:12:amd64
pkg: repository FreeBSD contains packages with wrong ABI: FreeBSD:12.0:amd64
Processing entries: 100%
Unable to update repository FreeBSD
Error updating repositories!

The last successful updates ran on Saturday, February 29th. How do I solve the issue?
 
I had the same problem. Actually this is a known bug with the current version of pkg for multiple FreeBSD versions, take a look here. It was already fixed and the changes were merged, so its only a matter of time until a new pkg version is published. If you cannot wait, then you may recompile pkg, although this did not work for me (I only tested 13-CURRENT). I got it running by completely skipping the ABI check in the source code, which is definitely not recommended for production systems. Nevertheless, this should work for the time until a new version is available.
 
Chiming in with a "me too", all my other upgrades from 12.1-p1 to -p2 went smoothly, but this system (my workstation of course) is giving the error.

(12.1-RELEASE-p2)
 
Same here:
Bash:
root@xxx:~ # pkg install xcursor-theme
Updating FreeBSD repository catalogue...
Fetching meta.txz: 100%    916 B   0.9kB/s    00:01   
Fetching packagesite.txz: 100%    6 MiB   6.4MB/s    00:01   
Processing entries:  64%
pkg: wrong architecture: FreeBSD:12.0:i386 instead of FreeBSD:12:i386
pkg: repository FreeBSD contains packages with wrong ABI: FreeBSD:12.0:i386
Processing entries: 100%
Unable to update repository FreeBSD
Error updating repositories!

When will FreeBSD be usable again?
 
When will FreeBSD be usable again?

Only the ability to fetch packages from the repository is affected, all the others features of your OS are still available.

So, until the issue has been solved, you can build your package using ports:

Bash:
cd /usr/ports/x11-themes/xcursor-themes
make install

If you don't have installed the ports collection, you can fetch them with portsnap, as documented in the handbook.
 
Mixing ports and packages is very low risk as long as your installed packages and ports tree are in sync. This generally means keeping both up-to-date and not mixing quarterly and current. Binary packages usually only lag a few days behind ports commits, so it's very rare to hit an incompatibility. I use latest, install most things from binary packages, but frequently build from source with CFLAGS=-march=native in /etc/make.conf to get better performance from scientific apps. I can't recall the last time I ran into a problem.
 
Mixing ports and packages is very low risk as long as your installed packages and ports tree are in sync. ... I can't recall the last time I ran into a problem.

I second what outpaddling said. I do dual mode maintenance of ports and packages as well, for years and on several installations. I saw very few problems as well, and most of what I saw would have been an issue anyway.
 
I don't want to hijack this thread but
but frequently build from source with CFLAGS=-march=native in /etc/make.conf to get better performance
Avoid messing with CFLAGS is another thing i heard of
Just a word of advise, do not try to mess with CFLAGS and CXXFLAGS like we usually do in Gentoo, for instance.

In FreeBSD the things are usually already set to have the best configuration. Trying to change those without actually knowing exactly what you are doing can led you to some very sad situations.

In the same thread is a quite weird way of determining the CPUTYPE which i use for compiling the kernel:
Bash:
sh -c "clang -v -fsyntax-only -march=native -x c /dev/null 2>&1 | grep -e '-target-cpu' | sed -e 's|.*-target-cpu \([[:alnum:]]*\) .*|\1|'"

Anyway. Using ports is not feasible on my machine since it only has 1 GiB of Ram and compiling takes hours (literally).
I can tolerate this for compiling the kernel once in a while but not everytime i want to install new software.
 
Couldn't you temporarily change your /usr/local/etc/pkg/repos/FreeBSD.conf with the corrected ABI? Make it look like this:

Code:
FreeBSD: {
  url: "pkg+https://pkg.freebsd.org/FreeBSD\:12\:amd64/latest",
}

I haven't tried this as I build my own with Poudriere, but I have at some times changed the .conf to point to different locations besides my default. The ":" need to be escaped.
 
Couldn't you temporarily change your /usr/local/etc/pkg/repos/FreeBSD.conf with the corrected ABI? Make it look like this:
I already use latest packages. And i really don't want to go back to quarterly.
(Mostly because of this tread Thread 74036 and the new Xorg server).

Edit: Ah! Now i understand. I will try this. Thanks!
Edit2: This doesn't work (i use i386):
Bash:
root@xxx:~ # cat /usr/local/etc/pkg/repos/FreeBSD.conf
#FreeBSD: {
#    url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest"
#}

FreeBSD: {
  url: "pkg+https://pkg.freebsd.org/FreeBSD\:12\:i386/latest",
}
Bash:
root@xxx:~ # pkg update -f
Updating FreeBSD repository catalogue...
pkg: Repository FreeBSD has a wrong packagesite, need to re-create database
Fetching meta.conf: 100%    163 B   0.2kB/s    00:01 
Fetching packagesite.txz: 100%    6 MiB   6.4MB/s    00:01 
Processing entries:  64%
pkg: wrong architecture: FreeBSD:12.0:i386 instead of FreeBSD:12:i386
pkg: repository FreeBSD contains packages with wrong ABI: FreeBSD:12.0:i386
Processing entries: 100%
Unable to update repository FreeBSD
Error updating repositories!
 
Couldn't you temporarily change your /usr/local/etc/pkg/repos/FreeBSD.conf with the corrected ABI?
It's not the local ABI variable that's the issue. The packages themselves have the "bad" ABI string. If I read everything correctly the issue has already been resolved but now all packages need to be rebuild to get rid of the bad ABI string. This will obviously take a bit of time to complete.
 
It's not the local ABI variable that's the issue. The packages themselves have the "bad" ABI string. If I read everything correctly the issue has already been resolved but now all packages need to be rebuild to get rid of the bad ABI string. This will obviously take a bit of time to complete.
Is possible to see status of rebuilding somewhere ?
 
I'm sorry to be dense, what exactly is the process for fixing this issue on the user end? Just wait? Try `pkg update -f` every day until the error no longer appears?
 
This, yes. And if you absolutely have to have something right now, you can always resort to the good old fashioned ports tree.
Gone that way already, becouse the build has at least 12-16hours remaining as I am watching it online. I am glad we have ports.
 
Back
Top