Bug 505637

Summary: Ark fails to create and extract .7z files -- ark.cli7z: "oad Error: /usr/bin/7z.so : errno=25 : Inappropriate ioctl for device"
Product: [Applications] ark Reporter: Michael <frost.choosing865>
Component: pluginsAssignee: Elvis Angelaccio <elvis.angelaccio>
Status: RESOLVED DOWNSTREAM    
Severity: major CC: rthomsen6
Priority: NOR    
Version First Reported In: 25.04.2   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
See Also: https://bugzilla.redhat.com/show_bug.cgi?id=2373874
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Michael 2025-06-15 17:48:16 UTC
SUMMARY

Log Message reads the following when trying to extract or when trying to create a password protected .7z archive. 

ark.cli7z: "oad Error: /usr/bin/7z.so : errno=25 : Inappropriate ioctl for device"

The process fails and no extracted/compressed files are actually created. This is a fairly recent regression as I remember a couple months ago being able to extract and create .7z archives just fine with Ark. 

Extraction via p7zip command line or PeaZip works fine, tested with different archives. 'p7zip' and 'p7zip-plugins' are installed and the plugin is enabled on Ark. Current version of p7zip in Fedora (42 and Rawhide) is 16.02-32.fc42, bumped from 16.02-31.fc41 in Fedora 41.

Operating System: Fedora Linux 43
KDE Plasma Version: 6.3.91
KDE Frameworks Version: 6.14.0
Qt Version: 6.9.1
Kernel Version: 6.16.0-0.rc1.250613g27605c8c0f69.21.fc43.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 16 × 12th Gen Intel® Core™ i5-1240P
Memory: 16 GiB of RAM (15,3 GiB usable)
Graphics Processor: Intel® Iris® Xe Graphics
Manufacturer: LG Electronics
Product Name: 15Z90Q-G.AA52P
System Version: 0.1
Comment 1 2wxsy58236r3 2025-06-16 00:49:14 UTC
Can you please try whether replacing `p7zip` by `7zip` makes any difference?

`p7zip` is abandoned and unmaintained, and is superseded by `7zip` (see also Bug 440135 comment 8).
Comment 2 Michael 2025-06-16 12:27:33 UTC
(In reply to 2wxsy58236r3 from comment #1)
> Can you please try whether replacing `p7zip` by `7zip` makes any difference?
> 
> `p7zip` is abandoned and unmaintained, and is superseded by `7zip` (see also
> Bug 440135 comment 8).

I checked and 7zip rather than p7zip is installed in Fedora. 7zip is a dependency of Ark and 7z plugin is enabled in Ark settings. I was wrongly assuming p7zip was installed.

On the command line 7z invokes the maintained version and works correctly.
7-Zip 24.09 (x64) : Copyright (c) 1999-2024 Igor Pavlov : 2024-11-29
 64-bit locale=en_US.UTF-8 Threads:16 OPEN_MAX:1024

---

sudo dnf info 7zip
Updating and loading repositories:
Repositories loaded.
Installed packages
Name            : 7zip
Epoch           : 0
Version         : 24.09
Release         : 4.fc43
Architecture    : x86_64
Installed size  : 3.2 MiB
Source          : 7zip-24.09-4.fc43.src.rpm
From repository : 21709673c31449538b880ac844fbaf82
Summary         : A file archiver
URL             : https://7-zip.org
License         : LGPL-2.1-or-later AND BSD-3-Clause AND BSD-2-Clause AND LicenseRef-Fedora-Public-Domain
Description     : 7-Zip is a file archiver with a high compression ratio. The main features
                : of 7-Zip are:
                : 
                : * High compression ratio in 7z format with LZMA and LZMA2 compression
                : * Supported formats:
                :   * Packing / unpacking: 7z, XZ, BZIP2, GZIP, TAR, ZIP and WIM
                :   * Unpacking only: AR, ARJ, CAB, CHM, CPIO, CramFS, DMG, EXT, FAT,
                :     GPT, HFS, IHEX, ISO, LZH, LZMA, MBR, MSI, NSIS, NTFS, QCOW2,
                :     RPM, SquashFS, UDF, UEFI, VDI, VHD, VMDK, WIM, XAR and Z.
                : * For ZIP and GZIP formats, 7-Zip provides a compression ratio that is
                :   2-10 % better than the ratio provided by PKZip and WinZip
                : * Strong AES-256 encryption in 7z and ZIP formats
                : * Powerful command line version
Vendor          : Fedora Project

---

sudo dnf info p7zip
Updating and loading repositories:
Repositories loaded.
Available packages
Name           : p7zip
Epoch          : 0
Version        : 16.02
Release        : 32.fc42
Architecture   : x86_64
Download size  : 696.5 KiB
Installed size : 1.8 MiB
Source         : p7zip-16.02-32.fc42.src.rpm
Repository     : rawhide
Summary        : Very high compression ratio file archiver
URL            : http://p7zip.sourceforge.net/
License        : LicenseRef-Callaway-LGPLv2 AND (LicenseRef-Callaway-LGPLv2+ OR CPL-1.0)
Description    : p7zip is a port of 7za.exe for Unix. 7-Zip is a file archiver with a very high
               : compression ratio. The original version can be found at http://www.7-zip.org/.
Vendor         : Fedora Project
Comment 3 2wxsy58236r3 2025-06-17 01:20:17 UTC
I wonder if this is due to Fedora's 7-Zip packaging.

Fedora patches 7-Zip's source code to find 7z.so in `/usr/libexec/7zip`. It installs the `7z` binary under `/usr/bin` and `7z.so` under `/usr/libexec/7zip`.

Meanwhile, Arch packages in another way: it does not patch the source code, installs 7-Zip under `/usr/lib/7zip`, and creates wrapper scripts under `/usr/bin`.

Perhaps you can try whether copying `7z.so` to `/usr/bin` can workaround the issue?
Comment 4 Michael 2025-06-19 13:28:13 UTC
(In reply to 2wxsy58236r3 from comment #3)
> I wonder if this is due to Fedora's 7-Zip packaging.
> 
> Fedora patches 7-Zip's source code to find 7z.so in `/usr/libexec/7zip`. It
> installs the `7z` binary under `/usr/bin` and `7z.so` under
> `/usr/libexec/7zip`.
> 
> Meanwhile, Arch packages in another way: it does not patch the source code,
> installs 7-Zip under `/usr/lib/7zip`, and creates wrapper scripts under
> `/usr/bin`.
> 
> Perhaps you can try whether copying `7z.so` to `/usr/bin` can workaround the
> issue?

Indeed it does work. Ark successfully extracts .7z files (also password protected archives) if '7z.so' is copied to 
I will report the packaging issue at Fedora.
Thank you for the assistance.