[SOLVED] No xz-static package?

Issues related to applications and software problems
Post Reply
jake1138
Posts: 11
Joined: 2015/04/16 23:41:51

[SOLVED] No xz-static package?

Post by jake1138 » 2015/04/22 17:15:04

There is no xz-static package but I was able to create a liblzma.a static library. Thanks goes to giulix63 who helped me create a libbz2.a in this post. A similar procedure was used here. I'm sharing my solution in case it proves useful to someone in the future. You can (and should) execute the commands as a non-root user.

Code: Select all

mkdir liblzma_TEMP && cd liblzma_TEMP
yumdownloader --source xz-devel
rpm2cpio xz-5.1.2-9alpha.el7.src.rpm | cpio -idv
tar xf xz-5.1.2alpha.tar.gz
cd xz-5.1.2alpha
patch -Np1 < ../xz-5.1.2alpha-man-page-day.patch
patch -Np1 < ../xz-5.1.2alpha-xzgrep-and-h-option.patch
patch -Np1 < ../xz-5.1.2alpha-less-version-check.patch
./configure --enable-static
make
The resulting static library will be located at ./src/liblzma/.libs/liblzma.a. You can then copy it to /usr/lib64 (which requires root access; you can use sudo to copy it).

Post Reply