Bug 184138 - [patch] graphics/dia: fix build at 10.x (error: /usr/bin/ld: cannot find -lstdc++)
Summary: [patch] graphics/dia: fix build at 10.x (error: /usr/bin/ld: cannot find -lst...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-gnome (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-21 09:10 UTC by Boris Samorodov
Modified: 2013-12-07 09:20 UTC (History)
0 users

See Also:


Attachments
file.diff (670 bytes, patch)
2013-11-21 09:10 UTC, Boris Samorodov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Boris Samorodov freebsd_committer freebsd_triage 2013-11-21 09:10:00 UTC
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

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

Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-11-21 09:10:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->gnome

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2013-12-07 09:12:11 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"
Comment 3 Boris Samorodov freebsd_committer freebsd_triage 2013-12-07 09:13:38 UTC
State Changed
From-To: open->closed

Committed, thanks! ;-)