Page 1 of 4 123 ... LastLast
Results 1 to 10 of 33

Thread: CMake Compile Errors

  1. #1
    Join Date
    Mar 2007
    Location
    0xb796e48c
    Beans
    280

    CMake Compile Errors

    I am trying to compile some plasmoids for my KDE4 desktop from KDE-Look.

    Every time I run the Cmake command I get the following output:
    Code:
    alex@Andromeda:~/system_status/build$ cmake ../ -DCMAKE_INSTALL_PREFIX=$KDEDIR
    -- Check for working C compiler: /usr/bin/gcc
    -- Check for working C compiler: /usr/bin/gcc -- broken
    CMake Error: The C compiler "/usr/bin/gcc" is not able to compile a simple test program.
    It fails with the following output:
     /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build
    make[1]: Entering directory `/home/alex/system_status/build/CMakeFiles/CMakeTmp'
    /usr/bin/cmake -E cmake_progress_report /home/alex/system_status/build/CMakeFiles/CMakeTmp/CMakeFiles 1
    Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.o
    /usr/bin/gcc   -o CMakeFiles/cmTryCompileExec.dir/testCCompiler.o   -c /home/alex/system_status/build/CMakeFiles/CMakeTmp/testCCompiler.c
    /home/alex/system_status/build/CMakeFiles/CMakeTmp/testCCompiler.c:4:19: error: stdio.h: No such file or directory
    /home/alex/system_status/build/CMakeFiles/CMakeTmp/testCCompiler.c: In function ‘main’:
    /home/alex/system_status/build/CMakeFiles/CMakeTmp/testCCompiler.c:12: warning: incompatible implicit declaration of built-in function ‘printf’
    make[1]: *** [CMakeFiles/cmTryCompileExec.dir/testCCompiler.o] Error 1
    make[1]: Leaving directory `/home/alex/system_status/build/CMakeFiles/CMakeTmp'
    make: *** [cmTryCompileExec/fast] Error 2
    
    
    CMake will not be able to correctly generate this project.
    CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found.   Please set CMAKE_CXX_COMPILER to a valid compiler path or name.
    -- Configuring done
    alex@Andromeda:~/system_status/build$
    What do I need to do to get CMake working so I can properly compile it?

    Just for reference I am compiling the coremoid widget, is can be found here.

    Thanks,

    Alex

  2. #2
    Join Date
    Apr 2007
    Beans
    Hidden!
    Distro
    Hardy Heron (Ubuntu Development)

    Re: CMake Compile Errors

    Could you try installing build-essential and retry ?
    Code:
    sudo apt-get install build-essential
    Please mark threads as SOLVED ( if solved ) so other people can find solutions faster.

  3. #3
    Join Date
    Mar 2007
    Location
    0xb796e48c
    Beans
    280

    Re: CMake Compile Errors

    Thanks, it got a little further that time. Now, when I try and run the CMake command is gives me the following output.
    Code:
    alex@Andromeda:~/Desktop/system_status/build$ cmake ../ -DCMAKE_INSTALL_PREFIX=$KDEDIR
    -- Check for working C compiler: /usr/bin/gcc
    -- Check for working C compiler: /usr/bin/gcc -- works
    -- Check size of void*
    -- Check size of void* - done
    -- Check for working CXX compiler: /usr/bin/c++
    -- Check for working CXX compiler: /usr/bin/c++ -- works
    CMake Error: ERROR: cmake/modules/FindKDE4Internal.cmake not found in /home/alex/.kde4/share/apps;/usr/lib/kde4/share/kde4/apps
    -- Configuring done
    Any further idea?

    Thanks,

    Alex

  4. #4
    Join Date
    Jan 2008
    Location
    Raytown, MO
    Beans
    460
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: CMake Compile Errors

    do you have cmake installed?

    Hope this helps.

    Steve

  5. #5
    Join Date
    Apr 2007
    Beans
    Hidden!
    Distro
    Hardy Heron (Ubuntu Development)

    Re: CMake Compile Errors

    I would suggest
    Code:
    sudo apt-get install apt-file
    Then when you get any not found errors, you can issue
    Code:
    apt-file search <filename>
    where you replace <filename> with the name indicated as not being found.

    For example, in your case, FindKDE4Internal.cmake was not found. So I run apt-file search FindKDE4Internal.cmake and get
    kdelibs5-dev: /usr/lib/kde4/share/kde4/apps/cmake/modules/FindKDE4Internal.cmake
    So you may not have kdelibs5-dev installed.

    Hope this helps.
    Please mark threads as SOLVED ( if solved ) so other people can find solutions faster.

  6. #6
    Join Date
    Mar 2007
    Location
    0xb796e48c
    Beans
    280

    Re: CMake Compile Errors

    Ok, so I got apt-file and apted kdelibs5-dev, and now its complaining about yet more things:

    Code:
    alex@Andromeda:~/Desktop/system_status/build$ cmake ../ -DCMAKE_INSTALL_PREFIX=$KDEDIR
    -- Looking for Q_WS_X11
    -- Looking for Q_WS_X11 - found
    -- Looking for Q_WS_WIN
    -- Looking for Q_WS_WIN - not found.
    -- Looking for Q_WS_QWS
    -- Looking for Q_WS_QWS - not found.
    -- Looking for Q_WS_MAC
    -- Looking for Q_WS_MAC - not found.
    -- Found Qt-Version 4.3.2 (using /usr/bin/qmake)
    -- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so;/usr/lib/libXft.so;/usr/lib/libXau.so;/usr/lib/libXdmcp.so
    -- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so;/usr/lib/libXft.so;/usr/lib/libXau.so;/usr/lib/libXdmcp.so - found
    -- Looking for gethostbyname
    -- Looking for gethostbyname - found
    -- Looking for connect
    -- Looking for connect - found
    -- Looking for remove
    -- Looking for remove - found
    -- Looking for shmat
    -- Looking for shmat - found
    -- Looking for IceConnectionNumber in ICE
    -- Looking for IceConnectionNumber in ICE - found
    -- Found X11: /usr/lib/libX11.so
    -- Looking for pthread.h
    -- Looking for pthread.h - found
    -- Looking for pthread_create in pthreads
    -- Looking for pthread_create in pthreads - not found
    -- Looking for pthread_create in pthread
    -- Looking for pthread_create in pthread - found
    -- Performing Test HAVE_FPIE_SUPPORT
    -- Performing Test HAVE_FPIE_SUPPORT - Success
    -- Performing Test __KDE_HAVE_NO_THREADSAFE_STATICS
    -- Performing Test __KDE_HAVE_NO_THREADSAFE_STATICS - Success
    -- Performing Test __KDE_HAVE_W_OVERLOADED_VIRTUAL
    -- Performing Test __KDE_HAVE_W_OVERLOADED_VIRTUAL - Success
    -- Performing Test __KDE_HAVE_GCC_VISIBILITY
    -- Performing Test __KDE_HAVE_GCC_VISIBILITY - Success
    -- Found KDE 4.0 include dir: /usr/lib/kde4/include
    -- Found KDE 4 library dir: /usr/lib/kde4/lib
    -- Found KDE4 kconfig_compiler preprocessor: /usr/lib/kde4/bin/kconfig_compiler
    -- Found KDE4 automoc: /usr/lib/kde4/bin/kde4automoc
    CMake Error: Could not find REQUIRED package Plasma
    -- Configuring done
    I apt-filed plasma, nothing happened. Plasma is not in the repositories, but I assume its installed because I can use Plasmoids, and the desktop background.

  7. #7
    Join Date
    Apr 2007
    Beans
    Hidden!
    Distro
    Hardy Heron (Ubuntu Development)

    Re: CMake Compile Errors

    When it says package missing, you should try
    Code:
    aptitude search <pkgname>
    So in your case, aptitude search plasma leads me to libplasma-dev. Please check if this is installed.
    Please mark threads as SOLVED ( if solved ) so other people can find solutions faster.

  8. #8
    Join Date
    Dec 2007
    Beans
    2

    Re: CMake Compile Errors

    also done:

    Code:
    sudo apt-get install libphonon-dev
    ... and works like a charm

  9. #9
    Join Date
    May 2007
    Beans
    5

    Re: CMake Compile Errors

    That solved the issue for me too, trying to build a plasmoid too...

    Thanks!

  10. #10
    Join Date
    Nov 2007
    Location
    Mobile, AL
    Beans
    77

    Re: CMake Compile Errors

    this helped me work through these same errors. Thanks to all on this thread

Page 1 of 4 123 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •