Version: (using KDE 4.0.0) Installed from: Compiled From Sources Compiler: gcc (GCC) 4.2.3 OS: Linux When compiling kdelibs 4 from trunk svn: [ 46%] Building CXX object phonon/libkaudiodevicelist/CMakeFiles/kaudiodevicelist.dir/audiodeviceenumerator.o /usr/src/KDE/4/kdelibs/phonon/libkaudiodevicelist/audiodeviceenumerator.cpp: In member function 'void Phonon::AudioDeviceEnumeratorPrivate::findDevices()': /usr/src/KDE/4/kdelibs/phonon/libkaudiodevicelist/audiodeviceenumerator.cpp:67: warning: unused variable 'cacheVersion' /usr/src/KDE/4/kdelibs/phonon/libkaudiodevicelist/audiodeviceenumerator.cpp: In member function 'void Phonon::AudioDeviceEnumeratorPrivate::findVirtualDevices()': /usr/src/KDE/4/kdelibs/phonon/libkaudiodevicelist/audiodeviceenumerator.cpp:163: error: 'snd_device_name_hint' was not declared in this scope /usr/src/KDE/4/kdelibs/phonon/libkaudiodevicelist/audiodeviceenumerator.cpp:170: error: 'snd_device_name_get_hint' was not declared in this scope /usr/src/KDE/4/kdelibs/phonon/libkaudiodevicelist/audiodeviceenumerator.cpp:194: error: 'snd_device_name_free_hint' was not declared in this scope /usr/src/KDE/4/kdelibs/phonon/libkaudiodevicelist/audiodeviceenumerator.cpp:196: error: 'snd_config_update_free_global' was not declared in this scope /usr/src/KDE/4/kdelibs/phonon/libkaudiodevicelist/audiodeviceenumerator.cpp:197: error: 'snd_config_update' was not declared in this scope /usr/src/KDE/4/kdelibs/phonon/libkaudiodevicelist/audiodeviceenumerator.cpp:198: error: 'snd_config' was not declared in this scope /usr/src/KDE/4/kdelibs/phonon/libkaudiodevicelist/audiodeviceenumerator.cpp:206: error: 'snd_input_t' was not declared in this scope /usr/src/KDE/4/kdelibs/phonon/libkaudiodevicelist/audiodeviceenumerator.cpp:206: error: 'sndInput' was not declared in this scope /usr/src/KDE/4/kdelibs/phonon/libkaudiodevicelist/audiodeviceenumerator.cpp:207: error: 'snd_input_buffer_open' was not declared in this scope /usr/src/KDE/4/kdelibs/phonon/libkaudiodevicelist/audiodeviceenumerator.cpp:209: error: 'snd_config' was not declared in this scope /usr/src/KDE/4/kdelibs/phonon/libkaudiodevicelist/audiodeviceenumerator.cpp:209: error: 'snd_config_load' was not declared in this scope /usr/src/KDE/4/kdelibs/phonon/libkaudiodevicelist/audiodeviceenumerator.cpp:210: error: 'snd_input_close' was not declared in this scope make[2]: *** [phonon/libkaudiodevicelist/CMakeFiles/kaudiodevicelist.dir/audiodeviceenumerator.o] Error 1 make[1]: *** [phonon/libkaudiodevicelist/CMakeFiles/kaudiodevicelist.dir/all] Error 2 make: *** [all] Error 2 gcc 4.2.3, glibc 2.7, alsa 1.0.16
Something is broken with either your libasound includes or the cmake cache. If those lines above are the only errors then it apparently finds a very old ALSA header.
My alsa is the newest 1.0.16 my cmake directive is: cmake -DCMAKE_INSTALL_PREFIX=/opt/kde4 -DASOUND_LIBRARY=/opt/alsa/lib/libasound.so -DALSA_INCLUDES=/opt/alsa/include -DLIBXML2_LIBRARIES=/usr/lib/libxml2.so -DJPEG_INCLUDE_DIR=/opt/image/include -DJPEG_LIBRARY=/opt/image/lib/libjpeg.so -DGIF_INCLUDE_DIR=/opt/image/include -DGIF_LIBRARIES=/opt/image/lib/libungif.so -DPNG_PNG_INCLUDE_DIR=/opt/image/include -DPNG_LIBRARY=/opt/image/lib/libpng.so -DOPENEXR_INCLUDE_DIR=/opt/image/include -DOPENEXR_ILMTHREAD_LIBRARY=/opt/image/lib/libIlmThread.so -DCMAKE_CXX_FLAGS="-I/opt/alsa/include -I/opt/image/include" ../kdelibs -- Looking for snd_seq_create_simple_port in asound -- Looking for snd_seq_create_simple_port in asound - not found -- ALSA not found ...... -- Looking for C++ include sys/asoundlib.h -- Looking for C++ include sys/asoundlib.h - found -- Looking for C++ include alsa/asoundlib.h -- Looking for C++ include alsa/asoundlib.h - found -- Looking for snd_pcm_resume in asound -- Looking for snd_pcm_resume in asound - not found ...... -- This installation will have the extra features provided by these packages. + BZip2 + OpenSSL + Libintl + OpenGL + Soprano + PCRE + ALSA + OpenEXR ----------------------------------------------------------------------------- In CMakeFiles/CMakeError.log: Determining if the function snd_pcm_resume exists in the asound failed with the following output: /usr/bin/gmake -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build gmake[1]: Entering directory `/usr/src/KDE/4/build/CMakeFiles/CMakeTmp' /usr/bin/cmake -E cmake_progress_report /usr/src/KDE/4/build/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec.dir/CheckFunctionExists.o /usr/bin/gcc -Wno-long-long -std=iso9899:1990 -Wundef -Wcast-align -Werror-implicit-function-declaration -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-common -DCHECK_FUNCTION_EXISTS=snd_pcm_resume -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_GNU_SOURCE -o CMakeFiles/cmTryCompileExec.dir/CheckFunctionExists.o -c /usr/share/cmake-2.4/Modules/CheckFunctionExists.c Linking C executable cmTryCompileExec /usr/bin/cmake -P CMakeFiles/cmTryCompileExec.dir/cmake_clean_target.cmake /usr/bin/gcc -Wno-long-long -std=iso9899:1990 -Wundef -Wcast-align -Werror-implicit-function-declaration -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-common -DCHECK_FUNCTION_EXISTS=snd_pcm_resume -fPIC "CMakeFiles/cmTryCompileExec.dir/CheckFunctionExists.o" -o cmTryCompileExec -rdynamic -L/opt/alsa/lib/libasound.so -lasound -Wl,-rpath,/opt/alsa/lib/libasound.so /usr/lib/gcc/i686-pc-linux-gnu/4.2.3/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lasound collect2: ld returned 1 exit status gmake[1]: *** [cmTryCompileExec] Error 1 gmake[1]: Leaving directory `/usr/src/KDE/4/build/CMakeFiles/CMakeTmp' gmake: *** [cmTryCompileExec/fast] Error 2 It is because -L/opt/alsa/lib/libasound.so, which is bad. Is there any cmake directive to set LDFLAGS in kdelibs? - CMAKE_LIBRARY_PATH does not work neither CMAKE_SHARED_LINKER_FLAGS does. In /opt/alsa/include/alsa/control.h is declared: int snd_device_name_hint(int card, const char *iface, void ***hints); In kdelibs/phonon/libkaudiodevicelist/audiodeviceenumerator.cpp: if (snd_device_name_hint(-1, "pcm", &hints) < 0) {
Sorry I don't know how to help with your setup. And I don't have time to find out.
SVN commit 793381 by mkretz: patch by pusling to fix finding libasound, I wonder why it never broke for me BUG: 157258 M +7 -2 FindAlsa.cmake WebSVN link: http://websvn.kde.org/?view=rev&revision=793381