Reply to topic

Compiling things on KDE Frameworks.

nerdopolis
Registered Member
Posts
130
Karma
0
OS

Compiling things on KDE Frameworks.

Sun Sep 08, 2013 11:08 pm
Hi.


I am trying to compile plasma-framework and kde-workspace on top of KDE Frameworks, however it seems I am running into cmake issues.

I have a recent cmake master, and extra-cmake-modules master.

This is the error I get. It seems that a path variable is missing from cmake
Code: Select all
   

    -- KF5[ThreadWeaver]: Loaded /opt/lib/i386-linux-gnu/cmake/ThreadWeaver/ThreadWeaverConfig.cmake
    CMake Error at /opt/lib/i386-linux-gnu/cmake/KConfig/KConfigTargets.cmake:69 (message):
      The imported target "KF5::kconfig_compiler" references the file
     
         "bin/kconfig_compiler"
     
      but this file does not exist.  Possible reasons include:
     
      * The file was deleted, renamed, or moved to another location.
     
      * An install or uninstall procedure did not complete successfully.
     
      * The installation package was faulty and contained
     
         "/opt/lib/i386-linux-gnu/cmake/KConfig/KConfigTargets.cmake"
     
      but not all the files it references.
     
    Call Stack (most recent call first):
      /opt/lib/i386-linux-gnu/cmake/KConfig/KConfigConfig.cmake:59 (include)
      /opt/share/ECM/find-modules/FindKF5.cmake:203 (find_package)
      CMakeLists.txt:41 (find_package)
     
     
    -- Configuring incomplete, errors occurred!


This is how I build kdelibs frameworks
Code: Select all
cmake .. -DCMAKE_INSTALL_PREFIX=$INSTALLDIR -DCMAKE_PREFIX_PATH=$INSTALLDIR -DLIB_INSTALL_DIR=$INSTALLDIR/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)

this is how I build plasma-frameworks
Code: Select all
cmake .. -DCMAKE_INSTALL_PREFIX=$INSTALLDIR -DCMAKE_PREFIX_PATH=$INSTALLDIR -DLIB_INSTALL_DIR=$INSTALLDIR/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH



Is there a variable or flag I am missing?

Thanks
User avatar bcooksley
Administrator
Posts
18657
Karma
83
OS
Is the $PREFIX/bin directory for kdelibs frameworks in your PATH?


System Settings and Device Actions KCM maintainer
Image
nerdopolis
Registered Member
Posts
130
Karma
0
OS
bcooksley wrote:Is the $PREFIX/bin directory for kdelibs frameworks in your PATH?

Yes. It's in my $PATH, as well as $LD_LIBRARY_PATH


Code: Select all
export MAKEFLAGS="-j $(( $(cat /proc/cpuinfo | grep ^"processor" -c) ))"
export LD_LIBRARY_PATH=$INSTALLDIR/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH):$INSTALLDIR/lib:/usr/local/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH):/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH):/usr/local/lib:/usr/lib
export PATH="$INSTALLDIR/sbin:$INSTALLDIR/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/sbin:/bin:/usr/games"
export PKG_CONFIG_PATH=$INSTALLDIR/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/pkgconfig:$INSTALLDIR/lib/pkgconfig/:$INSTALLDIR/share/pkgconfig/
export ACLOCAL="aclocal -I $INSTALLDIR/share/aclocal"
export CPATH=$INSTALLDIR/include
export LIBRARY_PATH=$INSTALLDIR/lib
export PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
export QT_PLUGIN_PATH=$INSTALLDIR/lib/plugins/
export CMAKE_PREFIX_PATH=$INSTALLDIR:$CMAKE_PREFIX_PATH
User avatar bcooksley
Administrator
Posts
18657
Karma
83
OS
Can you please paste the contents of /opt/lib/i386-linux-gnu/cmake/KConfig/KConfigTargets.cmake?


System Settings and Device Actions KCM maintainer
Image
nerdopolis
Registered Member
Posts
130
Karma
0
OS
bcooksley wrote:Can you please paste the contents of /opt/lib/i386-linux-gnu/cmake/KConfig/KConfigTargets.cmake?


Hi.

Here are the files below

EDIT: Oh I forgot, I modified these files with the build script, in an attempt to work around the path issue. I had added a sed statement to add /opt/ in front of the bin
For example IMPORTED_LOCATION_RELWITHDEBINFO "/opt/bin/kconfig_compiler"
was at first
IMPORTED_LOCATION_RELWITHDEBINFO "bin/kconfig_compiler"

/opt/lib/i386-linux-gnu/cmake/KConfig/KConfigTargets.cmake
Code: Select all
# Generated by CMake 2.8.11.20130816-g31719

if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5)
   message(FATAL_ERROR "CMake >= 2.6.0 required")
endif()
cmake_policy(PUSH)
cmake_policy(VERSION 2.6)
#----------------------------------------------------------------
# Generated CMake target import file.
#----------------------------------------------------------------

# Commands may need to know the format version.
set(CMAKE_IMPORT_FILE_VERSION 1)

# Protect against multiple inclusion, which would fail when already imported targets are added once more.
set(_targetsDefined)
set(_targetsNotDefined)
set(_expectedTargets)
foreach(_expectedTarget KF5::KConfigCore KF5::KConfigGui KF5::kconfig_compiler)
  list(APPEND _expectedTargets ${_expectedTarget})
  if(NOT TARGET ${_expectedTarget})
    list(APPEND _targetsNotDefined ${_expectedTarget})
  endif()
  if(TARGET ${_expectedTarget})
    list(APPEND _targetsDefined ${_expectedTarget})
  endif()
endforeach()
if("${_targetsDefined}" STREQUAL "${_expectedTargets}")
  set(CMAKE_IMPORT_FILE_VERSION)
  cmake_policy(POP)
  return()
endif()
if(NOT "${_targetsDefined}" STREQUAL "")
  message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n")
endif()
unset(_targetsDefined)
unset(_targetsNotDefined)
unset(_expectedTargets)


# Create imported target KF5::KConfigCore
add_library(KF5::KConfigCore SHARED IMPORTED)

set_target_properties(KF5::KConfigCore PROPERTIES
  INTERFACE_INCLUDE_DIRECTORIES "/opt/include"
)

# Create imported target KF5::KConfigGui
add_library(KF5::KConfigGui SHARED IMPORTED)

set_target_properties(KF5::KConfigGui PROPERTIES
  INTERFACE_INCLUDE_DIRECTORIES "/opt/include"
)

# Create imported target KF5::kconfig_compiler
add_executable(KF5::kconfig_compiler IMPORTED)

# Load information for each installed configuration.
get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
file(GLOB CONFIG_FILES "${_DIR}/KConfigTargets-*.cmake")
foreach(f ${CONFIG_FILES})
  include(${f})
endforeach()

# Loop over all imported files and verify that they actually exist
foreach(target ${_IMPORT_CHECK_TARGETS} )
  foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} )
    if(NOT EXISTS "${file}" )
      message(FATAL_ERROR "The imported target \"${target}\" references the file
   \"${file}\"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   \"${CMAKE_CURRENT_LIST_FILE}\"
but not all the files it references.
")
    endif()
  endforeach()
  unset(_IMPORT_CHECK_FILES_FOR_${target})
endforeach()
unset(_IMPORT_CHECK_TARGETS)

# This file does not depend on other imported targets which have
# been exported from the same project but in a separate export set.

# Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION)
cmake_policy(POP)



/opt/lib/i386-linux-gnu/cmake/KConfig/KConfigTargets-relwithdebinfo.cmake
Code: Select all
#----------------------------------------------------------------
# Generated CMake target import file for configuration "RelWithDebInfo".
#----------------------------------------------------------------

# Commands may need to know the format version.
set(CMAKE_IMPORT_FILE_VERSION 1)

# Import target "KF5::KConfigCore" for configuration "RelWithDebInfo"
set_property(TARGET KF5::KConfigCore APPEND PROPERTY IMPORTED_CONFIGURATIONS RELWITHDEBINFO)
set_target_properties(KF5::KConfigCore PROPERTIES
  IMPORTED_LINK_INTERFACE_LIBRARIES_RELWITHDEBINFO "Qt5::Core"
  IMPORTED_LOCATION_RELWITHDEBINFO "/opt/lib/i386-linux-gnu/libKConfigCore.so.5.0.0"
  IMPORTED_SONAME_RELWITHDEBINFO "libKConfigCore.so.5"
  )

list(APPEND _IMPORT_CHECK_TARGETS KF5::KConfigCore )
list(APPEND _IMPORT_CHECK_FILES_FOR_KF5::KConfigCore "/opt/lib/i386-linux-gnu/libKConfigCore.so.5.0.0" )

# Import target "KF5::KConfigGui" for configuration "RelWithDebInfo"
set_property(TARGET KF5::KConfigGui APPEND PROPERTY IMPORTED_CONFIGURATIONS RELWITHDEBINFO)
set_target_properties(KF5::KConfigGui PROPERTIES
  IMPORTED_LINK_INTERFACE_LIBRARIES_RELWITHDEBINFO "Qt5::Gui;KF5::KConfigCore"
  IMPORTED_LOCATION_RELWITHDEBINFO "/opt/lib/i386-linux-gnu/libKConfigGui.so.5.0.0"
  IMPORTED_SONAME_RELWITHDEBINFO "libKConfigGui.so.5"
  )

list(APPEND _IMPORT_CHECK_TARGETS KF5::KConfigGui )
list(APPEND _IMPORT_CHECK_FILES_FOR_KF5::KConfigGui "/opt/lib/i386-linux-gnu/libKConfigGui.so.5.0.0" )

# Import target "KF5::kconfig_compiler" for configuration "RelWithDebInfo"
set_property(TARGET KF5::kconfig_compiler APPEND PROPERTY IMPORTED_CONFIGURATIONS RELWITHDEBINFO)
set_target_properties(KF5::kconfig_compiler PROPERTIES
  IMPORTED_LOCATION_RELWITHDEBINFO "/opt/bin/kconfig_compiler"
  )

list(APPEND _IMPORT_CHECK_TARGETS KF5::kconfig_compiler )
list(APPEND _IMPORT_CHECK_FILES_FOR_KF5::kconfig_compiler "/opt/bin/kconfig_compiler" )

# Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION)
User avatar bcooksley
Administrator
Posts
18657
Karma
83
OS
Did the line originally look something like this?
Code: Select all
${_IMPORT_PREFIX}/bin/kconfig_compiler

If it did, can you please ensure you are using the latest released version of CMake, and have updated Extra-CMake-Modules (ECM) to it's latest version?


System Settings and Device Actions KCM maintainer
Image
nerdopolis
Registered Member
Posts
130
Karma
0
OS
These where pretty recent compiles of extra-cmake-modules and cmake master. The builds are less then a week old.

And I had previously gotten the same errors I think when I tried about a month or two proior too, with the malformed path in the cmake files to the executables.

I must be missing a flag, or it could be the multiarch path? That's all I can think of.
User avatar bcooksley
Administrator
Posts
18657
Karma
83
OS
If you drop the -DLIB_INSTALL_DIR argument (ie. use CMake defaults / no multiarch) does this have any effect?


System Settings and Device Actions KCM maintainer
Image
nerdopolis
Registered Member
Posts
130
Karma
0
OS
bcooksley wrote:If you drop the -DLIB_INSTALL_DIR argument (ie. use CMake defaults / no multiarch) does this have any effect?


Yes. Now it doubles up the /opt/


EDIT: Wait. It's probably remains of the sed hacks on the cmake files of me trying to workaround the cmake issue dropping /opt/. I pulled out the sed commands from the kdelibs build script, and will now try a new rebuild
nerdopolis
Registered Member
Posts
130
Karma
0
OS
nerdopolis wrote:
bcooksley wrote:If you drop the -DLIB_INSTALL_DIR argument (ie. use CMake defaults / no multiarch) does this have any effect?


Yes. Now it doubles up the /opt/


EDIT: Wait. It's probably remains of the sed hacks on the cmake files of me trying to workaround the cmake issue dropping /opt/. I pulled out the sed commands from the kdelibs build script, and will now try a new rebuild


plasma-framework errors out during the build with a bunch of GL errors,

Code: Select all
/srcbuild/plasma-framework/src/plasmapkg/plasmapkg.cpp:550:37: warning: ‘KPluginInfo::KPluginInfo(KService::Ptr)’ is deprecated (declared at /opt/include/kplugininfo.h:114) [-Wdeprecated-declarations]
             KPluginInfo info(service);
                                     ^
In file included from /opt/include/GL/glx.h:32:0,
                 from /srcbuild/plasma-framework/src/declarativeimports/core/windowthumbnail.cpp:32:
/opt/include/GL/gl.h:186:0: warning: "GL_DOUBLE" redefined [enabled by default]
 #define GL_DOUBLE    0x140A
 ^
In file included from /opt/include/QtQuick/qsggeometry.h:46:0,
                 from /opt/include/QtQuick/qsgnode.h:45,
                 from /opt/include/QtQuick/qsgsimpletexturenode.h:45,
                 from /opt/include/QtQuick/QSGSimpleTextureNode:1,
                 from /srcbuild/plasma-framework/src/declarativeimports/core/windowthumbnail.h:24,
                 from /srcbuild/plasma-framework/src/declarativeimports/core/windowthumbnail.cpp:19:
/opt/include/QtGui/qopengl.h:94:0: note: this is the location of the previous definition
 #   define GL_DOUBLE GL_FLOAT
 ^
In file included from /opt/include/GL/glx.h:32:0,
                 from /srcbuild/plasma-framework/src/declarativeimports/core/windowthumbnail.cpp:32:
/opt/include/GL/gl.h:162:17: error: conflicting declaration ‘typedef double GLdouble’
 typedef double  GLdouble; /* double precision float */

and

kde-workspace frameworks-scratch seems to have a cmake error
Code: Select all
CMake Error at kwin/killer/CMakeLists.txt:7 (set_target_properties):
  set_target_properties called with incorrect number of arguments.


but the other cmake issue does seem to have been resolved by disabling multiarch.

I'll try to see how far I can get these builds to go now though
nerdopolis
Registered Member
Posts
130
Karma
0
OS
plasma-framework errors out during the build with a bunch of GL errors,


...I should mention I built qt5 with -opengl es2
Code: Select all
/srcbuild/plasma-framework/src/plasmapkg/plasmapkg.cpp:550:37: warning: ‘KPluginInfo::KPluginInfo(KService::Ptr)’ is deprecated (declared at /opt/include/kplugininfo.h:114) [-Wdeprecated-declarations]
             KPluginInfo info(service);
                                     ^
In file included from /opt/include/GL/glx.h:32:0,
                 from /srcbuild/plasma-framework/src/declarativeimports/core/windowthumbnail.cpp:32:
/opt/include/GL/gl.h:186:0: warning: "GL_DOUBLE" redefined [enabled by default]
 #define GL_DOUBLE    0x140A
 ^
In file included from /opt/include/QtQuick/qsggeometry.h:46:0,
                 from /opt/include/QtQuick/qsgnode.h:45,
                 from /opt/include/QtQuick/qsgsimpletexturenode.h:45,
                 from /opt/include/QtQuick/QSGSimpleTextureNode:1,
                 from /srcbuild/plasma-framework/src/declarativeimports/core/windowthumbnail.h:24,
                 from /srcbuild/plasma-framework/src/declarativeimports/core/windowthumbnail.cpp:19:
/opt/include/QtGui/qopengl.h:94:0: note: this is the location of the previous definition
 #   define GL_DOUBLE GL_FLOAT
 ^
In file included from /opt/include/GL/glx.h:32:0,
                 from /srcbuild/plasma-framework/src/declarativeimports/core/windowthumbnail.cpp:32:
/opt/include/GL/gl.h:162:17: error: conflicting declaration ‘typedef double GLdouble’
 typedef double  GLdouble; /* double precision float */

and

kde-workspace frameworks-scratch seems to have a cmake error
Code: Select all
CMake Error at kwin/killer/CMakeLists.txt:7 (set_target_properties):
  set_target_properties called with incorrect number of arguments.


but the other cmake issue does seem to have been resolved by disabling multiarch.

I'll try to see how far I can get these builds to go now though[/quote]
User avatar bcooksley
Administrator
Posts
18657
Karma
83
OS
Okay. I suspect Plasma Framework may not be handling the case of GL imports correctly in this case - it seems Qt has some custom #define's used to workaround absent items in OpenGL ES 2, which are present in regular OpenGL which Plasma Framework is trying to use.

I would suggest sending an email to kde-framework-devel@kde.org concerning that. With regards to kde-workspace - serious development on porting it to Frameworks is still very much in it's infancy. I would suggest asking in #plasma on Freenode regarding getting that built.


System Settings and Device Actions KCM maintainer
Image

 
Reply to topic

Bookmarks



Who is online

Registered users: afiestas, arojas, avishekk, Baidu [Spider], Bing [Bot], bjoernbalazs, Cris70, edmael, einar, epsi1on, Exabot [Bot], ggael, Google [Bot], google01103, Hans, ivan, jgrulich, joshaughnessy, jstaniek, koriun, La Ninje, Majestic-12 [Bot], MSNbot Media, ooker, progdan, scummos, sinclair, Sogou [Bot], TheraHedwig, Tioz, Yahoo [Bot]