libarchive icon indicating copy to clipboard operation
libarchive copied to clipboard

Compiling libarchive with no cmake

Open BrainUser314 opened this issue 2 years ago • 1 comments

I’m trying to compile libarchive for the purpose of parsing tar files on the fly, without the help of cmake and with no file system available

BrainUser314 avatar Dec 13 '23 11:12 BrainUser314

If you download one of the official source tarballs, you can use ./configure && make to build it. The configure script is not part of the github sources; there's a shell script in the build directory that can compile a configure script using autotools.

If you need to build it some other way: You'll need all the source files in the libarchive directory and a suitable config.h file with details about your system. Compile them into a library. That's about it.

kientzle avatar Dec 14 '23 02:12 kientzle

Hi there,

Not sure if I misunderstood, but I can't find ./configure under the master branch. Where can I find it?

-- Ivan

lifehome avatar Mar 31 '24 18:03 lifehome

It's not included in the master branch, but created using build/autogen.sh as part of the release process.

jsonn avatar Mar 31 '24 18:03 jsonn

Thanks! Sorry I misread it should be using the official tarball, but the build/autogen.sh seems great as well, as I'm compiling for RPi on some weird distro env.

lifehome avatar Mar 31 '24 18:03 lifehome

If you're looking for something very minimal, you might also take a look at contrib/untar.c which is a very compact tar extraction program implemented as a single tar file. It is of course nowhere near as robust as libarchive -- for example, it only understands the most basic variant of tar format -- but may be a useful starting point if you need very basic operation in a small footprint.

kientzle avatar Mar 31 '24 18:03 kientzle