CMake error while trying to compile kdebase (trunk)

Alexander Neundorf neundorf at kde.org
Mon Mar 22 22:40:26 CET 2010


On Sunday 21 March 2010, Yury G. Kudryashov wrote:
> Anton Kreuzkamp wrote:
> > 2 or 3 weeks ago I tried to compile KDE-Trunk the first time.
> > After  many problems (e.g. I had to reinstall my whole compiler,
> > including cmake and all devel-packages) I got it to compile till
> > kdepimlibs. But in kdebase I  got a problem that I could solve.
> >
> > every time I try to compile it  CMake fails with the following output:
> > want to support this feature) -- Cannot find Exiv2 library!
>
> First error: you need recent exiv2 development headers.
>
> > -- Found ALSA: /usr/lib64/libasound.so
> > CMake Error at
> > /home/kde-devel/kde/share/apps/cmake/modules/FindAlsa.cmake:41 (string):
> > string sub-command REGEX, mode REPLACE needs at least 6 arguments total
> > to command.
> > Call Stack (most recent call first):
> >   runtime/phonon/CMakeLists.txt:35 (alsa_version_string)
>
> Error 2: the same for alsa headers (though error can be more descriptive).
>
> When you see error messages, find the first one.

Did that fix your problem ?

The code in FindAlsa.cmake is:

find_path(ALSA_INCLUDES alsa/version.h)

macro(ALSA_VERSION_STRING _result)
  # check for version in alsa/version.h
  if(ALSA_INCLUDES)
    file(READ "${ALSA_INCLUDES}/alsa/version.h" _ALSA_VERSION_CONTENT)
    string(REGEX REPLACE ".*SND_LIB_VERSION_STR.*\"(.*)\".*" "\\1" ${_result}
           ${_ALSA_VERSION_CONTENT})
  else(ALSA_INCLUDES)
    message(STATUS "ALSA version not known. ALSA output will probably not work 
                    correctly.")
  endif(ALSA_INCLUDES)
endmacro(ALSA_VERSION_STRING _result)


I would expect that you only get to line 41 if alsa/version.h was found.
Can you please add some debug output to your FindAlsa.cmake and post the 
ourput here ?
I.e. something like
message(STATUS "ALSA_INCLUDE: -${ALSA_INCLUDES}-")
message(STATUS "_ALSA_VERISON_CONTENT: -${_ALSA_VERSION_CONTENT)-")

directly after the file(READ ... )

Alex


More information about the Kde-buildsystem mailing list