Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Jul 2012 12:23:10 +0500
From:      Jan Beich <jbeich@tormail.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/169868: [patch] devel/icu: unbreak with libc++
Message-ID:  <1Spx12-000HmN-6F@internal.tormail.org>
Resent-Message-ID: <201207150340.q6F3e26Z015837@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         169868
>Category:       ports
>Synopsis:       [patch] devel/icu: unbreak with libc++
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jul 15 03:40:02 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Jan Beich
>Release:        FreeBSD 10.0-CURRENT amd64
>Organization:
>Environment:
WITH_LIBCPLUSPLUS= # see src.conf(5)
CXX = clang++
CXXFLAGS += -stdlib=libc++
LDFLAGS += -stdlib=libc++
>Description:
In file included from alphaindex.cpp:35:
In file included from /usr/include/c++/v1/iostream:38:
In file included from /usr/include/c++/v1/ios:216:
In file included from /usr/include/c++/v1/__locale:15:
In file included from /usr/include/c++/v1/string:433:
/usr/include/c++/v1/cwchar:153:9: error: no member named 'wcstoll' in the global
      namespace
using ::wcstoll;
      ~~^
/usr/include/c++/v1/cwchar:155:9: error: no member named 'wcstoull' in the global
      namespace
using ::wcstoull;
      ~~^
In file included from alphaindex.cpp:35:
In file included from /usr/include/c++/v1/iostream:38:
In file included from /usr/include/c++/v1/ios:216:
In file included from /usr/include/c++/v1/__locale:15:
In file included from /usr/include/c++/v1/string:434:
In file included from /usr/include/c++/v1/algorithm:596:
/usr/include/c++/v1/cstdlib:96:9: error: no member named 'lldiv_t' in the global
      namespace
using ::lldiv_t;
      ~~^
/usr/include/c++/v1/cstdlib:100:9: error: no member named 'atoll' in the global
      namespace
using ::atoll;
      ~~^
/usr/include/c++/v1/cstdlib:105:9: error: no member named 'strtoll' in the global
      namespace
using ::strtoll;
      ~~^
/usr/include/c++/v1/cstdlib:107:9: error: no member named 'strtoull' in the global
      namespace
using ::strtoull;
      ~~^
/usr/include/c++/v1/cstdlib:124:9: error: no member named 'llabs' in the global
      namespace
using ::llabs;
      ~~^
/usr/include/c++/v1/cstdlib:127:9: error: no member named 'lldiv' in the global
      namespace
using ::lldiv;
      ~~^
/usr/include/c++/v1/cstdlib:141:71: error: use of undeclared identifier 'llabs'; did
      you mean 'labs'?
inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) {return llabs(__x);}
                                                                      ^
/usr/include/stdlib.h:95:7: note: 'labs' declared here
long     labs(long) __pure2;
         ^
In file included from alphaindex.cpp:35:
In file included from /usr/include/c++/v1/iostream:38:
In file included from /usr/include/c++/v1/ios:216:
In file included from /usr/include/c++/v1/__locale:15:
In file included from /usr/include/c++/v1/string:434:
In file included from /usr/include/c++/v1/algorithm:596:
/usr/include/c++/v1/cstdlib:144:34: error: unknown type name 'lldiv_t'; did you mean
      'ldiv_t'?
inline _LIBCPP_INLINE_VISIBILITY lldiv_t div(long long __x, long long __y)...
                                 ^
/usr/include/stdlib.h:67:3: note: 'ldiv_t' declared here
} ldiv_t;
  ^
In file included from alphaindex.cpp:35:
In file included from /usr/include/c++/v1/iostream:38:
In file included from /usr/include/c++/v1/ios:216:
In file included from /usr/include/c++/v1/__locale:15:
In file included from /usr/include/c++/v1/string:434:
In file included from /usr/include/c++/v1/algorithm:596:
/usr/include/c++/v1/cstdlib:144:84: error: use of undeclared identifier 'lldiv'; did
      you mean 'ldiv'?
  ...lldiv_t div(long long __x, long long __y) {return lldiv(__x, __y);}
                                                       ^
/usr/include/stdlib.h:96:9: note: 'ldiv' declared here
ldiv_t   ldiv(long, long) __pure2;
         ^
11 errors generated.
>How-To-Repeat:
>Fix:
--- libcplusplus.diff begins here ---
Index: devel/icu/Makefile
===================================================================
RCS file: /a/.csup/ports/devel/icu/Makefile,v
retrieving revision 1.49
diff -u -p -r1.49 Makefile
--- devel/icu/Makefile	23 Dec 2011 14:54:18 -0000	1.49
+++ devel/icu/Makefile	14 Jul 2012 07:15:42 -0000
@@ -72,6 +72,8 @@ CONFIGURE_ARGS+=	--enable-weak-threads
 .endif
 
 post-patch:
+	@${REINPLACE_CMD} -e '/CXXFLAGS=/s/-ansi//' \
+		${WRKSRC}/configure
 .if defined(WITHOUT_THREADS)
 	@${REINPLACE_CMD} -e 's,\(THREADSC.*FLAGS\).*,\1=${PTHREAD_CFLAGS},g' ${WRKSRC}/config/mh-bsd-gcc
 .endif
--- libcplusplus.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1Spx12-000HmN-6F>