From jbeich@tormail.net  Mon Dec 19 04:40:07 2011
Return-Path: <jbeich@tormail.net>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id ED07C106566C
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 19 Dec 2011 04:40:06 +0000 (UTC)
	(envelope-from jbeich@tormail.net)
Received: from server2.hudsonvalleyhost.com (server2.hudsonvalleyhost.com [66.7.195.77])
	by mx1.freebsd.org (Postfix) with ESMTP id A03E58FC08
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 19 Dec 2011 04:40:06 +0000 (UTC)
Received: from tor.cinipac.net ([79.172.193.89]:43869 helo=internal.tormail.net)
	by server2.hudsonvalleyhost.com with esmtpsa (TLSv1:RC4-SHA:128)
	(Exim 4.69)
	(envelope-from <jbeich@tormail.net>)
	id 1RcV1B-0004N6-Uj
	for FreeBSD-gnats-submit@freebsd.org; Sun, 18 Dec 2011 23:40:06 -0500
Received: from jbeich by internal.tormail.net with local (Exim 4.63)
	(envelope-from <jbeich@tormail.net>)
	id 1RcV0a-000FqC-NF
	for FreeBSD-gnats-submit@freebsd.org; Mon, 19 Dec 2011 04:39:33 +0000
Message-Id: <1RcV0a-000FqC-NF@internal.tormail.net>
Date: Mon, 19 Dec 2011 03:05:53 -0100
From: Jan Beich <jbeich@tormail.net>
To: FreeBSD-gnats-submit@freebsd.org
Subject: [patch] graphics/poppler: unbreak with libc++

>Number:         163443
>Category:       ports
>Synopsis:       [patch] graphics/poppler: unbreak with libc++
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnome
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 19 04:50:09 UTC 2011
>Closed-Date:    Wed Mar 14 15:28:18 UTC 2012
>Last-Modified:  Wed Mar 14 15:30:11 UTC 2012
>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:
Responsible-Changed-From-To: freebsd-ports-bugs->gnome 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Mon Dec 19 04:50:19 UTC 2011 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=163443 
State-Changed-From-To: open->closed 
State-Changed-By: mezz 
State-Changed-When: Wed Mar 14 15:28:00 UTC 2012 
State-Changed-Why:  
Committed, thanks! 


http://www.freebsd.org/cgi/query-pr.cgi?pr=163443 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/163443: commit references a PR
Date: Wed, 14 Mar 2012 15:27:57 +0000 (UTC)

 mezz        2012-03-14 15:27:44 UTC
 
   FreeBSD ports repository
 
   Modified files:
     graphics/poppler     Makefile 
   Log:
   Fix the build with clang.
   
   PR:             ports/163443
   Submitted by:   Jan Beich <jbeich@tormail.net>
   Feature safe:   yes
   
   Revision  Changes    Path
   1.67      +3 -0      ports/graphics/poppler/Makefile
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
