[CMake] v3.7.0 - archive_cryptor_private.h - compile error

Gregor Jasny gjasny at googlemail.com
Sat Nov 26 12:52:11 EST 2016


On 26/11/2016 10:03, Hendrik Sattler wrote:
> I assume that maybe he tries to build with openssl 1.1

You're right. I assumed that "Debian GNU/Linux 8" does not contain
OpenSSL 1.1 but either the Debian version or OpenSSL version on Nathans
system is wrong.

> Am 26. November 2016 09:29:14 MEZ, schrieb Gregor Jasny via CMake <cmake at cmake.org>:
>> Hello,
>>
>> On 25/11/2016 19:25, Nathan Sizemore wrote:
>>> I receive the following when building:
>>>
>>> [ 40%] Building C object
>>>
>> Utilities/cmlibarchive/libarchive/CMakeFiles/cmlibarchive.dir/archive_cryptor.c.o
>>> In file included from
>>>
>> /home/nathan/development/cmake/Utilities/cmlibarchive/libarchive/archive_cryptor.c:32:0:
>>>
>> /home/nathan/development/cmake/Utilities/cmlibarchive/libarchive/archive_cryptor_private.h:107:17:
>>> error: field ‘ctx’ has incomplete type
>>>   EVP_CIPHER_CTX ctx;
>>
>> You are using the embedded copy of libarchive. I would suggest you
>> install the Debian CMake package build dependencies:
>>
>>  apt-get build-dep cmake
>>
>> so that you use the system libraries instead of the embedded ones.
>> Hopefully this will resolve your issue.

I reproduced the error on my Debian Sid machine, filed a bug against
CMake (https://gitlab.kitware.com/cmake/cmake/issues/16459) only to
discover that Brad King already filed a PR against upstream libarchive.

The following should solve Nathans problem:

apt-get build-dep cmake
apt-get install librhash-dev
cd <<cmake_source>>
mkdir _build
cd _build
../bootstrap --system-libs
make

See:
https://anonscm.debian.org/cgit/pkg-cmake/cmake.git/tree/debian/rules#n43

Debians libarchive does not use OpenSSL but nettle instead so the
OpenSSL incompatibility does not show up.

Thanks,
Gregor


More information about the CMake mailing list