Compiling libarchive with no cmake
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
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.
Hi there,
Not sure if I misunderstood, but I can't find ./configure under the master branch. Where can I find it?
-- Ivan
It's not included in the master branch, but created using build/autogen.sh as part of the release process.
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.
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.