The following issue has been SUBMITTED. 
====================================================================== 
https://cmake.org/Bug/view.php?id=15916 
====================================================================== 
Reported By:                R Jones
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15916
Category:                   CMake
Reproducibility:            always
Severity:                   tweak
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2016-01-13 14:17 EST
Last Modified:              2016-01-13 14:17 EST
====================================================================== 
Summary:                    [Buildroot] [PATCH] cmake: use system libzma when
the xz package is enabled
Description: 
I have XZ installed already.
I was trying to compile cmake using gmake and GCC4.

The error is:
Fix build failure:
.../output/build/host-cmake-3.1.3/Utilities/cmliblzma/liblzma/common/block_buffer_decoder.c:17:1:
error: conflicting types for ‘lzma_block_buffer_decode’
 lzma_block_buffer_decode(lzma_block *block, lzma_allocator *allocator,
 ^
In file included from
/home/tetsuya/buildroot/br2/output/host/usr/include/lzma.h:296:0,
                 from
/home/tetsuya/buildroot/br2/output/build/host-cmake-3.1.3/Utilities/cmliblzma/liblzma/common/common.h:34,
                 from
/home/tetsuya/buildroot/br2/output/build/host-cmake-3.1.3/Utilities/cmliblzma/liblzma/common/block_decoder.h:16,
                 from
/home/tetsuya/buildroot/br2/output/build/host-cmake-3.1.3/Utilities/cmliblzma/liblzma/common/block_buffer_decoder.c:13:
/home/tetsuya/buildroot/br2/output/host/usr/include/lzma/block.h:577:27: note:
previous declaration of ‘lzma_block_buffer_decode’ was here
 extern LZMA_API(lzma_ret) lzma_block_buffer_decode(
                           ^
Utilities/cmliblzma/CMakeFiles/cmliblzma.dir/build.make:261: recipe for target
'Utilities/cmliblzma/CMakeFiles/cmliblzma.dir/liblzma/common/block_buffer_decoder.c.o'
failed
make[3]: ***
[Utilities/cmliblzma/CMakeFiles/cmliblzma.dir/liblzma/common/block_buffer_decoder.c.o]
Error 1

Steps to Reproduce: 
On a Solaris system with with GCC4, GMAKE, ZLIB, EXPAT, BZIP2, CURL, XZ and
without cmake installed:

CFLAGS=-I{INSTARGET}/include

bash ./configure \
            --prefix=${INSTARGET} \
            --system-zlib \
            --system-expat \
            --system-bzip2 \
            --system-curl

Causes the problem in the description.

After patching bootstrap (see below), I was able to clear the problem with:
bash ./configure \
            --prefix=${INSTARGET} \
            --system-zlib \
            --system-expat \
            --system-bzip2 \
            --system-liblzma \
            --system-curl

Additional Information: 
I found this thread when looking into how to disable cmake build from trying to
include it's own liblzma instead of the system liblzma.  It seems that the
engine is prepared for it, but bootstrap does not allow --system-liblzma as an
option.  All I needed to do to disable the internal copy was to add this to
bootstrap and re-run configure:

$ diff bootstrap bootstrap.orig
652c652
<  
--system-bzip2|--system-curl|--system-expat|--system-jsoncpp|--system-libarchive|--system-zlib|--system-liblzma)
---
>  
--system-bzip2|--system-curl|--system-expat|--system-jsoncpp|--system-libarchive|--system-zlib)

Also would need to update the "help"

Is there some reason this option could not be added to the package?
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2016-01-13 14:17 R Jones        New Issue                                    
======================================================================

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to