libarchive

Multi-format archive and compression library

Latest version: 3.8.9

Add to xmake.lua

add_requires("libarchive 3.8.9")

Learn how to add and link packages with Xmake →

Information

License
BSD-2-Clause
Recipe updated
2026-09-14T07:16:25.000Z

Platforms

  • linux: i386, x86_64, armv7, armv7s, arm64, mips, mips64, mipsel, mips64el, loong64, riscv64, s390x, ppc, ppc64, ppc64el, sparc64
  • macosx: x86_64, arm64
  • windows: x86, x64, arm, arm64, arm64ec

Options

bzip2
Enable use of BZIP2. · Type: boolean · Default: true
lz4
Enable use of LZ4. · Type: boolean · Default: true
lzma
Deprecated, use xz config instead · Type: boolean
lzo
Enable use of LZO. · Type: boolean · Default: true
openssl3
Enable use of OpenSSL. · Type: boolean · Default: true
xz
Enable use of XZ/LZMA. · Type: boolean · Default: true
zlib
Enable use of GZIP/ZIP. · Type: boolean · Default: true
zstd
Enable use of ZSTD. · Type: boolean · Default: true

Versions

  • 3.5.1
  • 3.5.2
  • 3.6.2
  • 3.7.2
  • 3.7.7
  • 3.8.4
  • 3.8.5
  • 3.8.6
  • 3.8.7
  • 3.8.8
  • 3.8.9

Dependencies

Used by (1)

Packages declaring this dependency; requirements can vary by platform and configuration.

Install with xrepo

Install the package independently of a project and inspect its available configuration.

install

xrepo install "libarchive 3.8.9"

show info

xrepo info "libarchive"

Link a library to your target

Declare the requirement, then attach the library to the target that uses it.

xmake.lua

add_requires("libarchive 3.8.9")

target("demo")
    set_kind("binary")
    add_files("src/*.cpp")
    add_packages("libarchive")

Open a package environment

Open a shell with the environment exported by this package. Use the executable names documented by the package.

enter shell

xrepo env -b "libarchive 3.8.9" shell