../../../../src/3rdparty/clucene/src/CLucene/search/FieldCacheImpl.cpp:427:11: error: call to 'wcschr' is ambiguous if ( _tcschr(_T("0123456789 +-"),termtext[i]) == NULL ){ ^~~~~~~ ../../../../src/3rdparty/clucene/src/CLucene/config/repl_tchar.h:36:21: note: expanded from macro '_tcschr' #define _tcschr wcschr //find location of one character ^~~~~~ /usr/include/wchar.h:135:10: note: candidate function wchar_t *wcschr(const wchar_t *, wchar_t) __pure; ^ /usr/include/c++/v1/cwchar:165:49: note: candidate function inline _LIBCPP_INLINE_VISIBILITY const wchar_t* wcschr(const wchar_t* __s, wchar_t __c) {return ::wcschr(__s, __c);} ^ /usr/include/c++/v1/cwchar:166:49: note: candidate function inline _LIBCPP_INLINE_VISIBILITY wchar_t* wcschr( wchar_t* __s, wchar_t __c) {return ::wcschr(__s, __c);} ^ ../../../../src/3rdparty/clucene/src/CLucene/search/FieldCacheImpl.cpp:441:12: error: call to 'wcschr' is ambiguous if ( _tcschr(_T("0123456789 Ee.+-"),termtext[i]) == NULL ){ ^~~~~~~ ../../../../src/3rdparty/clucene/src/CLucene/config/repl_tchar.h:36:21: note: expanded from macro '_tcschr' #define _tcschr wcschr //find location of one character ^~~~~~ /usr/include/wchar.h:135:10: note: candidate function wchar_t *wcschr(const wchar_t *, wchar_t) __pure; ^ /usr/include/c++/v1/cwchar:165:49: note: candidate function inline _LIBCPP_INLINE_VISIBILITY const wchar_t* wcschr(const wchar_t* __s, wchar_t __c) {return ::wcschr(__s, __c);} ^ /usr/include/c++/v1/cwchar:166:49: note: candidate function inline _LIBCPP_INLINE_VISIBILITY wchar_t* wcschr( wchar_t* __s, wchar_t __c) {return ::wcschr(__s, __c);} ^ 2 errors generated.>How-To-Repeat:
Responsible Changed From-To: freebsd-ports-bugs->kde Over to maintainer (via the GNATS Auto Assign Tool)
The CLucene copy in Qt is old and unmaintained, from what I can see, so I guess it doesn't make much sense to try to upstream a fix for this issue. On the other hand, I'm planning on talking to theraven@ if this behavior is really expected in libc++, as simply #includ'ing <cwchar> and adding `using namespace std' is enough to cause this amibiguity in the compilation.
Raphael Kubo da Costa <rakuco@FreeBSD.org> writes: > On the other hand, I'm planning on talking to theraven@ if this > behavior is really expected in libc++, as simply #includ'ing <cwchar> > and adding `using namespace std' is enough to cause this amibiguity > in the compilation. Right, I've talked to David, he talked to someone else and the conclusion is that the C++ standard is borked in this regard :-) Since there's no way to fix it either in libstdc++ or libc++, I'll apply your patch to work around the issue at the port level. Thanks!
Author: rakuco Date: Thu Jul 19 17:39:10 2012 New Revision: 301174 URL: http://svn.freebsd.org/changeset/ports/301174 Log: Apply patch to make the port build with libc++. libc++'s cwchar header introduces an ambiguity with clang that makes a few different versions of wcschr() be found. Talking to theraven@ it looks like a problem in the C++ standard itself, so there is not much more to do other than working around the issue with this patch. Since the clucene copy in Qt is old and has no maintainer, there is not much value in committing this upstream, even though it may be worth a try in the future. No PORTREVISION bump, as users of libstdc++ are not affected, and no dependencies have been changed. PR: ports/169872 Submitted by: Jan Beich <jbeich@tormail.org> Added: head/textproc/qt4-clucene/files/ head/textproc/qt4-clucene/files/patch-src__3rdparty__clucene__src__CLucene__search__FieldCacheImpl.cpp (contents, props changed) Added: head/textproc/qt4-clucene/files/patch-src__3rdparty__clucene__src__CLucene__search__FieldCacheImpl.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/textproc/qt4-clucene/files/patch-src__3rdparty__clucene__src__CLucene__search__FieldCacheImpl.cpp Thu Jul 19 17:39:10 2012 (r301174) @@ -0,0 +1,11 @@ +--- src/3rdparty/clucene/src/CLucene/search/FieldCacheImpl.cpp~ ++++ src/3rdparty/clucene/src/CLucene/search/FieldCacheImpl.cpp +@@ -11,6 +11,8 @@ CL_NS_USE(util) + CL_NS_USE(index) + CL_NS_DEF(search) + ++using ::wcschr; ++ + FieldCacheImpl::FieldCacheImpl(): + cache(false,true){ + } _______________________________________________ svn-ports-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-ports-all To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
State Changed From-To: open->closed Committed. Thanks!