Skip Menu |

This queue is for tickets about the Wx-Scintilla CPAN distribution.

Report information
The Basics
Id: 112742
Status: open
Priority: 0/
Queue: Wx-Scintilla

People
Owner: Nobody in particular
Requestors: gregoa [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



From: gregoa [...] cpan.org
Subject: libwx-scintilla-perl: FTBFS with GCC 6: call overloaded is ambiguous
We have the following bug reported to the Debian package of Wx-Scintilla (https://bugs.debian.org/816571): It doesn't seem to be a bug in the packaging, so you may want to take a look. Thanks! Please note that https://gcc.gnu.org/gcc-6/porting_to.html has a section on "Call of overloaded 'abs(unsigned int&)' is ambiguous". ------8<-----------8<-----------8<-----------8<-----------8<----- Package: libwx-scintilla-perl Version: 0.39-2 Severity: normal User: debian-gcc@lists.debian.org Usertags: ftbfs-gcc-6 gcc-6-overloaded-ambiguous This package fails to build with GCC 6. GCC 6 has not been released yet, but it's expected that GCC 6 will become the default compiler for stretch. You can find a snapshot of GCC 6 in experimental. To build with GCC 6, you can set CC=gcc-6 CXX=g++-6 explicitly. You may be able to find out more about this issue at https://gcc.gnu.org/gcc-6/changes.html Show quoted text
> sbuild (Debian sbuild) 0.68.0 (15 Jan 2016) on dl580gen9-02.hlinux
... Show quoted text
> g++ -c -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -pthread -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -DWXBUILDING -DSCI_LEXER -DLINK_LEXERS -DWXUSINGDLL -DWXMAKINGDLL_STC -D__WX__ -c -fPIC -o wx-scintilla/src/scintilla/src/scintilladll_Editor.o -O2 -Wall -Wno-missing-braces -Wno-char-subscripts -MTwx-scintilla/src/scintilla/src/scintilladll_Editor.o -MFwx-scintilla/src/scintilla/src/scintilladll_Editor.o.d -MD -MP -Iwx-scintilla/include -Iwx-scintilla/src/scintilla/include -Iwx-scintilla/src/scintilla/src -Iwx-scintilla/src -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0 -I/usr/include/wx-3.0 wx-scintilla/src/scintilla/src/Editor.cxx > wx-scintilla/src/scintilla/src/Editor.cxx: In member function 'long int Editor::FindText(uptr_t, sptr_t)': > wx-scintilla/src/scintilla/src/Editor.cxx:5748:7: warning: 'template<class> class std::auto_ptr' is deprecated [-Wdeprecated-declarations] > std::auto_ptr<CaseFolder> pcf(CaseFolderForEncoding()); > ^~~~~~~~ > In file included from /usr/include/c++/6/memory:81:0, > from wx-scintilla/src/scintilla/src/Editor.cxx:18: > /usr/include/c++/6/bits/unique_ptr.h:49:28: note: declared here > template<typename> class auto_ptr; > ^~~~~~~~ > wx-scintilla/src/scintilla/src/Editor.cxx: In member function 'long int Editor::SearchText(unsigned int, uptr_t, sptr_t)': > wx-scintilla/src/scintilla/src/Editor.cxx:5793:7: warning: 'template<class> class std::auto_ptr' is deprecated [-Wdeprecated-declarations] > std::auto_ptr<CaseFolder> pcf(CaseFolderForEncoding()); > ^~~~~~~~ > In file included from /usr/include/c++/6/memory:81:0, > from wx-scintilla/src/scintilla/src/Editor.cxx:18: > /usr/include/c++/6/bits/unique_ptr.h:49:28: note: declared here > template<typename> class auto_ptr; > ^~~~~~~~ > wx-scintilla/src/scintilla/src/Editor.cxx: In member function 'long int Editor::SearchInTarget(const char*, int)': > wx-scintilla/src/scintilla/src/Editor.cxx:5844:7: warning: 'template<class> class std::auto_ptr' is deprecated [-Wdeprecated-declarations] > std::auto_ptr<CaseFolder> pcf(CaseFolderForEncoding()); > ^~~~~~~~ > In file included from /usr/include/c++/6/memory:81:0, > from wx-scintilla/src/scintilla/src/Editor.cxx:18: > /usr/include/c++/6/bits/unique_ptr.h:49:28: note: declared here > template<typename> class auto_ptr; > ^~~~~~~~ > wx-scintilla/src/scintilla/src/Editor.cxx: In function 'bool Close(Point, Point)': > wx-scintilla/src/scintilla/src/Editor.cxx:5871:23: error: call of overloaded 'abs(XYPOSITION)' is ambiguous > if (abs(pt1.x - pt2.x) > 3) > ^ > In file included from /usr/include/c++/6/cstdlib:75:0, > from /usr/include/c++/6/stdlib.h:36, > from wx-scintilla/src/scintilla/src/Editor.cxx:8: > /usr/include/stdlib.h:774:12: note: candidate: int abs(int) > extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur; > ^~~ > In file included from /usr/include/c++/6/stdlib.h:36:0, > from wx-scintilla/src/scintilla/src/Editor.cxx:8: > /usr/include/c++/6/cstdlib:185:3: note: candidate: __int128 std::abs(__int128) > abs(__GLIBCXX_TYPE_INT_N_0 __x) { return __x >= 0 ? __x : -__x; } > ^~~ > /usr/include/c++/6/cstdlib:180:3: note: candidate: long long int std::abs(long long int) > abs(long long __x) { return __builtin_llabs (__x); } > ^~~ > /usr/include/c++/6/cstdlib:172:3: note: candidate: long int std::abs(long int) > abs(long __i) { return __builtin_labs(__i); } > ^~~ > wx-scintilla/src/scintilla/src/Editor.cxx:5873:23: error: call of overloaded 'abs(XYPOSITION)' is ambiguous > if (abs(pt1.y - pt2.y) > 3)
-- Martin Michlmayr Linux for HPE Helion, Hewlett Packard Enterprise ------8<-----------8<-----------8<-----------8<-----------8<----- Thanks for considering, gregor herrmann, Debian Perl Group
There is a patch in upstream wxWidgets git: https://github.com/wxWidgets/wxWidgets/commit/73e9e18ea09ffffcaac50237def0d9728a213c02 I'm attaching it (with cleanup line endinging, offsets, filenames). Cheers, gregor
Subject: Fix_STC_compilation_with_GCC6.patch
From 73e9e18ea09ffffcaac50237def0d9728a213c02 Mon Sep 17 00:00:00 2001 From: Scott Talbert <swt@techie.net> Date: Sat, 20 Feb 2016 00:08:14 -0500 Subject: [PATCH] Fix STC compilation with GCC6 Use std::abs() from <cmath> instead of abs() from <math.h> to avoid problems with ambiguous overloads. Closes #17147. Closes https://github.com/wxWidgets/wxWidgets/pull/222 Bug-Debian: https://bugs.debian.org/816571 Bug: https://rt.cpan.org/Public/Bug/Display.html?id=112742 --- src/stc/scintilla/src/Editor.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- a/wx-scintilla/src/scintilla/src/Editor.cxx +++ b/wx-scintilla/src/scintilla/src/Editor.cxx @@ -11,6 +11,7 @@ #include <ctype.h> #include <assert.h> +#include <cmath> #include <string> #include <vector> #include <map> @@ -5868,9 +5869,9 @@ } static bool Close(Point pt1, Point pt2) { - if (abs(pt1.x - pt2.x) > 3) + if (std::abs(pt1.x - pt2.x) > 3) return false; - if (abs(pt1.y - pt2.y) > 3) + if (std::abs(pt1.y - pt2.y) > 3) return false; return true; }
在 2016-六月-30 10:31:43 星期四 時,GREGOA 寫到: Show quoted text
> There is a patch in upstream wxWidgets git: > > https://github.com/wxWidgets/wxWidgets/commit/73e9e18ea09ffffcaac50237def0d9728a213c02 > > I'm attaching it (with cleanup line endinging, offsets, filenames). > > Cheers, > gregor
this bug remains. wx-scintilla/src/scintilla/src/Editor.cxx:5871:23: 錯誤:呼叫多載的 「abs(XYPOSITION)」 有歧義 if (abs(pt1.x - pt2.x) > 3) ^ In file included from /usr/include/c++/6.3.1/cstdlib:75:0, from /usr/include/c++/6.3.1/stdlib.h:36, from wx-scintilla/src/scintilla/src/Editor.cxx:8: /usr/include/stdlib.h:735:12: 附註:candidate: int abs(int) extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur; ^~~ In file included from /usr/include/c++/6.3.1/stdlib.h:36:0, from wx-scintilla/src/scintilla/src/Editor.cxx:8: /usr/include/c++/6.3.1/cstdlib:185:3: 附註:candidate: __int128 std::abs(__int128) abs(__GLIBCXX_TYPE_INT_N_0 __x) { return __x >= 0 ? __x : -__x; } ^~~ /usr/include/c++/6.3.1/cstdlib:180:3: 附註:candidate: long long int std::abs(long long int) abs(long long __x) { return __builtin_llabs (__x); } ^~~ /usr/include/c++/6.3.1/cstdlib:172:3: 附註:candidate: long int std::abs(long int) abs(long __i) { return __builtin_labs(__i); } ^~~