tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CMake out-of-source builds



Le 31/07/2017 à 01:26, Kamil Rytarowski a écrit :
> On 30.07.2017 23:54, Frédéric Fauberteau wrote:
>> Hi,
>>
>> I am working on the update of wm/awesome. Since version 4.2, in-source
>> builds are no longer supported.
>>
>> Therefore I tried a hack to add the ouf-of-source build feature to pkgsrc:
>> http://ftp.netbsd.org/pub/NetBSD/misc/triaxx/pkgsrc/mk/cmake-outsource.diff
>>
>> The idea is to build in ${WRKDIR}/.cmake_build. If several directories
>> are given in ${CONFIGURE_DIRS}, a build directory is made for each one
>> (e.g. CONFIGURE_DIRS="${WRKSRC} tests/examples", ${WRKDIR}/.cmake_build
>> and ${WRKDIR}/.cmake_build_tests_examples are made)
>>
>> It works to build my WiP awesome and I tested net/owncloudclient
>> (traditional in-source build) that builds fine too.
>>
>> Any review, remark or advice will be welcomed.
>>
> 
> Please check whether packages like llvm, clang, lldb are compatible with
> your approach. They right now workaround it manually.
> 

[ 99%] Linking CXX executable ../../bin/clang
g++: internal compiler error: Killed (program cc1plus)
no stack trace because unwind library not available
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://www.NetBSD.org/support/send-pr.html> for instructions.
---
lib/ASTMatchers/Dynamic/CMakeFiles/clangDynamicASTMatchers.dir/Registry.cpp.o
---
***
[lib/ASTMatchers/Dynamic/CMakeFiles/clangDynamicASTMatchers.dir/Registry.cpp.o]
Error code 4

make[2]: stopped in /usr/pkgsrc/lang/clang/work/.cmake_build
1 error

I do not know why this error (maybe not enough memory) but build was
made in ${WRKDIR}/.cmake_build and llvm was successfully built before
using my approach.

When I look at the "manual workaround", my approach seems now to me a
bit complicated for a limited value... Actually, I did not consider
CMAKE_ARG_PATH because it was not documented in cmake.mk.

I would be as generic as possible but I think now it is sufficient to
just hide the manual workaround inside mk/configure/{cmake,configure}.mk

My approach was designed for the cases as CONFIGURE_DIRS="${WRKSRC}
tests/examples" where two parts of a same project could need separated
configure scripts. But is there a case?


Home | Main Index | Thread Index | Old Index