Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 717122 - dev-qt/qtwebengine-5.14.2[-geolocation] fails to build when dev-qt/qtwebengine[geolocation(+)] is installed: undefined reference to `QtWebEngineCore::LocationProviderQt::LocationProviderQt()'
Summary: dev-qt/qtwebengine-5.14.2[-geolocation] fails to build when dev-qt/qtwebengin...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-11 17:41 UTC by Leonard Lausen
Modified: 2021-03-11 03:41 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log.zst,822.18 KB, application/octet-stream)
2020-04-11 17:42 UTC, Leonard Lausen
Details
emerge info (emerge-info,7.65 KB, text/plain)
2020-04-11 22:18 UTC, Leonard Lausen
Details
build.log (build.log.xz,640.28 KB, application/x-xz)
2020-04-12 08:50 UTC, Tomasz Golinski
Details
emerge-info (emerge.info.gz,3.50 KB, application/gzip)
2020-04-12 08:50 UTC, Tomasz Golinski
Details
Patch (qtwebengine.patch,1.20 KB, patch)
2020-04-26 13:15 UTC, Arfrever Frehtes Taifersar Arahesis
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Leonard Lausen 2020-04-11 17:41:12 UTC
geolocation useflag doesn't work.


% equery u qtwebengine                                                                                                                                                                                                            ~
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for dev-qt/qtwebengine-5.14.2:
 U I
 + + alsa          : Add support for media-libs/alsa-lib (Advanced Linux Sound Architecture)
 - - bindist       : Flag to enable or disable options for prebuilt (GRP) packages (eg. due to licensing issues)
 - - debug         : Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
 - - designer      : Install the QWebEngineView plugin used to add widgets in dev-qt/designer forms that display web pages.
 - - geolocation   : Enable physical position determination via dev-qt/qtpositioning
 - - jumbo-build   : Combine source files to speed up build process.
 - - kerberos      : Add kerberos support
 + + pulseaudio    : Add support for PulseAudio sound server
 + - system-ffmpeg : Use the system-wide media-video/ffmpeg instead of bundled.
 + - system-icu    : Use the system-wide dev-libs/icu instead of bundled.
 - - test          : Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can be toggled independently)
 + + widgets       : Enable QtWidgets support


Reproducible: Always
Comment 1 Leonard Lausen 2020-04-11 17:42:07 UTC
Created attachment 632290 [details]
build.log
Comment 2 Jonas Stein gentoo-dev 2020-04-11 19:35:06 UTC
We need to have all information at hand before ticket assignment. That is why I ask you to 
* paste the emerge info 
as described on 
https://wiki.gentoo.org/wiki/Attach_the_logs_to_the_bug_ticket
Comment 3 Leonard Lausen 2020-04-11 22:18:55 UTC
Created attachment 632362 [details]
emerge info
Comment 4 Tomasz Golinski 2020-04-12 08:50:01 UTC
Created attachment 632432 [details]
build.log

Have the same problem here.
Comment 5 Tomasz Golinski 2020-04-12 08:50:26 UTC
Created attachment 632434 [details]
emerge-info
Comment 6 Olivier Huber 2020-04-12 20:18:14 UTC
# emerge --resume -p

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     U  ] dev-qt/qtwebengine-5.14.2:5/5.14::gentoo [5.14.1:5/5.14::gentoo] USE="alsa system-ffmpeg system-icu widgets -bindist -debug -designer -geolocation% -jumbo-build -kerberos% -pulseaudio -test (-pax_kernel%)" 0 KiB

Not much on google, this report from earlier this year
https://bugreports.qt.io/browse/QTBUG-81697

I also have dev-qt/qtpositioning installed (and up to date).

Looking at it a bit, seems like a nasty case of mixture between the build env and the system files. The installed qwebengine has the following config file

# cat /usr/include/qt5/QtWebEngineCore/qtwebenginecore-config.h
#define QT_FEATURE_webengine_extensions 1
#define QT_FEATURE_webengine_geolocation 1
#define QT_FEATURE_webengine_native_spellchecker -1
#define QT_FEATURE_webengine_spellchecker 1
#define QT_FEATURE_webengine_webchannel 1

Now the config file in the build directory has
 # cat ./src/core/qtwebenginecore-config.h
#define QT_FEATURE_webengine_extensions 1
#define QT_FEATURE_webengine_geolocation -1
#define QT_FEATURE_webengine_native_spellchecker -1
#define QT_FEATURE_webengine_spellchecker 1
#define QT_FEATURE_webengine_webchannel 1

I rerun the command used in the compile phase to get the processed file. It will we attached. There we see the culprit

# 1306 "/usr/include/qt5/QtCore/qglobal.h" 2
# 44 "/dev/shm/portage/dev-qt/qtwebengine-5.14.2/work/qtwebengine-everywhere-src-5.14.2/include/QtWebEngineCore/../../src/core/api/qtwebenginecoreglobal.h" 2
# 1 "/usr/include/qt5/QtWebEngineCore/qtwebenginecore-config.h" 1
# 45 "/dev/shm/portage/dev-qt/qtwebengine-5.14.2/work/qtwebengine-everywhere-src-5.14.2/include/QtWebEngineCore/../../src/core/api/qtwebenginecoreglobal.h" 2


Indeed the file /dev/shm/portage/dev-qt/qtwebengine-5.14.2/work/qtwebengine-everywhere-src-5.14.2/include/QtWebEngineCore/../../src/core/api/qtwebenginecoreglobal.h has

#include <QtWebEngineCore/qtwebenginecore-config.h>

and the compiler gets -I/usr/include/qt5 on the command line.
Comment 7 Olivier Huber 2020-04-12 20:27:53 UTC
Unfortunately, can't attached the full processed file, too big, and the interesting bit with the problematic code is at the very end of the file. It indeed contains

std::unique_ptr<device::LocationProvider> ContentBrowserClientQt::OverrideSystemLocationProvider()
{
    return base::WrapUnique(new LocationProviderQt());
}




That's to be expected given that the config header defines support for the geolocation.

Here is a link to it (1.5M) https://perso.crans.org/~huber/content_browser_client_qt.proc.xz
Comment 8 Rafael Kitover 2020-04-17 18:18:34 UTC
For anyone who came here and is wondering how to fix this build error, I will summarize:

1. Remove geolocation use flag.

2. Edit /usr/include/qt5/QtWebEngineCore/qtwebenginecore-config.h and set the geolocation macro to -1.

3. Build again, should work now!

Hope that helps!
Comment 9 Tiger 2020-04-24 14:17:14 UTC
Hello,

Migrated from qtwebengine-5.14.0 (merged in January) to 5.14.2 and same thing happened. The geolocation USE flag has been added recently and is turned off by default from default/linux/amd64/17.1/desktop/plasma profile.

Enabled it has fixed the compilation issue without adding extra dependencies (at least on mys system).

This issue looks to be detailed there : https://bugreports.qt.io/browse/QTBUG-81697

Removing qtpositioning package does not fix the issue while using -geolocation USE flag.

Btw jumbo-build reduce to 50% compile time !

~ # qlop -av qtwebengine
dev-qt/qtwebengine-5.14.2: 4:46:45 average for 1 merge
dev-qt/qtwebengine-5.14.0: 10:09:14 average for 1 merge

 ~ # qlist -IvU qtwebengine
dev-qt/qtwebengine-5.14.2 alsa -bindist -debug -designer geolocation jumbo-build -kerberos -pulseaudio -system-ffmpeg -system-icu -test widgets

Hope that it helps !
Comment 10 Guillaume Castagnino 2020-04-25 11:53:21 UTC
I encountered this when disabling the USE flag. It seems that somewhere during the build a linkage is partially done using the system qtwebengine having geolocation enabled, leading to this undefined reference issue.
If you first unmerge qtwebengine then emerge it with -geolocation, there is no problem at all.
Comment 11 Arfrever Frehtes Taifersar Arahesis 2020-04-26 13:15:29 UTC
Created attachment 634652 [details, diff]
Patch

Vanilla build system would be even more broken.

Ebuild modifies INCLUDEPATH variable in *.pr[fio] files in order to make -I${source_directory}/include be included in options passed to compiler.

However separate build directory is now used even for release ebuilds (for Qt >=5.14.2) since:
https://gitweb.gentoo.org/proj/qt.git/commit/?id=548df2493d9801b2503f412ec8c424418cb7721b
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9f97fded3a21803c278e3dc6478327e43ee7f354

This results in some headers being generated in build directory (== ${source_directory}_build).


In ${WORKDIR}:
$ tree -a qtwebengine-everywhere-src-5.14.2_build/include
qtwebengine-everywhere-src-5.14.2_build/include
└── QtWebEngineCore
    ├── 5.14.2
    │   └── QtWebEngineCore
    │       └── private
    │           └── qtwebenginecore-config_p.h
    ├── QtWebEngineCoreDepends
    └── qtwebenginecore-config.h

4 directories, 3 files
$ cat qtwebengine-everywhere-src-5.14.2_build/include/QtWebEngineCore/qtwebenginecore-config.h
#include "../../src/core/qtwebenginecore-config.h"
$ cat qtwebengine-everywhere-src-5.14.2_build/src/core/qtwebenginecore-config.h
#define QT_FEATURE_webengine_extensions 1
#define QT_FEATURE_webengine_geolocation -1
#define QT_FEATURE_webengine_native_spellchecker -1
#define QT_FEATURE_webengine_spellchecker 1
#define QT_FEATURE_webengine_webchannel 1


Sufficient solution is to ensure that both -I${source_directory}_build/include and -I${source_directory}/include are passed to compiler.
(In QtWebEngine's *.pr[fio] files $${QTWEBENGINE_ROOT} refers source directory.)
Comment 12 James L. Hammons 2020-04-26 13:23:25 UTC
Can confirm Guillaume's fix (remove old QtWebEngine, install new with -geolocation--which seems to be the default) fixes the problem.
Comment 13 Larry the Git Cow gentoo-dev 2020-04-29 16:02:06 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/proj/qt.git/commit/?id=32db3f7c38a616153d53a1bee35e08af295aa84e

commit 32db3f7c38a616153d53a1bee35e08af295aa84e
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
AuthorDate: 2020-04-26 12:57:02 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2020-04-28 21:46:44 +0000

    dev-qt/qtwebengine: Fix using generated headers
    
    Closes: https://bugs.gentoo.org/717122
    Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 dev-qt/qtwebengine/qtwebengine-5.15.0_beta4.ebuild | 3 ++-
 dev-qt/qtwebengine/qtwebengine-5.15.9999.ebuild    | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
Comment 14 Larry the Git Cow gentoo-dev 2020-04-29 18:09:10 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e89598d59927472104961d95b69d9be13f97e236

commit e89598d59927472104961d95b69d9be13f97e236
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
AuthorDate: 2020-04-26 12:57:02 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2020-04-29 18:08:25 +0000

    dev-qt/qtwebengine: Fix using generated headers
    
    Closes: https://bugs.gentoo.org/717122
    Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 dev-qt/qtwebengine/qtwebengine-5.14.2.ebuild | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)