Bug 2066621 - perl-Gtk2-Spell-1.05-5.fc37 FTBFS: enchant error for language: en at t/0.GtkSpell.t line 36.
Summary: perl-Gtk2-Spell-1.05-5.fc37 FTBFS: enchant error for language: en at t/0.GtkS...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: enchant
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Parag Nemade
QA Contact: Fedora Extras Quality Assurance
URL: https://koschei.fedoraproject.org/pac...
Whiteboard:
Depends On:
Blocks: F37FTBFS
TreeView+ depends on / blocked
 
Reported: 2022-03-22 08:01 UTC by Petr Pisar
Modified: 2022-04-14 09:11 UTC (History)
4 users (show)

Fixed In Version: enchant-1.6.0-30.fc36
Clone Of:
Environment:
Last Closed: 2022-04-14 09:11:18 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Petr Pisar 2022-03-22 08:01:47 UTC
perl-Gtk2-Spell-1.05-5.fc37 fails to build in Fedora 37 because a test fails:

+ xvfb-run -d make test
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Spell.bs blib/arch/auto/Gtk2/Spell/Spell.bs 644
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
enchant error for language: en at t/0.GtkSpell.t line 36.
# Looks like your test exited with 255 just after 2.
t/0.GtkSpell.t .. 
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 6/8 subtests 
Test Summary Report
-------------------
t/0.GtkSpell.t (Wstat: 65280 Tests: 2 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 8 tests but ran 2.

A difference between passing and failing build roots is at <https://koschei.fedoraproject.org/build/12429465>. An upgrade of hunspell from 1.7.0-18.fc37 to 1.7.0-19.fc37 looks suspicious:

commit 5e321c5e7bd91babbb443dd2a28f4fee05efcd12 (HEAD -> rawhide, origin/rawhide, origin/main, origin/f36, origin/HEAD)
Author: Jens Petersen <petersen>
Date:   Wed Mar 16 11:50:57 2022 +0800

    revert the myspell compat symlink changes (rhbz#2064189)
    
    relative to 6ffc042, the only change now is really to add
    /usr/share/hunspell to filesystem
    
    This should also help with rpm-ostree, eg Silverblue 36:
    currently dictionaries still in myspell/ can't be installed (upgraded).
    
    So this simplifies things a lot and seems much cleaner
    both pretrans and post for filesystem are gone.
    
    The only downside is that any legacy apps with hardcoded
    /usr/share/myspell might stop working for spellchecking.
    Perhaps a hunspell-filesystem-compat package could be added
    later to carry the symlink once all the Fedora dicts have been moved.

Comment 1 Petr Pisar 2022-03-22 08:39:16 UTC
perl-Gtk2-Spell does not hardcore any path to dictionaries. All it does is using gtkspell:

$ xvfb-run -d perl -Iblib/{lib,arch} t/0.GtkSpell.t
[...]
openat(AT_FDCWD, "/home/test/.config/enchant", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 10
newfstatat(10, "", {st_mode=S_IFDIR|0700, st_size=4096, ...}, AT_EMPTY_PATH) = 0
openat(AT_FDCWD, "/home/test/.enchant", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/charset.alias", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib64/enchant", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 10
newfstatat(10, "", {st_mode=S_IFDIR|0755, st_size=4096, ...}, AT_EMPTY_PATH) = 0
newfstatat(AT_FDCWD, "/usr/lib64/enchant/libenchant_myspell.so", {st_mode=S_IFREG|0755, st_size=28472, ...}, 0) = 0
openat(AT_FDCWD, "/usr/lib64/enchant/libenchant_myspell.so", O_RDONLY|O_CLOEXEC) = 11
newfstatat(11, "", {st_mode=S_IFREG|0755, st_size=28472, ...}, AT_EMPTY_PATH) = 0
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 11
newfstatat(11, "", {st_mode=S_IFREG|0644, st_size=33453, ...}, AT_EMPTY_PATH) = 0
openat(AT_FDCWD, "/lib64/libhunspell-1.7.so.0", O_RDONLY|O_CLOEXEC) = 11
newfstatat(11, "", {st_mode=S_IFREG|0755, st_size=562944, ...}, AT_EMPTY_PATH) = 0
openat(AT_FDCWD, "/lib64/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 11
newfstatat(11, "", {st_mode=S_IFREG|0755, st_size=2360104, ...}, AT_EMPTY_PATH) = 0
openat(AT_FDCWD, "/lib64/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 11
newfstatat(11, "", {st_mode=S_IFREG|0755, st_size=128520, ...}, AT_EMPTY_PATH) = 0
openat(AT_FDCWD, "/lib64/libtinfo.so.6", O_RDONLY|O_CLOEXEC) = 11
newfstatat(11, "", {st_mode=S_IFREG|0755, st_size=191680, ...}, AT_EMPTY_PATH) = 0
openat(AT_FDCWD, "/usr/share/enchant/enchant.ordering", O_RDONLY) = 10
newfstatat(10, "", {st_mode=S_IFREG|0644, st_size=167, ...}, AT_EMPTY_PATH) = 0
openat(AT_FDCWD, "/home/test/.enchant/enchant.ordering", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/test/.config/enchant/enchant.ordering", O_RDONLY) = -1 ENOENT (No such file or directory)
access("/home/test/.config/enchant/myspell/en.dic", F_OK) = -1 ENOENT (No such file or directory)
access("/home/test/.enchant/myspell/en.dic", F_OK) = -1 ENOENT (No such file or directory)
access("/usr/local/share/myspell/dicts/en.dic", F_OK) = -1 ENOENT (No such file or directory)
access("/usr/share/myspell/dicts/en.dic", F_OK) = -1 ENOENT (No such file or directory)
access("/usr/share/enchant/myspell/en.dic", F_OK) = -1 ENOENT (No such file or directory)
access("/usr/share/myspell/en.dic", F_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/test/.config/enchant/myspell", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/test/.enchant/myspell", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/local/share/myspell/dicts", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/myspell/dicts", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/enchant/myspell", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/myspell", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 10
newfstatat(10, "", {st_mode=S_IFDIR|0755, st_size=4096, ...}, AT_EMPTY_PATH) = 0
access("/home/test/.config/enchant/myspell/en.dic", F_OK) = -1 ENOENT (No such file or directory)
access("/home/test/.enchant/myspell/en.dic", F_OK) = -1 ENOENT (No such file or directory)
access("/usr/local/share/myspell/dicts/en.dic", F_OK) = -1 ENOENT (No such file or directory)
access("/usr/share/myspell/dicts/en.dic", F_OK) = -1 ENOENT (No such file or directory)
access("/usr/share/enchant/myspell/en.dic", F_OK) = -1 ENOENT (No such file or directory)
access("/usr/share/myspell/en.dic", F_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/test/.config/enchant/myspell", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/test/.enchant/myspell", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/local/share/myspell/dicts", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/myspell/dicts", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/enchant/myspell", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/myspell", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 10
newfstatat(10, "", {st_mode=S_IFDIR|0755, st_size=4096, ...}, AT_EMPTY_PATH) = 0
enchant error for language: en at t/0.GtkSpell.t line 36.
# Looks like your test exited with 255 just after 2.

The locale is LANG=en_US.UTF-8, /usr/share/myspell is an empty directory and /usr/share/hunspell directory contains en_US.dic and en_US.aff files.

Comment 2 Petr Pisar 2022-03-22 08:48:51 UTC
# rpm -qa |grep spell | sort
gtkspell-devel-2.0.16-25.fc36.x86_64
gtkspell-2.0.16-25.fc36.x86_64
hunspell-en-US-0.20140811.1-22.fc36.noarch
hunspell-filesystem-1.7.0-19.fc37.x86_64
hunspell-1.7.0-19.fc37.x86_64

# rpm -qa |grep enchant |sort
enchant-1.6.0-29.fc36.x86_64
python3-enchant-3.2.2-2.fc36.noarch

It looks like a bug in enchant:

$ enchant -l
Couldn't create a dictionary for en_US.UTF-8
$ enchant-lsmod 
myspell (Myspell Provider)

See? Enchant does not support hunspell, hence it does not search /usr/share/hunspell.


Note You need to log in before you can comment on or make changes to this bug.