Failed to write interface /usr/share/Agda-stdlib/_build/2.6.4.3/agda/src/Data/Unit/Base.agdai.
juhp opened this issue · comments
I am the package maintainer for Agda and Agda-stdlib in Fedora Linux...
I don't use them a lot these days and today I realised that the Agda-stdlib package hasn't been "working" since the release of Fedora 39 (6 months ago): as far as I can tell this change of behaviour started happening with Agda 2.6.3+.
Downstream report is https://bugzilla.redhat.com/show_bug.cgi?id=2248716
Steps to reproduce:
$ podman -it --rm fedora:40 # docker should also work
# dnf install Agda-stdlib
:
[4/5] Installing Agda-0:2.6.4.1-46.fc40.x86_64 100% | 436.4 MiB/s | 72.9 MiB | 00m00s
[5/5] Installing Agda-stdlib-0:1.7.3-5.fc40.noarch 100% | 57.5 MiB/s | 157.3 MiB | 00m03s
# echo "open import Data.Nat" > test.agda
# agda test.agda
Checking test (/var/home/petersen/tmp/test.agda).
Checking Data.Nat (/usr/share/Agda-stdlib/src/Data/Nat.agda).
Checking Data.Nat.Base (/usr/share/Agda-stdlib/src/Data/Nat/Base.agda).
Checking Data.Bool.Base (/usr/share/Agda-stdlib/src/Data/Bool/Base.agda).
Checking Data.Unit.Base (/usr/share/Agda-stdlib/src/Data/Unit/Base.agda).
Failed to write interface /usr/share/Agda-stdlib/_build/2.6.4.1/agda/src/Data/Unit/Base.agdai.
/usr/share/Agda-stdlib/src/Data/Bool/Base.agda:11,1-37
/usr/share/Agda-stdlib/_build/2.6.4.1/agda/src/Data/Unit/Base.agdai:
removeLink: permission denied (Permission denied)
Same result in fedora:39 (Agda-2.6.3) and fedora:rawhide (Agda-2.6.4.3)
Fedora 38 (now EOL) which shipped Agda-2.6.2.2 together with Agda-stdlib-1.7.1 appears to be okay.
I wonder why Agda started thinking it needs to rebuild the files?
$ ls /usr/share/Agda-stdlib/src/Data/Unit -l
total 24
-rw-r--r--. 1 root root 1206 Oct 13 2023 Base.agda
-rw-r--r--. 1 root root 520 Oct 13 2023 Instances.agda
-rw-r--r--. 1 root root 1174 Oct 13 2023 NonEta.agda
drwxr-xr-x. 1 root root 76 May 24 09:47 Polymorphic
-rw-r--r--. 1 root root 657 Oct 13 2023 Polymorphic.agda
-rw-r--r--. 1 root root 5072 Oct 13 2023 Properties.agda
$ ls /usr/share/Agda-stdlib/_build/2.6.4.3/agda/src/Data/Unit -l
total 120
-rw-r--r--. 1 root root 6729 May 18 08:00 Base.agdai
-rw-r--r--. 1 root root 9875 May 18 08:00 Instances.agdai
-rw-r--r--. 1 root root 9364 May 18 08:00 NonEta.agdai
drwxr-xr-x. 1 root root 82 May 24 09:47 Polymorphic
-rw-r--r--. 1 root root 4870 May 18 08:00 Polymorphic.agdai
-rw-r--r--. 1 root root 79187 May 18 08:00 Properties.agdai
I wonder why Agda started thinking it needs to rebuild the files?
If things are imported with new (& incompatible) options then it triggers a re-checking.