Hello, I would like to commit the attached kdelibs/icecream patches, in order to avoid running into pathetic OOM situations on Linux.
In short, run (or rather don't) 'make -j30' e.g. in kdebase/runtime/doc. As we have a nice icecream build farm here, I normally do such parallel builds, and this can quite easily happen by mistake (even when running full kdebase build and cmake decides to run many jobs in doc/). Meinproc can take quite some memory and 30 of them is certainly more than even 2 GiB RAM machine can handle. Worse, what usually follows after that is kernel's absolutely pathetic OOM handling resulting in having to watch a dead machine for up to several hours, after which at least crucial KDE processes are dead, so one may as well simply hit the reset button. I must be quite known in the SUSE Labs kernel team for moaning about OOM, but they run WindowMaker and compile small .c kernel files, so I guess they care about as much as about famine in Uganda. The buildsystem fix uses the fact that icecream serializes even non-compiling tasks, so it makes meinproc4 to be run using icecc as well (actually it serializes way too much, even on dual-core CPUs, but I can live with that). The icecream fix is needed for icecc to handle correctly commands with full path, such as "icecc /<path_in_kdelibs>/meinproc4.shell <args>". In order to detect icecream that can handle this properly a new version release would be needed (I'm willing to do there whatever is needed). -- Lubos Lunak openSUSE Boosters team, KDE developer l.lu...@suse.cz , l.lu...@kde.org
--- cmake/modules/FindIcecream.cmake.sav 2010-01-07 14:06:50.000000000 +0100 +++ cmake/modules/FindIcecream.cmake 2010-01-07 15:08:16.000000000 +0100 @@ -0,0 +1,26 @@ +# Try to find the icecream parallel build tool +# ICECREAM_EXECUTABLE - the icecream executable +# ICECREAM - the icecream executable, if found, otherwise empty +# (this is mainly useful to serialize tasks that would be otherwise run in parallel +# and could overload the system, such as meinproc) + +# Copyright (c) 2009, Lubos Lunak, <l.lu...@kde.org> +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +find_program(ICECREAM_EXECUTABLE icecc) + +if(ICECREAM_EXECUTABLE) + execute_process(COMMAND ${ICECREAM_EXECUTABLE} --version OUTPUT_VARIABLE icecream_version_output ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) + string(REPLACE "ICECC " "" icecream_version ${icecream_version_output}) + if(icecream_version VERSION_LESS 0.9.5) + set(ICECREAM "") # too old, can't handle full paths + else() + set(ICECREAM ${ICECREAM_EXECUTABLE}) + endif() +else(ICECREAM_EXECUTABLE) + set(ICECREAM "") +endif(ICECREAM_EXECUTABLE) + +mark_as_advanced(ICECREAM_EXECUTABLE ICECREAM) --- cmake/modules/CMakeLists.txt.sav 2009-12-31 16:10:52.000000000 +0100 +++ cmake/modules/CMakeLists.txt 2010-01-07 15:26:34.000000000 +0100 @@ -53,6 +53,7 @@ set(cmakeFiles CheckCXXSourceCompiles.cm FindGphoto2.cmake FindHUNSPELL.cmake FindIOKit.cmake + FindIcecream.cmake FindKDE4Internal.cmake FindKDE4Workspace.cmake FindKDevPlatform.cmake --- cmake/modules/FindKDE4Internal.cmake.sav 2009-12-31 16:10:52.000000000 +0100 +++ cmake/modules/FindKDE4Internal.cmake 2010-01-07 14:19:10.000000000 +0100 @@ -388,6 +388,7 @@ endif(NOT AUTOMOC4_FOUND OR NOT _automoc include (MacroLibrary) include (CheckCXXCompilerFlag) include (CheckCXXSourceCompiles) +include (FindIcecream) # get the directory of the current file, used later on in the file @@ -430,7 +431,7 @@ if (_kdeBootStrapping) set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib ) set(KDE4_KCFGC_EXECUTABLE ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/kconfig_compiler${CMAKE_EXECUTABLE_SUFFIX}.shell ) set(KDE4_KAUTH_POLICY_GEN_EXECUTABLE ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/kauth-policy-gen${CMAKE_EXECUTABLE_SUFFIX}.shell ) - set(KDE4_MEINPROC_EXECUTABLE ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/meinproc4${CMAKE_EXECUTABLE_SUFFIX}.shell ) + set(KDE4_MEINPROC_EXECUTABLE ${ICECREAM} ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/meinproc4${CMAKE_EXECUTABLE_SUFFIX}.shell ) set(KDE4_MAKEKDEWIDGETS_EXECUTABLE ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/makekdewidgets${CMAKE_EXECUTABLE_SUFFIX}.shell ) endif (WIN32) @@ -507,6 +508,8 @@ else (_kdeBootStrapping) get_target_property(KDE4_MEINPROC_EXECUTABLE ${KDE4_TARGET_PREFIX}meinproc4 LOCATION_${_firstConfig}) get_target_property(KDE4_KAUTH_POLICY_GEN_EXECUTABLE ${KDE4_TARGET_PREFIX}kauth-policy-gen LOCATION_${_firstConfig}) get_target_property(KDE4_MAKEKDEWIDGETS_EXECUTABLE ${KDE4_TARGET_PREFIX}makekdewidgets LOCATION_${_firstConfig}) + + set(KDE4_MEINPROC_EXECUTABLE ${ICECREAM} ${KDE4_MEINPROC_EXECUTABLE}) # allow searching cmake modules in all given kde install locations (KDEDIRS based) execute_process(COMMAND "${KDE4_KDECONFIG_EXECUTABLE}" --path data OUTPUT_VARIABLE _data_DIR ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
--- icecc/configure.in.sav 2009-04-30 14:43:07.000000000 +0200 +++ icecc/configure.in 2010-01-07 14:42:16.648756391 +0100 @@ -4,7 +4,7 @@ AC_PREREQ(2.53) AC_INIT(client/main.cpp) -AM_INIT_AUTOMAKE(icecc, "0.9.4") +AM_INIT_AUTOMAKE(icecc, "0.9.5") AM_CONFIG_HEADER(config.h) AC_CANONICAL_HOST --- icecc/client/arg.cpp.sav 2009-04-30 14:35:23.000000000 +0200 +++ icecc/client/arg.cpp 2010-01-07 14:40:46.677823078 +0100 @@ -82,6 +82,7 @@ static bool analyze_program(const char* job.setLanguage (CompileJob::Lang_C); else { job.setLanguage( CompileJob::Lang_Custom ); + job.setCompilerName( name ); // keep path return true; }
_______________________________________________ Kde-buildsystem mailing list Kde-buildsystem@kde.org https://mail.kde.org/mailman/listinfo/kde-buildsystem