ports/163443: [patch] graphics/poppler: unbreak with libc++
Jan Beich
jbeich at tormail.net
Mon Dec 19 04:50:10 UTC 2011
>Number: 163443
>Category: ports
>Synopsis: [patch] graphics/poppler: 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: Mon Dec 19 04:50:09 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Jan Beich
>Release: FreeBSD 10.0-CURRENT amd64
>Organization:
>Environment:
WITH_LIBCPLUSPLUS=
CXX = clang++
CXXFLAGS += -stdlib=libc++
>Description:
>How-To-Repeat:
$ make
[...]
CXX gstrtod.lo
clang++: warning: argument unused during compilation: '-fno-check-new'
In file included from gstrtod.cc:27:
/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:136:71: error: use of undeclared identifier 'llabs'; did you mean 'labs'?
inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) {return llabs(__x);}
^~~~~
labs
/usr/include/stdlib.h:92:7: note: 'labs' declared here
long labs(long) __pure2;
^
In file included from gstrtod.cc:27:
/usr/include/c++/v1/cstdlib:139: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) {return lldiv(__x, __y);}
^~~~~~~
ldiv_t
/usr/include/stdlib.h:67:3: note: 'ldiv_t' declared here
} ldiv_t;
^
In file included from gstrtod.cc:27:
/usr/include/c++/v1/cstdlib:139:84: error: use of undeclared identifier 'lldiv'; did you mean 'ldiv'?
inline _LIBCPP_INLINE_VISIBILITY lldiv_t div(long long __x, long long __y) {return lldiv(__x, __y);}
^~~~~
ldiv
/usr/include/stdlib.h:93:9: note: 'ldiv' declared here
ldiv_t ldiv(long, long) __pure2;
^
9 errors generated.
gmake[2]: *** [gstrtod.lo] Error 1
gmake[2]: Leaving directory `/usr/ports/graphics/poppler/work/poppler-0.18.0/goo'
gmake[1]: *** [all-recursive] Error 1
>Fix:
--- libc++.diff begins here ---
Index: graphics/poppler/Makefile
===================================================================
RCS file: /a/.csup/ports/graphics/poppler/Makefile,v
retrieving revision 1.64
diff -u -p -r1.64 Makefile
--- graphics/poppler/Makefile 31 Oct 2011 09:53:17 -0000 1.64
+++ graphics/poppler/Makefile 19 Dec 2011 03:40:51 -0000
@@ -102,6 +102,9 @@ LIB_DEPENDS+= openjpeg.2:${PORTSDIR}/gra
.endif
post-patch:
+.if ${CXX:M*clang*} && ${CXXFLAGS:M-stdlib=libc++}
+ @${REINPLACE_CMD} '/CXXFLAGS.*-ansi/d' ${WRKSRC}/configure
+.endif
.if defined(SLAVEPORT) && ${SLAVEPORT}=="qt4"
@${REINPLACE_CMD} -e 's|MOCQT4=`.*|MOCQT4="${LOCALBASE}/bin/moc-qt4"|' \
${WRKSRC}/configure
--- libc++.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list