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
I think the declarations and definitions of the overloaded operators lack const before the open curly bracket.
(In reply to Trond.Endrestol from comment #1) Thanks for the analysis, do you think it is possible to have a patch for this?
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.
(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.
(In reply to Trond.Endrestol from comment #4) vcl/unx/generic/window/salframe.cxx passed with flying colours.
(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.
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.
Created attachment 212469 [details] Patch for sd/inc/OutlinerIterator.hxx From https://github.com/LibreOffice/core/commit/41147e20029c80c4941ca81bc5dca3782bef5d94?diff=unified
Created attachment 212470 [details] Patch for sd/source/ui/view/OutlinerIterator.cxx From https://github.com/LibreOffice/core/commit/41147e20029c80c4941ca81bc5dca3782bef5d94?diff=unified
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.
Created attachment 212474 [details] Patch for cui/source/tabpages/tpline.cxx From https://github.com/LibreOffice/core/commit/54f292d1d199dae36257a1ceb0ff30f32a7e0824
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.
Created attachment 212481 [details] Patch for sc/source/core/opencl/formulagroupcl.cxx An adaptation of https://github.com/LibreOffice/core/commit/7db6a64e40f172894e08ecec483f214f7f1d7e10#diff-e5629822afa8a035c2838f1c8d1eff77
(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.
(In reply to Trond.Endrestol from comment #14) Thanks, I'm testing them.
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