Bug 239988 - editors/libreoffice: update 6.2.5 -> 6.3.0 compiler failure: no viable constructor ...
Summary: editors/libreoffice: update 6.2.5 -> 6.3.0 compiler failure: no viable const...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Li-Wen Hsu
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2019-08-20 12:34 UTC by O. Hartmann
Modified: 2021-11-25 09:34 UTC (History)
10 users (show)

See Also:
bugzilla: maintainer-feedback? (office)


Attachments
removing using of std::function (1.04 KB, patch)
2019-08-21 21:32 UTC, Li-Wen Hsu
no flags Details | Diff
removing using of std::function from vcl/unx/kde5/KDE5SalInstance.cxx (799 bytes, patch)
2019-08-22 00:04 UTC, Vladimir Druzenko
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description O. Hartmann 2019-08-20 12:34:13 UTC
Recent ports tree update (at r509423) results in an update of port LibreOffice 6.2.5 -> 6.3.0, which fails with the compiler error shown below:

[...]
[CXX] vcl/qt5/Qt5Object.cxx
/usr/ports/editors/libreoffice/work/libreoffice-6.3.0.4/vcl/qt5/Qt5Instance.cxx:416:25: error: no viable constructor or deduction guide for deduction of template arguments of 'function'
        RunInMainThread(std::function([&, this]() { pPicker = createPicker(context, eMode); }));
                        ^
/usr/include/c++/v1/functional:1427:48: note: candidate template ignored: could not match 'function<_Fp>' against '(lambda at /usr/ports/editors/libreoffice/work/libreoffice-6.3.0.4/vcl/qt5/Qt5Instance.cxx:416:39)'
template<class _Fp> class _LIBCPP_TEMPLATE_VIS function; // undefined
[...]

Recompiling/updating ALL qt5-* ports or updating the ports tree and updating installed ports (traditional make variant) prior to the update of port editor/libreoffice doesn't result in a successful build.
Comment 1 Li-Wen Hsu freebsd_committer freebsd_triage 2019-08-20 12:51:48 UTC
(In reply to O. Hartmann from comment #0)
Which version of FreeBSD are you using? I did test in pourdiere in 12.0 and 11.3, amd64 and i386. May I suggest you updating all the depends ports to the latest version? You can obtain the list via `make all-depends-list`
Comment 2 Walter Schwarzenfeld freebsd_triage 2019-08-20 13:57:13 UTC
I bet O.Harmann is on 13.0.
Comment 3 Li-Wen Hsu freebsd_committer freebsd_triage 2019-08-20 14:04:31 UTC
(In reply to Walter Schwarzenfeld from comment #2)
That should also be fine, my desktop is 13 and I updated it and test again right before committing.
Comment 4 O. Hartmann 2019-08-20 14:46:48 UTC
The failure happens on 13-CURRENT (r351229) and on 12-STABLE (last updated on Monday, revision at this moment not accessible due to off site).
Comment 5 Walter Schwarzenfeld freebsd_triage 2019-08-20 15:00:18 UTC
qt5 is per default off.
Comment 6 Vladimir Druzenko freebsd_committer freebsd_triage 2019-08-20 17:27:29 UTC
12.0-p9 amd64 and i386 - same error.
Comment 7 Vladimir Druzenko freebsd_committer freebsd_triage 2019-08-20 17:30:20 UTC
(In reply to VVD from comment #6)
OPTIONS_FILE_SET+=CUPS
OPTIONS_FILE_SET+=DOCS
OPTIONS_FILE_UNSET+=GNOME
OPTIONS_FILE_UNSET+=GTK2
OPTIONS_FILE_UNSET+=GTK3
OPTIONS_FILE_SET+=JAVA
OPTIONS_FILE_SET+=KDE5
OPTIONS_FILE_SET+=MMEDIA
OPTIONS_FILE_UNSET+=PGSQL
OPTIONS_FILE_SET+=QT5
OPTIONS_FILE_UNSET+=SDK
OPTIONS_FILE_UNSET+=SYSTRAY
OPTIONS_FILE_UNSET+=TEST
OPTIONS_FILE_SET+=WEBDAV
Comment 8 Li-Wen Hsu freebsd_committer freebsd_triage 2019-08-20 21:54:07 UTC
I can reproduce it by enabling QT5 option.
Comment 9 Dimitry Andric freebsd_committer freebsd_triage 2019-08-21 07:23:34 UTC
Which revision of -CURRENT? Is that after base r351253?
Comment 10 Felix Palmen freebsd_committer freebsd_triage 2019-08-21 17:56:59 UTC
I'm on 12.0-RELEASE-p8 and facing the same issue, the build is broken with

editors_libreoffice_UNSET+=     GTK2 GTK3
editors_libreoffice_SET+=       JAVA KDE5 SYSTRAY WEBDAV

(probably caused by KDE5 option)
Comment 11 Vladimir Druzenko freebsd_committer freebsd_triage 2019-08-21 18:28:36 UTC
(In reply to Felix Palmen from comment #10)
> (probably caused by KDE5 option)
KDE5_IMPLIES=   QT5
Comment 12 Li-Wen Hsu freebsd_committer freebsd_triage 2019-08-21 21:32:06 UTC
Created attachment 206765 [details]
removing using of std::function

I haven't tried with base r351253, but this one looks like "Class template argument deduction for aggregates" feature, ref:

https://clang.llvm.org/cxx_status.html
https://bugs.llvm.org/show_bug.cgi?id=39606

Please try the attached workaround.
Comment 13 Vladimir Druzenko freebsd_committer freebsd_triage 2019-08-22 00:04:38 UTC
Created attachment 206773 [details]
removing using of std::function from vcl/unx/kde5/KDE5SalInstance.cxx

(In reply to Li-Wen Hsu from comment #12)
vcl/unx/kde5/KDE5SalInstance.cxx need the same patch.
Comment 14 gja822 2019-08-22 01:35:19 UTC
The same is on FreeBSD-11 STABLE
Comment 15 gja822 2019-08-22 01:37:12 UTC
(In reply to gja822 from comment #14)
amd64
Comment 16 Vladimir Druzenko freebsd_committer freebsd_triage 2019-08-22 01:49:23 UTC
Compiled fine with our patches on 12.0 i386:
https://bugs.freebsd.org/bugzilla/attachment.cgi?id=206765
https://bugs.freebsd.org/bugzilla/attachment.cgi?id=206773
Comment 17 commit-hook freebsd_committer freebsd_triage 2019-08-22 06:21:55 UTC
A commit references this bug:

Author: lwhsu
Date: Thu Aug 22 06:21:32 UTC 2019
New revision: 509581
URL: https://svnweb.freebsd.org/changeset/ports/509581

Log:
  Workaround for build failure due to newer C++ features when KDE5 and QT5 defined

  PR:		239988
  Submitted by:	VVD <vvd@unislabs.com>
  Reported by:	O. Hartmann <ohartmann@walstatt.org>

Changes:
  head/editors/libreoffice/files/patch-vcl_qt5_Qt5Instance.cxx
  head/editors/libreoffice/files/patch-vcl_unx_kde5_kde5salinstance.cxx
Comment 18 Felix Palmen freebsd_committer freebsd_triage 2019-08-22 07:48:57 UTC
The latest commit fixes the build for my configuration, thanks!
Comment 19 Adriaan de Groot freebsd_committer freebsd_triage 2019-08-22 09:17:03 UTC
Please report this upstream (with the same fix; I've asked them to look at it already). It's a valid change, simplifies the code a bit.
Comment 20 Li-Wen Hsu freebsd_committer freebsd_triage 2019-08-22 09:29:27 UTC
(In reply to Adriaan de Groot from comment #19)
I'm still wondering and testing if my assumption in #12 is correct, I am not sure the feature used here is c++17 or c++2a.

Also from the https://clang.llvm.org/cxx_status.html
It seems that there are some features supported since clang7 and in current compiler.mk, it still uses clang6 for c++17.
Comment 21 Vladimir Druzenko freebsd_committer freebsd_triage 2019-09-06 14:28:47 UTC
(In reply to Adriaan de Groot from comment #19)
> Please report this upstream (with the same fix; I've asked them to look at it already). It's a valid change, simplifies the code a bit.
https://bugs.documentfoundation.org/show_bug.cgi?id=127408
Comment 22 Vladimir Druzenko freebsd_committer freebsd_triage 2019-09-12 09:19:08 UTC
It was fixed upstream.
Comment 23 Wilbur310 2021-11-25 09:34:22 UTC
MARKED AS SPAM