Cmake configure does not find ZLIB libraries on non-default "/lib"
When I try to build & install cmake, the configuration complains about a missing liblzma.so.
This seems due to the fact, that cmake does look in "/usr/lib/...", but the default ABI libraries lay in "/usr/libx32/...". I assume this bug also affects systems which use "/usr/lib64/" as a default (like Sparc).
-- Found ZLIB: /usr/lib/libz.so (found version "1.2.8")
-- Found CURL: /usr/lib/libcurl.so (found version "7.51.0")
-- Found BZip2: /usr/lib/libbz2.so (found version "1.0.6")
-- Looking for BZ2_bzCompressInit
-- Looking for BZ2_bzCompressInit - not found
-- Looking for lzma_auto_decoder in /usr/lib/liblzma.so
-- Looking for lzma_auto_decoder in /usr/lib/liblzma.so - not found
-- Looking for lzma_easy_encoder in /usr/lib/liblzma.so
-- Looking for lzma_easy_encoder in /usr/lib/liblzma.so - not found
-- Looking for lzma_lzma_preset in /usr/lib/liblzma.so
-- Looking for lzma_lzma_preset in /usr/lib/liblzma.so - not found
-- Could NOT find LibLZMA (missing: LIBLZMA_HAS_AUTO_DECODER LIBLZMA_HAS_EASY_ENCODER LIBLZMA_HAS_LZMA_PRESET) (found version "5.2.2")
CMake Error at CMakeLists.txt:384 (message):
CMAKE_USE_SYSTEM_LIBLZMA is ON but LibLZMA is not found!
Call Stack (most recent call first):
CMakeLists.txt:636 (CMAKE_BUILD_UTILITIES)
Here is a more detailed bug report: https://bugs.gentoo.org/show_bug.cgi?id=595508
the first visible error says "Could NOT find LibLZMA" but the real problem is hidden in the CMakeError.log and is: /usr/lib64/liblzma.so: error adding symbols: File in wrong format