From nobody@FreeBSD.org  Thu Nov 21 09:05:44 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id 6478281A
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 21 Nov 2013 09:05:44 +0000 (UTC)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 3B7F322F6
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 21 Nov 2013 09:05:44 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id rAL95i8U065617
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 21 Nov 2013 09:05:44 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id rAL95hbM065468;
	Thu, 21 Nov 2013 09:05:43 GMT
	(envelope-from nobody)
Message-Id: <201311210905.rAL95hbM065468@oldred.freebsd.org>
Date: Thu, 21 Nov 2013 09:05:43 GMT
From: Boris Samorodov <bsam@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] graphics/dia: fix build at 10.x (error: /usr/bin/ld: cannot find -lstdc++)
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         184138
>Category:       ports
>Synopsis:       [patch] graphics/dia: fix build at 10.x (error: /usr/bin/ld: cannot find -lstdc++)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnome
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Nov 21 09:10:00 UTC 2013
>Closed-Date:    Sat Dec 07 09:13:38 UTC 2013
>Last-Modified:  Sat Dec  7 09:20:00 UTC 2013
>Originator:     Boris Samorodov
>Release:        FreeBSD 10-amd64
>Organization:
BSDprint
>Environment:
FreeBSD srv.bb.tel.ru 10.0-CURRENT FreeBSD 10.0-CURRENT #8 r254955: Tue Aug 27 20:04:38 SAMT 2013     bsam@srv.bb.tel.ru:/usr/obj/usr/src/sys/BB64X  amd64
>Description:
The port does not build at 10.x and 11.x, error log:
-----
/bin/sh ../../libtool --tag=CXX   --mode=link c++  -O2 -pipe -fno-strict-aliasing -export-dynamic -module -avoid-version  -L/usr/local/lib -o libwmf_filter.la -rpath /usr/local/lib/dia wmf.lo  -lEMF -lstdc++ -lpng -lz -lm -lz
libtool: link: c++ -shared -nostdlib /usr/lib/crti.o /usr/lib/crtbeginS.o  .libs/wmf.o   -Wl,-rpath -Wl,/usr/local/lib -Wl,-rpath -Wl,/usr/local/lib -L/usr/local/lib /usr/local/lib/libEMF.so -lstdc++ -lpng -lz -L/usr/lib -lc++ -lm -lc -lgcc -lgcc_s /usr/lib/crtendS.o /usr/lib/crtn.o    -Wl,-soname -Wl,libwmf_filter.so -o .libs/libwmf_filter.so
/usr/bin/ld: cannot find -lstdc++
c++: error: linker command failed with exit code 1 (use -v to see invocation)
-----

Full log is at pkg-fallout@ ML:
http://lists.freebsd.org/pipermail/freebsd-pkg-fallout/Week-of-Mon-20131118/057152.html
>How-To-Repeat:

>Fix:
Remove from configure script explicit link with libstdc++.

Patch attached with submission follows:

Index: Makefile
===================================================================
--- Makefile	(revision 331865)
+++ Makefile	(working copy)
@@ -72,7 +72,7 @@
 		's,\(^GTK_LIBS.*\),\1 ${PTHREAD_LIBS}, ; \
 		 s,\(^GTK_CFLAGS = \),\1 ${PTHREAD_CFLAGS} ,'
 	@${REINPLACE_CMD} -e 's|http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl|${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl| ; \
-		s|echo aout|echo elf|g ; s|/usr/include/libEMF|${LOCALBASE}/include/libEMF|g' \
-		${WRKSRC}/configure
+		s|echo aout|echo elf|g ; s|/usr/include/libEMF|${LOCALBASE}/include/libEMF|g ; \
+		s|-lstdc++||g'  ${WRKSRC}/configure
 
 .include <bsd.port.post.mk>


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->gnome 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Thu Nov 21 09:10:08 UTC 2013 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=184138 
State-Changed-From-To: open->closed 
State-Changed-By: bsam 
State-Changed-When: Sat Dec 7 09:13:38 UTC 2013 
State-Changed-Why:  
Committed, thanks! ;-) 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/184138: commit references a PR
Date: Sat,  7 Dec 2013 09:12:11 +0000 (UTC)

 Author: bsam
 Date: Sat Dec  7 09:11:54 2013
 New Revision: 335818
 URL: http://svnweb.freebsd.org/changeset/ports/335818
 
 Log:
   Fix build at 10.x and up (hardcoded -lstdc++):
   -----
   libtool: link: c++ -shared -nostdlib /usr/lib/crti.o /usr/lib/crtbeginS.o  .libs/wmf.o   -Wl,-rpath -Wl,/usr/local/lib -Wl,-rpath -Wl,/usr/local/lib -L/usr/local/lib /usr/local/lib/libEMF.so -lstdc++ -lpng -lz -L/usr/lib -lc++ -lm -lc -lgcc -lgcc_s /usr/lib/crtendS.o /usr/lib/crtn.o    -Wl,-soname -Wl,libwmf_filter.so -o .libs/libwmf_filter.so
   /usr/bin/ld: cannot find -lstdc++
   -----
   
   PR:		ports/184138
   Submitted by:	bsam (me)
   Approved by:	gnome (maintainer timeout, 2 weeks)
 
 Modified:
   head/graphics/dia/Makefile
 
 Modified: head/graphics/dia/Makefile
 ==============================================================================
 --- head/graphics/dia/Makefile	Sat Dec  7 09:07:40 2013	(r335817)
 +++ head/graphics/dia/Makefile	Sat Dec  7 09:11:54 2013	(r335818)
 @@ -72,7 +72,7 @@ post-patch:
  		's,\(^GTK_LIBS.*\),\1 ${PTHREAD_LIBS}, ; \
  		 s,\(^GTK_CFLAGS = \),\1 ${PTHREAD_CFLAGS} ,'
  	@${REINPLACE_CMD} -e 's|http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl|${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl| ; \
 -		s|echo aout|echo elf|g ; s|/usr/include/libEMF|${LOCALBASE}/include/libEMF|g' \
 -		${WRKSRC}/configure
 +		s|echo aout|echo elf|g ; s|/usr/include/libEMF|${LOCALBASE}/include/libEMF|g ; \
 +		s|-lstdc++||g'  ${WRKSRC}/configure
  
  .include <bsd.port.post.mk>
 _______________________________________________
 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"
 
>Unformatted:
