compile error with parallel build

Alexander Neundorf neundorf at kde.org
Sat Mar 18 22:17:42 CET 2006


Hi,

On Saturday 18 March 2006 22:02, Bill Hoffman wrote:
> At 02:21 PM 3/18/2006, Alexander Neundorf wrote:
> >Hi,
> >
> >I tried to build kdelibs with "make -j4" on a single processor machine.
> >It always stops after linking kdeui, but I didn't find an error message in
> > the output until now, you can see it here:
> > http://www.neundorf.net/makej4.log
> >
> >After linking kdeui it stops with:
> >cd /home/alex/src/kde4-svn/kdelibs-build/kdeui && /usr/local/bin/cmake -E
> >cmake_symlink_library ../lib/libkdeui.so.4.2.0 ../lib/libkdeui.so.4
> > ../lib/libkdeui.so gmake: *** [all] Error 2
> >*** Exited with status: 2 ***
>
> The problem is here:
>
> gmake -f kstyles/keramik/CMakeFiles/keramik.dir/build.make
> kstyles/keramik/CMakeFiles/keramik.dir/build gmake[2]: *** No rule to make
> target `bin/genembed', needed by `kstyles/keramik/keramikrc.h'. Stop.
> gmake[1]: *** [kstyles/keramik/CMakeFiles/keramik.dir/all] Error 2
> gmake[1]: *** Waiting for unfinished jobs....
> Generating string_object.lut.h
>
> Looks like genembed is not getting built before it is needed.
> You may need an add_dependency to make sure it gets built first.

Hmm, from kdelibs/kstyles/keramik/CMakeLists.txt:

set(genembed_SRCS genembed.cpp )

kde4_automoc(${genembed_SRCS})

# basically an add_executable:
# with EXECUTABLE_OUTPUT_PUT = ${CMAKE_BINARY_DIR}/bin
kde4_add_executable(genembed ${genembed_SRCS})

target_link_libraries(genembed  ${QT_AND_KDECORE_LIBS} kdefx )

# generate some file...
file(GLOB keramikPics "${CMAKE_CURRENT_SOURCE_DIR}/pics/*.png")
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/keramikPics.txt "" )
foreach(pics ${keramikPics})
   file(APPEND  ${CMAKE_CURRENT_BINARY_DIR}/keramikPics.txt "${pics}\n" )
endforeach(pics ${keramikPics})

get_target_property(GENEMBED_EXECUTABLE genembed LOCATION)

# and now the command for generating keramikrc.h
# with a DEPENDS to genembed 
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/keramikrc.h
  COMMAND ${GENEMBED_EXECUTABLE}
  ARGS --file ${CMAKE_CURRENT_BINARY_DIR}/keramikPics.txt > 
${CMAKE_CURRENT_BINARY_DIR}/pixmaps.keramik
  DEPENDS genembed ${keramikPics}
)


Shouldn't this be enough ?
I'll have a look at the generated makefiles.

Bye
Alex
-- 
Work: alexander.neundorf AT jenoptik.com - http://www.jenoptik-los.de
Home: neundorf AT kde.org                - http://www.kde.org
      alex AT neundorf.net               - http://www.neundorf.net


More information about the Kde-buildsystem mailing list