dev setup error - undefined reference to `qt_version_tag@Qt_5.12'

I just started the dev setup on on Kubuntu 19.04 by working through the
'getting started' page when I was stopped dead in my tracks by this build
error while building Dolphin.

I ran - *kdesrc-build dolphin --include-dependencies*
Which failed on just one module - *frameworkintegration*

Log output:

[ 53%] Building CXX object src/kstyle/CMakeFiles/KF5Style.dir/kstyle.cpp.o
[ 53%] Building CXX object
/home/stephen/kde/src/frameworkintegration/src/kstyle/kstyle.cpp: In member
function ‘virtual int KStyle::styleHint(QStyle::StyleHint, const
QStyleOption*, const QWidget*, QStyleHintReturn*) const’:
warning: case value ‘4278190081’ not in enumerated type ‘QStyle::StyleHint’
case SH_KCustomStyleElement:
[ 57%] Linking CXX executable ../../../bin/appstreamhandler
[ 60%] Linking CXX executable ../../../bin/knshandlertest
[ 64%] Linking CXX executable ../../../bin/knshandler
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/ undefined
reference to ` ... at Qt_5 dot 12'
collect2: error: ld returned 1 exit status
make[2]: ***
bin/appstreamhandler] Error 1
make[1]: *** [CMakeFiles/Makefile2:558:
Error 2
make[1]: *** Waiting for unfinished jobs....
[ 67%] Linking CXX shared module ../../bin/
[ 71%] Linking CXX shared library ../../bin/
[ 71%] Built target knshandlertest
[ 71%] Built target knshandler
[ 71%] Built target FrameworkIntegrationPlugin
[ 71%] Built target KF5Style
make: *** [Makefile:141: all] Error 2

Getting Started -
<a href="" title=""></a>

*Where there's a Wille, there's a way.*


Re: dev setup error - undefined reference to `qt_version_tag@Qt_

By Konstantin Kharlamov at 08/13/2019 - 18:03

В Вт, авг 13, 2019 at 15:31, p. stephen w
<p. ... at gmail dot com> написал:
IMO this looks like a bug in kdesrc-build: the per my
understanding should've been used the one that was built by
kdesrc-build, but instead it tries the system one, which leads to the
mismatch with Qt versions.

I'm looking at the "Getting involved" page, the page uses latest
kdesrc-build, taken from git:// —
that's what you're using too, right? In this case I recommend you to
report a bug <a href="" title=""></a>
FWIW I don't know how to use the script, but maybe you can resolve the
error if you make the kdesrc-build to build appstream-qt (not sure if
it's the correct package name too though)

Anyway, the kdesrc-build script was supposed to make building easier,
however you may be able to build the project you wanted to contribute
to manually. For example, Konsole builds just fine for me on Archlinux,
and I'm looking at PKGBUILD (a script Archlinux is using to
build'n'assemble a package) for Dolphin, it looks pretty much the same.
You might try building it manually. For reference: after you did "git
clone git:// && cd dolphin", look at this
file¹: the three commands you need to execute to build dolphin are
written inside build() function.

1: <a href="" title=""></a>

Re: dev setup error - undefined reference to `qt_version_tag@Qt_

By Konstantin Kharlamov at 08/13/2019 - 18:11

…you may want to replace `DCMAKE_BUILD_TYPE=Release` with
`DCMAKE_BUILD_TYPE=Debug` though. You probably don't want "release" for
development, and also "debug" is a bit faster to compile.