Package Details: 7-zip-full 24.09-1

Git Clone URL: https://aur.archlinux.org/7-zip-full.git (read-only, click to copy)
Package Base: 7-zip-full
Description: File archiver with a high compression ratio (full package to replace p7zip)
Upstream URL: https://7-zip.org/
Keywords: 7-zip 7z 7zip archiver compress p7zip zip
Licenses: BSD-3-Clause, LGPL-2.1-or-later, LicenseRef-UnRAR
Conflicts: p7zip
Provides: 7-zip, 7z.so, p7zip
Submitter: Hanabishi
Maintainer: Hanabishi
Last Packager: Hanabishi
Votes: 72
Popularity: 3.86
First Submitted: 2022-01-07 08:49 (UTC)
Last Updated: 2024-11-30 13:30 (UTC)

Dependencies (2)

Required by (430)

Sources (4)

Pinned Comments

Hanabishi commented on 2022-01-07 08:53 (UTC) (edited on 2023-09-18 11:00 (UTC) by Hanabishi)

Not all apps are compatible with original 7-zip binaries!
In case of problems, try reverting to original p7zip.

Latest Comments

« First ‹ Previous 1 2 3 4 5 Next › Last »

simona commented on 2022-11-20 19:48 (UTC)

I would like to install this package ... I think it is the most complete? also contains a gui? however there are a lot of p7zip dependencies ...

<deleted-account> commented on 2022-11-05 03:09 (UTC)

@Hanabishi thanks for the help.
I have permissions and ownership, and I also changed the line in the PKGBUILD, but it still gives the same error.
The 7-zip package works so I'll just use that, but thanks!

Hanabishi commented on 2022-11-03 02:08 (UTC) (edited on 2022-11-03 02:10 (UTC) by Hanabishi)

@calcium, well, check that you have permissions and ownership for the package directory.

Also try to edit PKGBUILD, change this line:

chmod -R a=r,a+X,u+w .

to

chmod -R a=rw,a+X .

and see does something changed.

<deleted-account> commented on 2022-11-02 22:20 (UTC)

The package doesn't build, I get this error:

make: g++: Permission denied
make: *** [../../7zip_gcc.mak:399: /home/yfoow/7-zip-full/src/build/StreamBinder.o] Error 127
make: Leaving directory '/home/yfoow/7-zip-full/src/CPP/7zip/Bundles/Alone'
==> ERROR: A failure occurred in build().

Hanabishi commented on 2022-09-20 12:42 (UTC) (edited on 2022-11-20 20:26 (UTC) by Hanabishi)

To build without ASM (uasm), set NO_ASM variable. For example:

NO_ASM=1 makepkg -si

Hanabishi commented on 2022-09-16 20:55 (UTC)

@ZhangHua, I implemented your request, but in slightly different way.
Now the package can be built for all supported architectures and with clang.

ZhangHua commented on 2022-09-16 02:35 (UTC)

Hello, I think this patch will allow this program to build under arm64 and x86 arch and with clang and gcc compiler, please consider merging it:

diff --git a/PKGBUILD b/PKGBUILD
index d382295..3bff388 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,26 +10,50 @@ provides=("${pkgname%-full}" 'p7zip')
 conflicts=("${provides[@]}")

 _archive="7z${pkgver//./}-src.tar.xz"
+_compiler=${CC:-gcc}
+[[ ${_compiler} == clang ]] && makedepends+=('clang' 'lld')

 source=(
     "${_archive}::${url}/a/${_archive}"
     'prepare.patch'
 )

-sha256sums=(
-    '393098730c70042392af808917e765945dc2437dee7aae3cfcc4966eb920fbc5'
-    'fa1fd77e9d95f97d349f057c53b9ba4bacde64b2fae3a50d16b1d93e991d7866'
-)
+sha256sums=('393098730c70042392af808917e765945dc2437dee7aae3cfcc4966eb920fbc5'
+            '4e010de2dce2eebbe72d0e9f72fbf953eb2f8cba7bffbae53bda1544e3879101')

 prepare() {
     cd "${srcdir}"
     chmod -R a=r,a+X,u+w .
     patch -p0 --binary -i "${source[1]}"
+    for file in var_{clang,gcc}{,_{arm64,x64,x86}}.mak
+    do
+        sed -i '
+        s#O=b/c_$(PLATFORM)#O=$(BUILD_DIR)#;
+        s#O=b/g_$(PLATFORM)#O=$(BUILD_DIR)#;
+        s#O=b/c#O=$(BUILD_DIR)#;
+        s#O=b/g#O=$(BUILD_DIR)#
+        ' "${srcdir}/CPP/7zip/${file}"
+    done
+
 }

 build() {
+    case ${CARCH} in
+       x86_64)
+           _arch=_x64
+           ;;
+       aarch64)
+           _arch=_arm64
+           ;;
+       i686)
+           _arch=_x86
+           ;;
+       *)
+           _arch=
+           ;;
+    esac
     local bundles="${srcdir}/CPP/7zip/Bundles"
-    local mak="${srcdir}/CPP/7zip/cmpl_gcc_x64.mak"
+    local mak="${srcdir}/CPP/7zip/cmpl_${_compiler}${_arch}.mak"
     local targets=("Alone" "Alone2" "Alone7z" "Format7zF")
     (
         export BUILD_DIR="${srcdir}/build"
diff --git a/prepare.patch b/prepare.patch
index f3db023..61feacd 100644
--- a/prepare.patch
+++ b/prepare.patch
@@ -15,9 +15,3 @@
 @@ -182 +182 @@
 -CXXFLAGS = $(MY_ARCH_2) $(LOCAL_FLAGS) $(CXXFLAGS_BASE2) $(CFLAGS_BASE) $(CXXFLAGS_EXTRA) $(CC_SHARED) -o $@ $(CXX_WARN_FLAGS)
 +CXXFLAGS += $(MY_ARCH_2) $(LOCAL_FLAGS) $(CXXFLAGS_BASE2) $(CFLAGS_BASE) $(CXXFLAGS_EXTRA) $(CC_SHARED) -o $@ $(CXX_WARN_FLAGS)
-
---- CPP/7zip/var_gcc_x64.mak
-+++ CPP/7zip/var_gcc_x64.mak
-@@ -2 +2 @@
--O=b/g_$(PLATFORM)
-+O=$(BUILD_DIR)

Hanabishi commented on 2022-09-12 12:56 (UTC)

Checked with the custom flags and its seems ok. Here is an update with a respective patch.

Hanabishi commented on 2022-09-12 11:40 (UTC)

@saltedcoffii, if you look at PKGBUILD you can see it has nothing to do with CFLAGS. They are baked in the source makefiles.
I can patch the source to respect custom CFLAGS, but can't say is this a good idea or not. Backed flags are very specific and obviously have some intentions by the developer.

saltedcoffii commented on 2022-09-12 11:26 (UTC)

7-zip-full does not respect custom CFLAGS specified in /etc/makepkg.conf. I have the following CFLAGS set:

CFLAGS="-march=x86-64-v2 -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -mpclmul"

The compiler invocation (the first one) is as follows:

gcc      -O2 -c -Wall -Werror -Wextra -Waddress -Waddress-of-packed-member -Waggressive-loop-optimizations -Wattributes -Wbool-compare -Wbool-operation -Wcast-align -Wcast-align=strict -Wcomment -Wdangling-else -Wdiv-by-zero -Wduplicated-branches -Wduplicated-cond -Wformat-contains-nul -Wimplicit-fallthrough=5 -Winit-self -Wint-in-bool-context -Wint-to-pointer-cast -Wunused -Wunused-macros -Wconversion   -DNDEBUG -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fPIC -Wno-maybe-uninitialized  -o /home/saltedcoffee/Projects/7-zip-full/src/build/7zStream.o ../../../../C/7zStream.c

If this is an issue with upstream, not with the PKGBUILD, let me know and I'm happy to report it.