Haskell packages broken after system update

Hello dear Garuda team,

Mandatory inxi output below:

System:
Kernel: 5.17.5-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 11.2.0
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=58b8aaef-a830-4cca-ae78-c267c6a7f5c6 rw rootflags=subvol=@
quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0
systemd.unified_cgroup_hierarchy=1
resume=UUID=4fecc35c-65fa-4061-8faa-890a1889740f loglevel=3
Desktop: KDE Plasma v: 5.24.5 tk: Qt v: 5.15.3 info: latte-dock
wm: kwin_x11 vt: 1 dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
Type: Desktop Mobo: Micro-Star
model: MPG X570 GAMING PRO CARBON WIFI (MS-7B93) v: 1.0
serial: <superuser required> UEFI: American Megatrends v: 1.60
date: 01/14/2020
CPU:
Info: model: AMD Ryzen 5 3600X bits: 64 type: MT MCP arch: Zen 2
family: 0x17 (23) model-id: 0x71 (113) stepping: 0 microcode: 0x8701013
Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache:
L1: 384 KiB desc: d-6x32 KiB; i-6x32 KiB L2: 3 MiB desc: 6x512 KiB
L3: 32 MiB desc: 2x16 MiB
Speed (MHz): avg: 3728 high: 4235 min/max: 2200/4409 boost: enabled
scaling: driver: acpi-cpufreq governor: performance cores: 1: 4235 2: 3610
3: 3776 4: 3599 5: 3590 6: 3600 7: 3649 8: 3778 9: 4149 10: 3598 11: 3570
12: 3592 bogomips: 91202
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Vulnerabilities:
Type: itlb_multihit status: Not affected
Type: l1tf status: Not affected
Type: mds status: Not affected
Type: meltdown status: Not affected
Type: spec_store_bypass
mitigation: Speculative Store Bypass disabled via prctl
Type: spectre_v1
mitigation: usercopy/swapgs barriers and __user pointer sanitization
Type: spectre_v2
mitigation: Retpolines, IBPB: conditional, STIBP: conditional, RSB filling
Type: srbds status: Not affected
Type: tsx_async_abort status: Not affected
Graphics:
Device-1: NVIDIA TU106 [GeForce RTX 2060 SUPER] vendor: Gigabyte
driver: nvidia v: 510.68.02 alternate: nouveau,nvidia_drm pcie: gen: 1
speed: 2.5 GT/s lanes: 16 link-max: gen: 3 speed: 8 GT/s bus-ID: 2d:00.0
chip-ID: 10de:1f06 class-ID: 0300
Display: x11 server: X.Org v: 21.1.3 with: Xwayland v: 22.1.1
compositor: kwin_x11 driver: X: loaded: nvidia unloaded: modesetting
alternate: fbdev,nouveau,nv,vesa gpu: nvidia display-ID: :0 screens: 1
Screen-1: 0 s-res: 1920x1080 s-dpi: 90 s-size: 542x301mm (21.34x11.85")
s-diag: 620mm (24.41")
Monitor-1: DP-2 res: 1920x1080 dpi: 90 size: 540x300mm (21.26x11.81")
diag: 618mm (24.32") modes: N/A
OpenGL: renderer: NVIDIA GeForce RTX 2060 SUPER/PCIe/SSE2
v: 4.6.0 NVIDIA 510.68.02 direct render: Yes
Audio:
Device-1: NVIDIA TU106 High Definition Audio vendor: Gigabyte
driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16
bus-ID: 2d:00.1 chip-ID: 10de:10f9 class-ID: 0403
Device-2: AMD Starship/Matisse HD Audio vendor: Micro-Star MSI
driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16
bus-ID: 2f:00.4 chip-ID: 1022:1487 class-ID: 0403
Sound Server-1: ALSA v: k5.17.5-zen1-1-zen running: yes
Sound Server-2: PulseAudio v: 15.0 running: no
Sound Server-3: PipeWire v: 0.3.51 running: yes
Network:
Device-1: Intel I211 Gigabit Network vendor: Micro-Star MSI driver: igb
v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: d000 bus-ID: 26:00.0
chip-ID: 8086:1539 class-ID: 0200
IF: enp38s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Device-2: Intel Wi-Fi 6 AX200 driver: iwlwifi v: kernel pcie: gen: 2
speed: 5 GT/s lanes: 1 bus-ID: 28:00.0 chip-ID: 8086:2723 class-ID: 0280
IF: wlo1 state: down mac: <filter>
IF-ID-1: ip_vti0 state: down mac: <filter>
Bluetooth:
Device-1: Intel AX200 Bluetooth type: USB driver: btusb v: 0.8
bus-ID: 1-4:2 chip-ID: 8087:0029 class-ID: e001
Report: bt-adapter ID: hci0 rfk-id: 0 state: down
bt-service: enabled,running rfk-block: hardware: no software: yes
address: N/A
Drives:
Local Storage: total: 3.75 TiB used: 79.51 GiB (2.1%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/nvme0n1 maj-min: 259:1 vendor: Samsung
model: SSD 970 EVO Plus 500GB size: 465.76 GiB block-size: physical: 512 B
logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
rev: 2B2QEXM7 temp: 42.9 C scheme: GPT
ID-2: /dev/nvme1n1 maj-min: 259:0 vendor: Samsung
model: SSD 970 EVO Plus 500GB size: 465.76 GiB block-size: physical: 512 B
logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
rev: 2B2QEXM7 temp: 30.9 C scheme: GPT
ID-3: /dev/sda maj-min: 8:0 vendor: Seagate model: ST2000DM008-2FR102
size: 1.82 TiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
type: HDD rpm: 7200 serial: <filter> rev: 0001 scheme: MBR
ID-4: /dev/sdb maj-min: 8:16 vendor: Western Digital
model: WD1002FAEX-00Y9A0 size: 931.51 GiB block-size: physical: 512 B
logical: 512 B speed: 6.0 Gb/s type: N/A serial: <filter> rev: 1D05
scheme: MBR
ID-5: /dev/sdc maj-min: 8:32 type: USB vendor: Kingston
model: DataTraveler 3.0 size: 115.48 GiB block-size: physical: 512 B
logical: 512 B type: N/A serial: <filter> rev: PMAP scheme: MBR
SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure?
Partition:
ID-1: / raw-size: 448.37 GiB size: 448.37 GiB (100.00%)
used: 79.51 GiB (17.7%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:3
ID-2: /boot/efi raw-size: 260 MiB size: 256 MiB (98.46%)
used: 562 KiB (0.2%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:2
ID-3: /home raw-size: 448.37 GiB size: 448.37 GiB (100.00%)
used: 79.51 GiB (17.7%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:3
ID-4: /var/log raw-size: 448.37 GiB size: 448.37 GiB (100.00%)
used: 79.51 GiB (17.7%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:3
ID-5: /var/tmp raw-size: 448.37 GiB size: 448.37 GiB (100.00%)
used: 79.51 GiB (17.7%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:3
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: partition size: 17.13 GiB used: 0 KiB (0.0%)
priority: -2 dev: /dev/nvme0n1p3 maj-min: 259:4
ID-2: swap-2 type: zram size: 15.63 GiB used: 5.2 MiB (0.0%)
priority: 100 dev: /dev/zram0
Sensors:
System Temperatures: cpu: N/A mobo: N/A gpu: nvidia temp: 44 C
Fan Speeds (RPM): N/A gpu: nvidia fan: 49%
Info:
Processes: 408 Uptime: 5h 32m wakeups: 0 Memory: 15.63 GiB
used: 9.72 GiB (62.2%) Init: systemd v: 250 tool: systemctl Compilers:
gcc: 11.2.0 clang: 13.0.1 Packages: pacman: 1985 lib: 532 Shell: fish
v: 3.4.1 default: Bash v: 5.1.16 running-in: konsole inxi: 3.3.15
Garuda (2.6.2-1):
System install date:     2021-10-15
Last full system update: 2022-05-05 ↻
Is partially upgraded:   No
Relevant software:       NetworkManager
Windows dual boot:       Probably (Run as root to verify)
Snapshots:               Snapper
Failed units:            grub-btrfs-snapper.path grub-btrfs-snapper.service

Problem description:
I had arbtt installed on my system and ran fine until today. After the last update i get the error:

arbtt-stats: error while loading shared libraries: libHSutf8-string-1.0.2-FOQgGpXm4p2BxMMm2pyYrn-ghc9.0.2.so: cannot open shared object file: No such file or directory

I checked the /usr/lib folder and the file name has changed after the update:

✦ [🔍] × ls /usr/lib | grep libHS | grep utf8
.rwxr-xr-x  301k root  4 mai 13:02  libHSutf8-string-1.0.2-9eFA57BgKXNHtjvfuIOq9f-ghc9.0.2.so

Same lib but a change in what i think is some sort of hash embedded in the file name. Changed on my last system update yesterday. Ok.
The extent to which I am missing libs required to run arbtt is the following:

ldd /usr/bin/arbtt-capture
linux-vdso.so.1 (0x00007ffcb1d77000)
libHSutf8-string-1.0.2-FOQgGpXm4p2BxMMm2pyYrn-ghc9.0.2.so => not found
libHSdirectory-1.3.6.2-ghc9.0.2.so => /usr/lib/ghc-9.0.2/directory-1.3.6.2/libHSdirectory-1.3.6.2-ghc9
.0.2.so (0x00007ff269505000)
libHSfilepath-1.4.2.1-ghc9.0.2.so => /usr/lib/ghc-9.0.2/filepath-1.4.2.1/libHSfilepath-1.4.2.1-ghc9.0.
2.so (0x00007ff2694d2000)
libHSaeson-1.5.6.0-C19GJXDSM92LJPi4EK7PL5-ghc9.0.2.so => not found
libHSvector-0.12.3.1-2b175nNx5wND5qcnREemcu-ghc9.0.2.so => not found
libHSunordered-containers-0.2.18.0-5g7cvfJKetKCmnCFTnDbJb-ghc9.0.2.so => not found
libHSstrict-0.4.0.1-D6E5Iy4FuekGyXGwauQsyA-ghc9.0.2.so => not found
libHSunix-2.7.2.2-ghc9.0.2.so => /usr/lib/ghc-9.0.2/unix-2.7.2.2/libHSunix-2.7.2.2-ghc9.0.2.so (0x0000
7ff2693b9000)
libHStime-1.9.3-ghc9.0.2.so => /usr/lib/ghc-9.0.2/time-1.9.3/libHStime-1.9.3-ghc9.0.2.so (0x00007ff269
1f5000)
libHSscientific-0.3.7.0-2ciLBdxk3PkJ1Ff6Knc9zj-ghc9.0.2.so => not found
libHShashable-1.4.0.1-4LYnLqhVCzaKURVgzlvekc-ghc9.0.2.so => not found
libHStext-1.2.5.0-ghc9.0.2.so => /usr/lib/ghc-9.0.2/text-1.2.5.0/libHStext-1.2.5.0-ghc9.0.2.so (0x0000
7ff268f40000)
libHSbinary-0.8.8.0-ghc9.0.2.so => /usr/lib/ghc-9.0.2/binary-0.8.8.0/libHSbinary-0.8.8.0-ghc9.0.2.so (
0x00007ff268e2f000)
libHScontainers-0.6.4.1-ghc9.0.2.so => /usr/lib/ghc-9.0.2/containers-0.6.4.1/libHScontainers-0.6.4.1-g
hc9.0.2.so (0x00007ff2689b9000)
libHSbytestring-0.10.12.1-ghc9.0.2.so => /usr/lib/ghc-9.0.2/bytestring-0.10.12.1/libHSbytestring-0.10.
12.1-ghc9.0.2.so (0x00007ff268877000)
libHSX11-1.10.2-KQy9vQgF7qz18AG53z4Erf-ghc9.0.2.so => /usr/lib/libHSX11-1.10.2-KQy9vQgF7qz18AG53z4Erf-
ghc9.0.2.so (0x00007ff2685c1000)
libHSbase-4.15.1.0-ghc9.0.2.so => /usr/lib/ghc-9.0.2/base-4.15.1.0/libHSbase-4.15.1.0-ghc9.0.2.so (0x0
0007ff2678aa000)
libHSghc-bignum-1.1-ghc9.0.2.so => /usr/lib/ghc-9.0.2/ghc-bignum-1.1/libHSghc-bignum-1.1-ghc9.0.2.so (
0x00007ff26783b000)
libHSghc-prim-0.7.0-ghc9.0.2.so => /usr/lib/ghc-9.0.2/ghc-prim-0.7.0/libHSghc-prim-0.7.0-ghc9.0.2.so (
0x00007ff2672f7000)
libHSrts-ghc9.0.2.so => /usr/lib/ghc-9.0.2/rts/libHSrts-ghc9.0.2.so (0x00007ff267273000)
libX11.so.6 => /usr/lib/libX11.so.6 (0x00007ff26712f000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007ff266f25000)
libHSdeepseq-1.4.5.0-ghc9.0.2.so => /usr/lib/ghc-9.0.2/directory-1.3.6.2/../deepseq-1.4.5.0/libHSdeeps
eq-1.4.5.0-ghc9.0.2.so (0x00007ff266efd000)
libHSarray-0.5.4.0-ghc9.0.2.so => /usr/lib/ghc-9.0.2/directory-1.3.6.2/../array-0.5.4.0/libHSarray-0.5
.4.0-ghc9.0.2.so (0x00007ff266e44000)
librt.so.1 => /usr/lib/librt.so.1 (0x00007ff266e3f000)
libutil.so.1 => /usr/lib/libutil.so.1 (0x00007ff266e3a000)
libdl.so.2 => /usr/lib/libdl.so.2 (0x00007ff266e35000)
libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007ff266e2e000)
libgmp.so.10 => /usr/lib/libgmp.so.10 (0x00007ff266d8e000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007ff266ca6000)
libHStemplate-haskell-2.17.0.0-ghc9.0.2.so => /usr/lib/ghc-9.0.2/text-1.2.5.0/../template-haskell-2.17
.0.0/libHStemplate-haskell-2.17.0.0-ghc9.0.2.so (0x00007ff2667f9000)
libHSpretty-1.1.3.6-ghc9.0.2.so => /usr/lib/ghc-9.0.2/text-1.2.5.0/../pretty-1.1.3.6/libHSpretty-1.1.3
.6-ghc9.0.2.so (0x00007ff266764000)
libHSghc-boot-th-9.0.2-ghc9.0.2.so => /usr/lib/ghc-9.0.2/text-1.2.5.0/../ghc-boot-th-9.0.2/libHSghc-bo
ot-th-9.0.2-ghc9.0.2.so (0x00007ff266714000)
libXss.so.1 => /usr/lib/libXss.so.1 (0x00007ff26670f000)
libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0x00007ff26670a000)
libXext.so.6 => /usr/lib/libXext.so.6 (0x00007ff2666f3000)
libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0x00007ff2666e6000)
libHSdata-default-class-0.1.2.0-IxhEAzgy8931aXcEiJcyZO-ghc9.0.2.so => /usr/lib/libHSdata-default-class
-0.1.2.0-IxhEAzgy8931aXcEiJcyZO-ghc9.0.2.so (0x00007ff2666dd000)
libffi.so.8 => /usr/lib/libffi.so.8 (0x00007ff2666d1000)
libnuma.so.1 => /usr/lib/libnuma.so.1 (0x00007ff2666c3000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007ff266697000)
/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007ff2695cc000)
libXrender.so.1 => /usr/lib/libXrender.so.1 (0x00007ff26668a000)
libXau.so.6 => /usr/lib/libXau.so.6 (0x00007ff266685000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007ff26667d000)

I uninstalled arbtt, removing all dependencies and reinstalled

paru -Rns arbtt
paru -Suy arbtt

Same problem as before.

Ok. I can rebuild from sources. I installed the entire Haskell platform. I cloned the arbtt git repo and issued a build command

╭─user@machine in repo: arbtt on  master [?] via λ lts-13.18 took 20ms
╰─λ cabal install --installdir=bin --install-method=copy --overwrite-policy=always

So now i run into the following

Building executable 'arbtt-recover' for arbtt-0.11.1..
[1 of 8] Compiling Data.MyText      ( src/Data/MyText.hs, dist/build/arbtt-recover/arbtt-recover-tmp/Data/MyTe
xt.o )

src/Data/MyText.hs:3:1: error:
Could not find module ‘Data.ByteString.UTF8’
There are files missing in the ‘utf8-string-1.0.2’ package,
try running 'ghc-pkg check'.
Use -v (or `:set -v` in ghci) to see a list of the files searched for.
|
3 | import qualified Data.ByteString.UTF8 as BSU
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Seems it's unable to resolve a module which should be in the database. I checked:

ghc-pkg describe utf8-string-1.0.2
name:                 utf8-string
version:              1.0.2
visibility:           public
id:                   utf8-string-1.0.2-9eFA57BgKXNHtjvfuIOq9f
key:                  utf8-string-1.0.2-9eFA57BgKXNHtjvfuIOq9f
license:              BSD-3-Clause
maintainer:           [email protected]
author:               Eric Mertens
homepage:             https://github.com/glguy/utf8-string/
synopsis:             Support for reading and writing UTF8 Strings
description:
A UTF8 layer for Strings. The utf8-string
package provides operations for encoding UTF8
strings to Word8 lists and back, and for reading and
writing UTF8 without truncation.

category:             Codec
abi:                  a43e91352cc8ab180333686cc51dd6e4
exposed:              True
exposed-modules:
Codec.Binary.UTF8.Generic Codec.Binary.UTF8.String
Data.ByteString.Lazy.UTF8 Data.ByteString.UTF8 Data.String.UTF8

import-dirs:          /usr/lib/ghc-9.0.2/site-local/utf8-string-1.0.2
library-dirs:         /usr/lib/ghc-9.0.2/site-local/utf8-string-1.0.2
dynamic-library-dirs: /usr/lib
data-dir:             /usr/share/haskell-utf8-string
hs-libraries:         HSutf8-string-1.0.2-9eFA57BgKXNHtjvfuIOq9f
depends:              base-4.15.1.0 bytestring-0.10.12.1
haddock-interfaces:   /usr/share/doc/haskell-utf8-string/html/utf8-string.haddock
haddock-html:         /usr/share/doc/haskell-utf8-string/html
pkgroot: "/usr/lib/ghc-9.0.2"

Yep. There it is.

I also wrote to the arbtt author and he replied that he was using Debian and that he was expecting, and i quote " infrastructure that would have prevented you from installing the new utf8-string before the updated arbtt is ready". He was referring to the .so object that changed hash, object that was signaled as a dependency of the arbtt executable.

I'm stuck at this point. Any idea would be much appreciated.

Best Regards,
Razvan

Hmm, it appears you may have stumped the community on this one. I take it rolling back the utf8-string and freezing it is not an option?

Did the dev drop any hints on their timeline for the updated arbtt?

2 Likes

Ok, I managed to solve this by issuing a rebuild on the arbtt AUR package.

So it seems the accepted status quo in the community is that each user needs to rebuild their own AUR packages every time something they depend on has changed. All fine and reasonable except that paru does not find the need to update any package when asked.
The thing that was fooling me was that no matter how many times I removed and reinstalled the package it would use cached data by paru so it was effectively checking deps but not doing the actual build.
I had to manually remove ~/.cache/paru/clone/arbtt
After that, paru -Suy arbtt trigger a proper build.
I'll try to find a section of the forum related to AUR and if this is not detailed there, post it with a more meaningful name as a solution for other users in a similar situation

I sill have the problem that cabal is using the wrong compiled libs to try to rebuild, so that is another story altogether.

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.