Opened 5 years ago

Closed 22 months ago

#43214 closed defect (fixed)

codeblocks: call to 'wcsstr' is ambiguous / use of overloaded operator '==' is ambiguous (on 10.9 and later)

Reported by: mojca (Mojca Miklavec) Owned by: mojca (Mojca Miklavec)
Priority: Normal Milestone:
Component: ports Version:
Keywords: mavericks Cc: tsitelov (Dmitry Tsitelov), lucbouge (Luc Bougé)
Port: wxWidgets-3.0, codeblocks

Description

codeblocks +wxwidgets30 fails to compile on 10.9 (https://build.macports.org/builders/buildports-mavericks-x86_64/builds/2530)

In file included from dlgformattersettings.cpp:12:
In file included from /opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/include/wx-3.0/wx/radiobut.h:33:
In file included from /opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/include/wx-3.0/wx/control.h:22:
In file included from /opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/include/wx-3.0/wx/window.h:18:
In file included from /opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/include/wx-3.0/wx/event.h:16:
In file included from /opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/include/wx-3.0/wx/object.h:19:
In file included from /opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/include/wx-3.0/wx/memory.h:15:
In file included from /opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/include/wx-3.0/wx/string.h:4305:
In file included from /opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/include/wx-3.0/wx/crt.h:19:
/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/include/wx-3.0/wx/wxcrt.h:577:14: error: call to 'wcsstr' is ambiguous
    { return wxCRT_StrstrW(haystack, needle); }
             ^~~~~~~~~~~~~
/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/include/wx-3.0/wx/wxcrtbase.h:155:26: note: expanded from macro 'wxCRT_StrstrW'
#define wxCRT_StrstrW    wcsstr
                         ^~~~~~
/usr/include/wchar.h:141:10: note: candidate function
wchar_t *wcsstr(const wchar_t * __restrict, const wchar_t * __restrict);
         ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/cwchar:189:49: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY const wchar_t* wcsstr(const wchar_t* __s1, const wchar_t* __s2) {return ::wcsstr(__s1, __s2);}
                                                ^

Change History (8)

comment:1 Changed 5 years ago by mojca (Mojca Miklavec)

It works OK on 10.6, 10.7.

It would make sense to try building with a different compiler.

comment:2 Changed 5 years ago by mojca (Mojca Miklavec)

comment:3 Changed 5 years ago by mojca (Mojca Miklavec)

Keywords: mavericks added
Summary: codeblocks/wxWidgets-3.0: wxcrt.h: error: call to 'wcsstr' is ambiguouscodeblocks/wxWidgets-3.0: wxcrt.h: error: call to 'wcsstr' is ambiguous (on 10.9)

comment:4 Changed 4 years ago by mojca (Mojca Miklavec)

Developers responded with a link to https://forums.wxwidgets.org/viewtopic.php?f=19&t=38397 and some additional comments. I'll attempt another rebuild.

comment:5 Changed 4 years ago by mojca (Mojca Miklavec)

The latest version now fails with

In file included from debuggergdb.cpp:10:
In file included from ../../../src/include/sdk.h:17:
In file included from ../../../src/include/sdk_precomp.h:13:
In file included from ../../../src/include/sdk_common.h:43:
../../../src/include/prep.h:33:75: error: use of overloaded operator '==' is ambiguous (with operand types 'const std::__1::shared_ptr<GDBWatch>' and 'int')
        template<typename T> bool equals(T const& rhs) const { return rhs == 0; }
                                                                      ~~~ ^  ~

Reported upstream at https://sourceforge.net/p/codeblocks/tickets/322/

Last edited 3 years ago by mojca (Mojca Miklavec) (previous) (diff)

comment:6 Changed 3 years ago by tsitelov (Dmitry Tsitelov)

Cc: cit@… added

Cc Me!

comment:7 Changed 3 years ago by mojca (Mojca Miklavec)

Cc: luc.bouge@… added
Summary: codeblocks/wxWidgets-3.0: wxcrt.h: error: call to 'wcsstr' is ambiguous (on 10.9)codeblocks: call to 'wcsstr' is ambiguous / use of overloaded operator '==' is ambiguous (on 10.9 and later)

Reported again in #51233. These might be two different problems, but it doesn't make much sense to have two tickets opened as long as the build fails anyway on anything >l 10.9.

comment:8 Changed 22 months ago by mf2k (Frank Schima)

Resolution: fixed
Status: newclosed

In 788db542d18dbb325925b2428837ce0b4b985dee/macports-ports:

codeblocks: Fix building up to Sierra

  • Update to svn revision 11098.
  • Remove no longer needed patch files.

Fixes: #40390
Fixes: #43214
Fixes: #54390

Note: See TracTickets for help on using tickets.