This forum has been archived. All content is frozen. Please use KDE Discuss instead.

cmake error

Tags: None
(comma "," separated)
kalle1950
Registered Member
Posts
16
Karma
0

cmake error

Tue Dec 15, 2009 3:42 pm
Hi,

my k-menu editor doesn't really reliable work and I wanted to do some tests what the issue is. I have taken the source code for kmenuedit and now want to compile it. I have

Code: Select all
add_subdirectory( pixmaps )

add_definitions (-DQT3_SUPPORT -DQT3_SUPPORT_WARNINGS)

set(kmenueditcommon_STAT_SRCS preferencesdlg.cpp klinespellchecking.cpp basictab.cpp treeview.cpp kmenuedit.cpp menufile.cpp menuinfo.cpp )
if(NOT WIN32)
set(kmenueditcommon_STAT_SRCS ${kmenueditcommon_STAT_SRCS} khotkeys.cpp)
endif(NOT WIN32)
########### next target ###############

qt4_add_dbus_adaptor( kmenueditcommon_STAT_SRCS org.kde.kmenuedit.xml kmenuedit.h KMenuEdit)

if(NOT WIN32)
qt4_add_dbus_interface(
    kmenueditcommon_STAT_SRCS
    ${CMAKE_CURRENT_BINARY_DIR}/../khotkeys/app/org.kde.khotkeys.xml
    khotkeys_interface)
endif(NOT WIN32)

set(kmenuedit_KDEINIT_SRCS main.cpp ${kmenueditcommon_STAT_SRCS})

kde4_add_kdeinit_executable( kmenuedit ${kmenuedit_KDEINIT_SRCS})

target_link_libraries(kdeinit_kmenuedit  ${KDE4_KDE3SUPPORT_LIBS} ${QT_QTXML_LIBRARY}
)

install(TARGETS kdeinit_kmenuedit  DESTINATION ${LIB_INSTALL_DIR} )

target_link_libraries( kmenuedit kdeinit_kmenuedit )
install(TARGETS kmenuedit ${INSTALL_TARGETS_DEFAULT_ARGS})

########### install files ###############

install( FILES kmenuedit.desktop  DESTINATION  ${XDG_APPS_INSTALL_DIR} )
install( FILES kmenueditui.rc  DESTINATION  ${DATA_INSTALL_DIR}/kmenuedit )

if(NOT WIN32)
add_dependencies(kdeinit_kmenuedit kded_khotkeys)
endif(NOT WIN32)

kde4_install_icons( ${ICON_INSTALL_DIR}  )



and do

Code: Select all
cmake ..


in an empty build directory. I see

Code: Select all
CMake Error at pixmaps/CMakeLists.txt:1 (kde4_install_icons):
  Unknown CMake command "kde4_install_icons".


CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 2.6)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring incomplete, errors occurred!


I would assume that I can ignore the warning about the min. requirement. But what about the install_icons problem. Anyone an idea?

Thanks.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: cmake error

Tue Dec 15, 2009 9:09 pm
You need to add the following lines to the top of the CMakeLists.txt file:

Code: Select all
IF(CMAKE_SOURCE_DIR STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")

    FIND_PACKAGE(KDE4 REQUIRED)
    INCLUDE(KDE4Defaults)
    ADD_DEFINITIONS(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})

ENDIF(CMAKE_SOURCE_DIR STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
INCLUDE_DIRECTORIES (${CMAKE_BINARY_DIR} ${KDE4_INCLUDES})


To allow building KMenuEdit by itself. Make sure to remove them before submitting your patch. I believe KMenuEdit is effectively unmaintained, so any work is much appreciated!


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
kalle1950
Registered Member
Posts
16
Karma
0

Re: cmake error

Wed Dec 16, 2009 6:50 am
Thanks, cmake now runs through! But make doesn't ...


Code: Select all
tux-vm:~/projects/kmenuedit/build> make
Scanning dependencies of target kdeinit_kmenuedit_automoc
Generating kmenuedit.moc
Generating klinespellchecking.moc
Generating preferencesdlg.moc
Generating treeview.moc
Generating basictab.moc
[  0%] Built target kdeinit_kmenuedit_automoc
make[2]: *** Keine Regel vorhanden, um das Target »../khotkeys/app/org.kde.khotkeys.xml«,
  benötigt von »khotkeys_interface.cpp«, zu erstellen.  Schluss.
make[1]: *** [CMakeFiles/kdeinit_kmenuedit.dir/all] Fehler 2
make: *** [all] Fehler 2


The German text says that there is no rule for target khotkeys/app/...

And here the cmake output if relevant...

Code: Select all
tux-vm:~/projects/kmenuedit/build> cmake ..
-- The C compiler identification is GNU           
-- The CXX compiler identification is GNU         
-- Check for working C compiler: /usr/bin/gcc     
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info                     
-- Detecting C compiler ABI info - done               
-- Check for working CXX compiler: /usr/bin/c++       
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info                     
-- Detecting CXX compiler ABI info - done               
-- 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.5.3 (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;/usr/lib/libXpm.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;/usr/lib/libXpm.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 include files CMAKE_HAVE_PTHREAD_H                           
-- Looking for include files CMAKE_HAVE_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                             
-- Found Threads: TRUE                                                       
-- Found Automoc4: /usr/bin/automoc4                                         
-- Found Perl: /usr/bin/perl                                                 
-- Phonon Version: 4.3.0                                                     
-- Found Phonon: /usr/lib/libphonon.so                                       
-- Found Phonon Includes: /usr/include/KDE;/usr/include                     
-- Performing Test _OFFT_IS_64BIT                                           
-- Performing Test _OFFT_IS_64BIT - Failed                                   
-- Performing Test HAVE_FPIE_SUPPORT                                         
-- Performing Test HAVE_FPIE_SUPPORT - 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.3 include dir: /usr/include
-- Found KDE 4.3 library dir: /usr/lib
-- Found the KDE4 kconfig_compiler preprocessor: /usr/bin/kconfig_compiler
-- Found automoc4: /usr/bin/automoc4
-- Configuring done
-- Generating done
-- Build files have been written to: /home/xxxx/projects/kmenuedit/build


Any further ideas? Thanks.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: cmake error

Wed Dec 16, 2009 10:57 pm
Ok, it appears that you need to download and configure the entire module that kmenuedit is part of.
You then need to configure it at the top level, and the change to the kmenuedit directory to perform the "make" stage of the build.

Code: Select all
svn co svn://anonsvn.kde.org/home/kde/trunk/KDE/kdebase/workspace kde-workspace
cd kde-workspace
mkdir build
cd build
cmake ..
cd kmenuedit
make


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
kalle1950
Registered Member
Posts
16
Karma
0

Re: cmake error

Thu Dec 17, 2009 7:48 pm
Running the svn command shows

Code: Select all
warning network connection unexpectetly closed


somehow I doubt that there is a network error on my side. So is that message normal once all files are downloaded?

I then issued the commands you have mentioned. That shows

Code: Select all
kde libs 4.3.4 found at least 4.3.85 needed


How do I get this version?

Since I don't care for the first test about the latest version I run the svn command not on trunk but on branches 4.3 to avoid this kdelibs issue. cmake runs fine. but then...

Code: Select all
CUT here, let me know if needed...

-- Looking for strnlen - found                                               
-- Performing Test HAVE_STRUCT_SOCKADDR_IN_SIN_LEN                           
-- Performing Test HAVE_STRUCT_SOCKADDR_IN_SIN_LEN - Failed                   
-- Performing Test HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN                         
-- Performing Test HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN - Failed                 

-----------------------------------------------------------------------------
-- The following external packages were located on your system.             
-- This installation will have the extra features provided by these packages.
-----------------------------------------------------------------------------
   * glib2 - Low-level core library for data structure handling, portability wrappers, etc.                                                                 
   * GoogleGadgets - Google Gadgets library                                   
   * Soprano - Semantic Desktop Storing                                       
   * Nepomuk - Nepomuk Libraries                                             
   * Polkit-Qt - Qt Wrapper around PolicyKit                                 
   * libxss - XScreenSaver Library                                           
   * libxext - XSync Extension                                               
   * Compositing support - X11 Compositing support                           
   * lm-sensors - Sensors support for ksysguard                               
   * BlueZ - BlueZ is the Linux Bluetooth protocol stack                     
   * NetworkManager - A daemon for user controlled networking                 
   * libgps - GPS support for geolocation                                     
   * kdepimlibs - KDE PIM libraries                                           
   * Soprano - Soprano Libraries                                             
   * FreeType - A font rendering engine                                       
   * libxklavier - A XKB foundation library for keyboard handling software   
   * xkbfile - X11 KXB library for keyboard handling software                 
   * libusb - User level access to USB devices                               
   * libxft - X FreeType interface library                                   
   * ck-connector - The ConsoleKit connector library                         

-----------------------------------------------------------------------------
-- The following OPTIONAL packages could NOT be located on your system.     
-- Consider installing them to enable more features from this software.     
-----------------------------------------------------------------------------
   * QEdje  <http://code.openbossa.org/projects/qedje/pages/Home>           
     QEdje library                                                           
     Needed to build plasma scriptengine for edje files                     
   * Python  <http://techbase.kde.org/Development/Languages/Python>         
     KDE Python support                                                     
     Needed to build plasma scriptengine for Python                         
   * XMMS  <http://www.xmms.org>                                             
     X MultiMedia System developement libraries                             
     Support for XMMS in the Now Playing data engine                         

-----------------------------------------------------------------------------

-- Configuring done
CMake Error in kwin/clients/oxygen/CMakeLists.txt:
  Cannot find source file "helper.cpp".  Tried extensions .c .C .c++ .cc .cpp
  .cxx .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx


-- Build files have been written to: /home/xxxx/KDEproject43/kde-workspace/build
xxxx@tux-vm:~/KDEproject43/kde-workspace/build> cd kmenuedit/
xxxx@tux-vm:~/KDEproject43/kde-workspace/build/kmenuedit> make
make: *** Keine Targets angegeben und keine »make«-Steuerdatei gefunden.  Schluss.
xxxx@tux-vm:~/KDEproject43/kde-workspace/build/kmenuedit>


It says that there is no make target.

I then tried to go to kde-workspace/kmenuedit and changed the CMakeList.txt file as described earlier and run the cmake.. and build command there. I got a makefile this time but got the same error as in my last post.

seems to be pretty tricky...
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: cmake error

Thu Dec 17, 2009 8:15 pm
The svn message you recieved indicates that the checkout failed unfortunately.

Try using the 4.3 branch, since KDE-Base seems to need Trunk KDE-Libs :(
Make sure to remove the kde-workspace folder first.

Code: Select all
svn co svn://anonsvn.kde.org/home/kde/branches/KDE/4.3/kdebase/workspace kde-workspace
cd kde-workspace
mkdir build
cd build
cmake ..
cd kmenuedit
make


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
kalle1950
Registered Member
Posts
16
Karma
0

Re: cmake error

Thu Dec 17, 2009 8:52 pm
okay svn download works on another machine, but there I get on cmake..

MAKE_FIND_LIBRARY_PREFIXES
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_FIND_LIBRARY_SUFFIXES
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_FIND_LIBRARY_PREFIXES
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_FIND_LIBRARY_SUFFIXES
CMake Error at /usr/share/kde4/apps/cmake/modules/FindQt4.cmake:964 (MESSAGE):
Could NOT find QtCore. Check


libqt4-devel is installed I though QtCore comes with that one...
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: cmake error

Thu Dec 17, 2009 9:01 pm
Can you please run the following commands and post their output on the machine in question?

Code: Select all
cmake --version
kde4-config --version


I get the following from my system:
Code: Select all
ben@grace:~> cmake --version
cmake version 2.6-patch 4
ben@grace:~> kde4-config --version
Qt: 4.6.0
KDE Development Platform: 4.3.82 (KDE 4.3.82 (KDE 4.4 >= 20091211))
kde4-config: 1.0


You likely need to upgrade CMake, 2.6-patch2 is minimum for KDE 4.3 I believe.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
kalle1950
Registered Member
Posts
16
Karma
0

Re: cmake error

Thu Dec 17, 2009 9:53 pm
my mistake. I thought I have to add the earlier changes to the CMakeLists.txt file, after removing them and installing some more libs cmake went through.

and even make went through!

Now it seems I can start working on the source code. Thanks for all your patient and very good help!


Bookmarks



Who is online

Registered users: abc72656, Bing [Bot], daret, Google [Bot], Sogou [Bot], Yahoo [Bot]