[Kde-games-devel] KgSound build problem

Ian Wadham iandw.au at gmail.com
Fri Apr 20 07:18:46 UTC 2012


After svn update of kdegames I get build problems where CMake says
that my version of libsndfile is too old and that I need at least v 0.21.
In actual fact I have v 1.0.25. 

I had a look at kdegames/libkdegames/CMakeLists.txt and added two
lines, just before "try_compile", to see what is happening:

if (SNDFILE_FOUND AND USE_OPENAL_SNDFILE)
    message(STATUS "Checking libsndfile capabilities")
    message(STATUS "SNDFILE_INCLUDE_DIR <" ${SNDFILE_INCLUDE_DIR} "> SNDFILE_INCLUDE_DIRS <" ${SNDFILE_INCLUDE_DIRS} ">")
    message(STATUS "SNDFILE_LIBRARY <" ${SNDFILE_LIBRARY} "> SNDFILE_LIBRARIES <" ${SNDFILE_LIBRARIES} ">")
    try_compile(SNDFILE_WORKS
        ${CMAKE_CURRENT_BINARY_DIR}/audio/check-libsndfile-capabilities
        ${CMAKE_CURRENT_SOURCE_DIR}/audio/check-libsndfile-capabilities.cpp)

Note the messages put out both singular and plural forms of the INCLUDE and LIBRARY
symbols.  This is because both singular and plural forms occur later in the CMakeLists.txt
and I think there may have been a slip of the pen somewhere in there.

Attached is my CMake output.  It appears (in that output) that the singular 
SNDFILE_INCLUDE_DIR and the plural SNDFILE_LIBRARIES are correct and
the header and libraries are where I expect to find them.  I am working on a
Macbook with libraries installed by Macports, as I have been doing from July
last year until today, without any problems.

Furthermore, my installed sndfile.h file contains the necessary OGG and VORBIS
enum values.   The only other thing I can think of is that the compiler here does not like

int main()
{
        //We need Ogg/Vorbis support. If sndfile.h is too old, these enum values
        //will be missing and compiler errors will be generated.
        (void) SF_FORMAT_OGG;
        (void) SF_FORMAT_VORBIS;

        return 0;
}

in libkdegames/audio/check-libsndfile-capabilities.cpp … "(void) <enum value>;"(?)

Any ideas?  I'm stuck here, but am using -DUSE_OPENAL_SNDFILE=OFF to
work around the problem short-term.

Cheers, Ian W.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CMakeOutput.txt
URL: <http://mail.kde.org/pipermail/kde-games-devel/attachments/20120420/034b3fe6/attachment.txt>


More information about the kde-games-devel mailing list