Web lists-archives.com

Re: Error buildin KDE (KF5)




Hi Guys,
I solved the problem on kcoreaddons with solution provided by Allen reported at the end of this e-mail. After that I had to fix some other trivial dependancies problems but now I get a compilation error on kglobalaccel.


This time no problems in cmake.log, instead I have the following strange error in the build log

Building CXX object src/runtime/plugins/xcb/CMakeFiles/KF5GlobalAccelPrivateXcb.dir/__/__/logging.cpp.o
[ 90%] Building CXX object src/runtime/plugins/xcb/CMakeFiles/KF5GlobalAccelPrivateXcb.dir/KF5GlobalAccelPrivateXcb_automoc.cpp.o
Scanning dependencies of target kglobalaccel5
In file included from /home/lfranco/devel/kde/src/frameworks/kglobalaccel/src/runtime/logging.cpp:20:0:
/home/lfranco/devel/kde/src/frameworks/kglobalaccel/src/runtime/logging_p.h:22:18: fatal error: QDebug: no such file or directory
 #include <QDebug>
                  ^
compilation terminated.
In file included from /home/lfranco/devel/kde/src/frameworks/kglobalaccel/src/runtime/plugins/xcb/kglobalaccel_x11.h:23:0,
                 from /home/lfranco/devel/kde/src/frameworks/kglobalaccel/src/runtime/plugins/xcb/kglobalaccel_x11.cpp:21:
/home/lfranco/devel/kde/src/frameworks/kglobalaccel/src/runtime/plugins/xcb/../../kglobalaccel_interface.h:24:19: fatal error: QObject: no such file or directory
 #include <QObject>
                   ^
compilation terminated.
In file included from /home/lfranco/devel/kde/build/frameworks/kglobalaccel/src/runtime/plugins/xcb/../../../../../../../src/frameworks/kglobalaccel/src/runtime/plugins/xcb/kglobalaccel_x11.h:23:0,
                 from /home/lfranco/devel/kde/build/frameworks/kglobalaccel/src/runtime/plugins/xcb/moc_kglobalaccel_x11.cpp:9,
                 from /home/lfranco/devel/kde/build/frameworks/kglobalaccel/src/runtime/plugins/xcb/KF5GlobalAccelPrivateXcb_automoc.cpp:2:
/home/lfranco/devel/kde/build/frameworks/kglobalaccel/src/runtime/plugins/xcb/../../../../../../../src/frameworks/kglobalaccel/src/runtime/plugins/xcb/../../kglobalaccel_interface.h:24:19: fatal error: QObject: no such file or directory
 #include <QObject>
                   ^
compilation terminated.
[ 93%] [ 96%] [100%] Building CXX object src/runtime/CMakeFiles/kglobalaccel5.dir/main.cpp.o
Building CXX object src/runtime/CMakeFiles/kglobalaccel5.dir/kglobalaccel5_automoc.cpp.o
Building CXX object src/runtime/CMakeFiles/kglobalaccel5.dir/logging.cpp.o
gmake[2]: *** [src/runtime/plugins/xcb/CMakeFiles/KF5GlobalAccelPrivateXcb.dir/kglobalaccel_x11.cpp.o] Errore 1
gmake[2]: *** Attesa dei processi non terminati....
gmake[2]: *** [src/runtime/plugins/xcb/CMakeFiles/KF5GlobalAccelPrivateXcb.dir/KF5GlobalAccelPrivateXcb_automoc.cpp.o] Errore 1
gmake[2]: *** [src/runtime/plugins/xcb/CMakeFiles/KF5GlobalAccelPrivateXcb.dir/__/__/logging.cpp.o] Errore 1
gmake[1]: *** [src/runtime/plugins/xcb/CMakeFiles/KF5GlobalAccelPrivateXcb.dir/all] Errore 2
gmake[1]: *** Attesa dei processi non terminati....
In file included from /home/lfranco/devel/kde/src/frameworks/kglobalaccel/src/runtime/main.cpp:22:0:
/home/lfranco/devel/kde/src/frameworks/kglobalaccel/src/runtime/kglobalacceld.h:27:33: fatal error: kglobalshortcutinfo.h: no such file or directory
 #include <kglobalshortcutinfo.h>
                                 ^
compilation terminated.
gmake[2]: *** [src/runtime/CMakeFiles/kglobalaccel5.dir/main.cpp.o] Errore 1
gmake[2]: *** Attesa dei processi non terminati....
gmake[1]: *** [src/runtime/CMakeFiles/kglobalaccel5.dir/all] Errore 2
gmake: *** [all] Errore 2

I think that my Qt5 installation is working correctly because I correctly build some tutorial applications and all previous modules against the built KF5 folder.
Regarding kglobalshortcutinfo.h it is in the source directory of the kglobalaccel module, but I cannot find it in the build directory.

Any ideas? Am I missing something? Has someone ever faced with a similar problem building KF5?

Any help would be greatly appreciated.
Very thankyou and best regards.





Il Sabato 19 Marzo 2016 15:19, Allen Winter <winter@xxxxxxx> ha scritto:


See the fix at https://git.reviewboard.kde.org/r/127425/

On Saturday, March 19, 2016 09:57:53 AM Allen Winter wrote:
> Same here.
> The relevant problem is shown in the cmake.log:
>
> CMake Warning (dev) at src/lib/CMakeLists.txt:99 (add_library):
>  Policy CMP0028 is not set: Double colon in target name means ALIAS or
>  IMPORTED target.  Run "cmake --help-policy CMP0028" for policy details.
>  Use the cmake_policy command to set the policy and suppress this warning.
>
>  Target "KF5CoreAddons" links to target "Threads::Threads" but the target
>  was not found.  Perhaps a find_package() call is missing for an IMPORTED
>  target, or an ALIAS target is missing?
>
>
>
> On Friday, March 18, 2016 10:47:14 PM rafranco.2014@xxxxxxxx wrote:
> > Hi guys, I' m new to this mailing list and to the KDE community.
> > I' m a newby in KDE development but I have a not so bad knowledge of Linux.
> > I don't know if this is the right place to post these kind of requests and if it is not the case I'd ask you to point me where can I post it.
> > I was trying to build kde following instructions at
> >
> > https://community.kde.org/Guidelines_and_HOWTOs/Build_from_source#Run_kdesrc-build
> >
> > I executed exactly all steps reported there and installed all required packages from official distro repository except for cmake 2.8.12 that I found at
> >
> > https://kojipkgs.fedoraproject.org/packages/cmake/2.8.12/3.fc21/x86_64/cmake-2.8.12-3.fc21.x86_64.rpm
> >
> > and installed with yum localinstall. My host is a CentOS 7 x64 VMware virtual machine.
> >
> > First few modules are built correctly without any problem using kdesrc-build but build process stops on kcoreaddons with the following error:
> >
> >
> > Building CXX object src/lib/CMakeFiles/KF5CoreAddons.dir/KF5CoreAddons_automoc.cpp.o
> > Linking CXX shared library libKF5CoreAddons.so
> > /usr/bin/ld: cannot find -lThreads::Threads
> > collect2: error: ld returned 1 exit status
> > gmake[2]: *** [src/lib/libKF5CoreAddons.so.5.21.0] Errore 1
> > gmake[1]: *** [src/lib/CMakeFiles/KF5CoreAddons.dir/all] Errore 2
> > gmake: *** [all] Errore 2
> >
> >
> > while the following is the cmake log I find
> >
> >
> > # kdesrc-build running: 'cmake' '/home/lfranco/devel/kde/src/frameworks/kcoreaddons' '-DCMAKE_BUILD_TYPE:STRING=debug' '-DKDE4_BUILD_TESTS=true' '-DBUILD_TESTING=TRUE' '-DCMAKE_BUILD_TYPE:STRING=debug' '-DCMAKE_CXX_FLAGS:STRING=-std=c++11 -pipe -DQT_STRICT_ITERATORS -DQURL_NO_CAST_FROM_STRING -DQT_NO_HTTP -DQT_NO_FTP -Wformat -Werror=format-security -Werror=return-type -Wno-variadic-macros -Wlogical-op -Wmissing-include-dirs ' '-DCMAKE_INSTALL_PREFIX=/home/lfranco/devel/kde/usr'
> > # from directory: /home/lfranco/devel/kde/build/frameworks/kcoreaddons
> > -- The C compiler identification is GNU 4.8.5
> > -- The CXX compiler identification is GNU 4.8.5
> > -- Check for working C compiler: /usr/bin/cc
> > -- Check for working C compiler: /usr/bin/cc -- 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
> >
>