macOS - How to build libarchive with lzma

34 views
Skip to first unread message

Hans Luijten

unread,
Apr 18, 2019, 6:15:52 AM4/18/19
to libarchive-discuss
My previously posted message is nowhere to be found - so my apologies up front in case this ends up to be a repeat of my previous question.

Since I have pretty much no experience in doing a build myself, my question may be silly or even stupid - again apologies if this is the case.
I've spend about a day trying to find the answer with Google, but so far without result.

I am trying to build libarchive (3.3.3) for macOS (10.14.4 - Mojave) with "make".
This works well following the steps posted in the libarchive wiki.

The problem I'm running into is that lzma is not being detected.
When I try to decompress a .xz file, libarchive keeps trying to execute an external command (xz) - which I want to avoid.

liblzma.5.dylib is installed on my system, and I've even build (static and dynamic) liblzma from source as well (so I do have the lzma sources).
From my application I can talk to both dylibs successfully.

When doing a "configure", I always get;

checking lzma.h usability... no
checking lzma
.h presence... no
checking
for lzma.h... no
checking
for lzma_stream_decoder in -llzma... yes
checking whether we have multithread support
in lzma... no

Can someone please help and recommend how I should do such a build?
What files do I need and where do I put them (since it can't seem to find lzma.h)?

I've tried a few of the configure options, to no avail.

I'm trying to build libarchive with "everything included" - if that makes sense ;-) 

Hans Luijten

unread,
Apr 18, 2019, 7:31:00 AM4/18/19
to libarchive-discuss
Seems I finally found an answer to my own question;

It seems I have to install Brew first;

and then install xz;

brew install xz

It's OK to have Brew on my Mac for development purposes, but I'd rather have my dev environment match a "regular" Mac - so I can test and determine what files I need to distribute with my application.
Reply all
Reply to author
Forward
0 new messages