On 01.08.2017 11:15, Frédéric Fauberteau wrote: > 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. > I would keep traditional naming 'build', not '.cmake_build'. > 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 > This approach is compatible with pkgvi+mkpatches. Everything that will break the tools, will be considered wrong. > 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? > I would handle it manually in do-test, post-build and similar.
Attachment:
signature.asc
Description: OpenPGP digital signature