Add linux builds of 7z.so for some architectures

x86_64, x86, arm64
This commit is contained in:
Luis Ángel San Martín 2023-07-20 12:40:44 +02:00
parent f3866b3a2f
commit c549bcdd96
5 changed files with 52 additions and 1 deletions

View File

@ -0,0 +1,52 @@
Steps for building 7z.so (Done with Ubuntu 23.10 mantic, and 7zip 23.01)
apt-get source 7zip (you may need to add src sources to sources.list -> sudo sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list)
add the architectures you need if you are cross compiling, e.g.
dpkg --add-architecture arm64
apt-get update
in 7zip-23.01+dfsg/rules enable rar support by removing all DISABLE_RAR* lines, we need RAR support
Build time
in 7zip-23.01+dfsg, run the following command to build on the current architecture
dpkg-buildpackage -us -uc -b
and run with --host-arch to cross compile
dpkg-buildpackage -us -uc -b --host-arch [arch] (e.g. dpkg-buildpackage -us -uc -b --host-arch arm64)
you'll find the binaries in 7zip-23.01+dfsg/debian/7zip/usr/lib/7zip
additional compilers you may need to install to be able to cross compile:
arm64
apt-get install gcc-aarch64-linux-gnu
apt-get install g++-aarch64-linux-gnu
x86
apt-get install gcc-i686-linux-gnu
apt-get install g++-i686-linux-gnu
armhf (failed to compile)
apt-get install gcc-arm-linux-gnueabihf
apt-get install g++-arm-linux-gnueabihf
armel (failed to compile)
apt-get install gcc-arm-linux-gnueabi
apt-get install g++-arm-linux-gnueabi
Contribution
Please, feel free to add more architectures by opening a PR. Just make sure 7z.so is compiled from Format7zF with rar support and test it using 7z executable which loads 7z.so to do the decompresion.

View File

@ -1 +0,0 @@
Get 7z.so prebuilt binaires for 7zip 23.01 using Format7zF bundle with asm support.

BIN
dependencies/7zip/linux/arm64/7z.so vendored Normal file

Binary file not shown.

BIN
dependencies/7zip/linux/x86/7z.so vendored Normal file

Binary file not shown.

BIN
dependencies/7zip/linux/x86_64/7z.so vendored Normal file

Binary file not shown.