Bug 244850 - editors/libreoffice fails to build on 13-CURRENT
Summary: editors/libreoffice fails to build on 13-CURRENT
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: FreeBSD Office Team
URL:
Keywords:
Depends on:
Blocks: 244251
  Show dependency treegraph
 
Reported: 2020-03-16 19:09 UTC by Cy Schubert
Modified: 2020-03-18 18:48 UTC (History)
3 users (show)

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


Attachments
Patch for vcl/inc/unx/saltype.h (711 bytes, patch)
2020-03-17 17:34 UTC, Trond.Endrestol
no flags Details | Diff
Patch for sd/source/ui/framework/factories/BasicPaneFactory.cxx (494 bytes, patch)
2020-03-17 19:55 UTC, Trond.Endrestol
no flags Details | Diff
Patch for sd/inc/OutlinerIterator.hxx (926 bytes, patch)
2020-03-17 20:27 UTC, Trond.Endrestol
no flags Details | Diff
Patch for sd/source/ui/view/OutlinerIterator.cxx (675 bytes, patch)
2020-03-17 20:28 UTC, Trond.Endrestol
no flags Details | Diff
Patch for compilerplugins/clang/simplifybool.cxx (3.09 KB, patch)
2020-03-17 21:30 UTC, Trond.Endrestol
no flags Details | Diff
Patch for cui/source/tabpages/tpline.cxx (687 bytes, patch)
2020-03-17 21:32 UTC, Trond.Endrestol
no flags Details | Diff
Patch for sc/source/ui/view/viewfunc.cxx (420 bytes, patch)
2020-03-17 23:16 UTC, Trond.Endrestol
no flags Details | Diff
Patch for sc/source/core/opencl/formulagroupcl.cxx (38.17 KB, patch)
2020-03-18 00:00 UTC, Trond.Endrestol
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Cy Schubert freebsd_committer 2020-03-16 19:09:43 UTC
Related to clang version 10.0.0.

/wrkdirs/usr/ports/editors/libreoffice/work/libreoffice-6.3.4.2/vcl/unx/generic/gdi/salgdi.cxx:161:18: error: use of overloaded operator '!=' is ambiguous (with operand types 'SalX11Screen' and 'S
alX11Screen')
    if( nXScreen != m_nXScreen )
        ~~~~~~~~ ^  ~~~~~~~~~~
/wrkdirs/usr/ports/editors/libreoffice/work/libreoffice-6.3.4.2/vcl/inc/unx/saltype.h:22:10: note: candidate function
    bool operator!=(const SalX11Screen &rOther) { return rOther.mnXScreen != mnXScreen; }
         ^
/wrkdirs/usr/ports/editors/libreoffice/work/libreoffice-6.3.4.2/vcl/inc/unx/saltype.h:21:10: note: candidate function
    bool operator==(const SalX11Screen &rOther) { return rOther.mnXScreen == mnXScreen; }
         ^
/wrkdirs/usr/ports/editors/libreoffice/work/libreoffice-6.3.4.2/vcl/inc/unx/saltype.h:21:10: note: candidate function (with reversed parameter order)
1 error generated.
gmake[2]: *** [/wrkdirs/usr/ports/editors/libreoffice/work/libreoffice-6.3.4.2/solenv/gbuild/LinkTarget.mk:293: /wrkdirs/usr/ports/editors/libreoffice/work/libreoffice-6.3.4.2/workdir/CxxObject/vc
l/unx/generic/gdi/salgdi.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
In file included from /wrkdirs/usr/ports/editors/libreoffice/work/libreoffice-6.3.4.2/vcl/unx/generic/window/salframe.cxx:59:
/wrkdirs/usr/ports/editors/libreoffice/work/libreoffice-6.3.4.2/vcl/inc/opengl/zone.hxx:37:33: warning: increment of object of volatile-qualified type 'volatile sal_uInt64' (aka 'volatile unsigned
 long long') is deprecated [-Wdeprecated-volatile]
     OpenGLZone() { gnEnterCount++; }
                                ^
/wrkdirs/usr/ports/editors/libreoffice/work/libreoffice-6.3.4.2/vcl/inc/opengl/zone.hxx:38:33: warning: increment of object of volatile-qualified type 'volatile sal_uInt64' (aka 'volatile unsigned
 long long') is deprecated [-Wdeprecated-volatile]
    ~OpenGLZone() { gnLeaveCount++; }
                                ^
/wrkdirs/usr/ports/editors/libreoffice/work/libreoffice-6.3.4.2/vcl/unx/generic/window/salframe.cxx:2410:34: error: use of overloaded operator '!=' is ambiguous (with operand types 'SalX11Screen'
and 'SalX11Screen')
        if( mpParent->m_nXScreen != m_nXScreen )
            ~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~
/wrkdirs/usr/ports/editors/libreoffice/work/libreoffice-6.3.4.2/vcl/inc/unx/saltype.h:22:10: note: candidate function
    bool operator!=(const SalX11Screen &rOther) { return rOther.mnXScreen != mnXScreen; }
         ^
/wrkdirs/usr/ports/editors/libreoffice/work/libreoffice-6.3.4.2/vcl/inc/unx/saltype.h:21:10: note: candidate function
    bool operator==(const SalX11Screen &rOther) { return rOther.mnXScreen == mnXScreen; }
         ^
/wrkdirs/usr/ports/editors/libreoffice/work/libreoffice-6.3.4.2/vcl/inc/unx/saltype.h:21:10: note: candidate function (with reversed parameter order)
/wrkdirs/usr/ports/editors/libreoffice/work/libreoffice-6.3.4.2/vcl/unx/generic/window/salframe.cxx:2485:34: error: use of overloaded operator '!=' is ambiguous (with operand types 'SalX11Screen'
and 'SalX11Screen')
        if( mpParent->m_nXScreen != m_nXScreen )
            ~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~
/wrkdirs/usr/ports/editors/libreoffice/work/libreoffice-6.3.4.2/vcl/inc/unx/saltype.h:22:10: note: candidate function
    bool operator!=(const SalX11Screen &rOther) { return rOther.mnXScreen != mnXScreen; }
         ^
/wrkdirs/usr/ports/editors/libreoffice/work/libreoffice-6.3.4.2/vcl/inc/unx/saltype.h:21:10: note: candidate function
Comment 1 Trond.Endrestol 2020-03-17 15:41:15 UTC
I think the declarations and definitions of the overloaded operators lack const before the open curly bracket.
Comment 2 Li-Wen Hsu freebsd_committer 2020-03-17 15:42:58 UTC
(In reply to Trond.Endrestol from comment #1)
Thanks for the analysis, do you think it is possible to have a patch for this?
Comment 3 Trond.Endrestol 2020-03-17 17:34:33 UTC
Created attachment 212463 [details]
Patch for vcl/inc/unx/saltype.h

It's just a hunch. I will try the patch myself as soon the current build queue is done on my laptop.
Comment 4 Trond.Endrestol 2020-03-17 18:40:59 UTC
(In reply to Trond.Endrestol from comment #3)
I've started a build of editors/libreoffice on base/head r359017, using ports-mgmt/synth. It's not done yet, but I'm well past compiling the problematic vcl/unx/generic/gdi/salgdi.cxx.
Comment 5 Trond.Endrestol 2020-03-17 18:45:00 UTC
(In reply to Trond.Endrestol from comment #4)
vcl/unx/generic/window/salframe.cxx passed with flying colours.
Comment 6 Li-Wen Hsu freebsd_committer 2020-03-17 18:46:26 UTC
(In reply to Trond.Endrestol from comment #5)

Thanks, upstream also has the same patch: https://github.com/LibreOffice/core/commit/437dc68285dab0f08a1ded2193d86d64f560cd9b

Please let me know if this is sufficient to fix all the compilation issues.
Comment 7 Trond.Endrestol 2020-03-17 19:55:01 UTC
Created attachment 212467 [details]
Patch for sd/source/ui/framework/factories/BasicPaneFactory.cxx

From https://github.com/LibreOffice/core/commit/0c3e90d95c2c952265625bcff590599627114ec1 and not a work of my own.
Comment 8 Trond.Endrestol 2020-03-17 20:27:21 UTC
Created attachment 212469 [details]
Patch for sd/inc/OutlinerIterator.hxx

From https://github.com/LibreOffice/core/commit/41147e20029c80c4941ca81bc5dca3782bef5d94?diff=unified
Comment 9 Trond.Endrestol 2020-03-17 20:28:17 UTC
Created attachment 212470 [details]
Patch for sd/source/ui/view/OutlinerIterator.cxx

From https://github.com/LibreOffice/core/commit/41147e20029c80c4941ca81bc5dca3782bef5d94?diff=unified
Comment 10 Trond.Endrestol 2020-03-17 21:30:48 UTC
Created attachment 212473 [details]
Patch for compilerplugins/clang/simplifybool.cxx

From https://github.com/LibreOffice/core/commit/54f292d1d199dae36257a1ceb0ff30f32a7e0824
I didn't bother about the documentation changes to compilerplugins/clang/test/simplifybool.cxx.
Comment 11 Trond.Endrestol 2020-03-17 21:32:23 UTC
Created attachment 212474 [details]
Patch for cui/source/tabpages/tpline.cxx

From https://github.com/LibreOffice/core/commit/54f292d1d199dae36257a1ceb0ff30f32a7e0824
Comment 12 Trond.Endrestol 2020-03-17 23:16:46 UTC
Created attachment 212479 [details]
Patch for sc/source/ui/view/viewfunc.cxx

Inspired by the if-expression a few lines above. Maybe this patch is wrong, but the compiler stopped complaning.
Comment 13 Trond.Endrestol 2020-03-18 00:00:24 UTC
Created attachment 212481 [details]
Patch for sc/source/core/opencl/formulagroupcl.cxx

An adaptation of https://github.com/LibreOffice/core/commit/7db6a64e40f172894e08ecec483f214f7f1d7e10#diff-e5629822afa8a035c2838f1c8d1eff77
Comment 14 Trond.Endrestol 2020-03-18 06:00:04 UTC
(In reply to Trond.Endrestol from comment #13)
That makes eight patches. The build succeeded. I installed the package, and LibreOffice seem to be functional. I opened a document and a spreadsheet, and I did some editing. No crash. Someone, please verify my claims.
Comment 15 Li-Wen Hsu freebsd_committer 2020-03-18 12:55:32 UTC
(In reply to Trond.Endrestol from comment #14)
Thanks, I'm testing them.
Comment 16 commit-hook freebsd_committer 2020-03-18 18:35:22 UTC
A commit references this bug:

Author: lwhsu
Date: Wed Mar 18 18:35:00 UTC 2020
New revision: 528660
URL: https://svnweb.freebsd.org/changeset/ports/528660

Log:
  Fix build with clang10

  PR:		244850
  Reported by:	cy
  Submitted by:	Trond.Endrestol@ximalas.info
  Obtained from:	https://github.com/LibreOffice/core (partially)

Changes:
  head/editors/libreoffice/Makefile
  head/editors/libreoffice/files/patch-clang10