Hamish Nicholson created ARROW-16572:
----------------------------------------

             Summary: [C++] LZ4 fails to build when depending on arrow via CMake
                 Key: ARROW-16572
                 URL: https://issues.apache.org/jira/browse/ARROW-16572
             Project: Apache Arrow
          Issue Type: Bug
          Components: C++
            Reporter: Hamish Nicholson


When depending on arrow as an external CMake project in another CMake project, 
and attempting to build LZ4 from source the following occurs:
{code:java}
[ 11%] Performing build step for 'lz4_ep'
cd 
/tmp/tmp.uDaq1bz2ia/cmake-build-debug-diascld-36/_deps/arrow-download-build/lz4_ep-prefix/src/lz4_ep
 && /scratch/chrysoge/pelago-llvm-14/opt/bin/cmake -P 
/tmp/tmp.uDaq1bz2ia/cmake-build-debug-diascld-36/_deps/arrow-download-build/lz4_ep-prefix/src/lz4_ep-stamp/lz4_ep-build-DEBUG.cmake
CMake Error at 
/tmp/tmp.uDaq1bz2ia/cmake-build-debug-diascld-36/_deps/arrow-download-build/lz4_ep-prefix/src/lz4_ep-stamp/lz4_ep-build-DEBUG.cmake:37
 (message):
  Command failed: 127

   'sh' '/tmp/tmp.uDaq1bz2ia/build-support/build-lz4-lib.sh' 
'AR=/scratch/pelago/llvm-14/opt/bin/llvm-ar' 'OS=Linux'

  See also

    
/tmp/tmp.uDaq1bz2ia/cmake-build-debug-diascld-36/_deps/arrow-download-build/lz4_ep-prefix/src/lz4_ep-stamp/lz4_ep-build-*.log


-- stdout output is:

-- stderr output is:
sh: 0: Can't open /tmp/tmp.uDaq1bz2ia/build-support/build-lz4-lib.sh

CMake Error at 
/tmp/tmp.uDaq1bz2ia/cmake-build-debug-diascld-36/_deps/arrow-download-build/lz4_ep-prefix/src/lz4_ep-stamp/lz4_ep-build-DEBUG.cmake:47
 (message):
  Stopping after outputting logs. {code}
(/tmp/tmp.uDaq1bz2ia is the root CMake source directory of the parent CMake 
project)

This is due to the use of `CMAKE_SOURCE_DIR` instead of 
`CMAKE_CURRENT_SOURCE_DIR`. I will have a PR up for this shortly.

 



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to