Bug 184565 - cad/meshlab : fix build with GCC 4.7, unbreak
Summary: cad/meshlab : fix build with GCC 4.7, unbreak
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: Pietro Cerutti
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-07 16:50 UTC by Christoph Moench-Tegeder
Modified: 2014-01-07 23:30 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Moench-Tegeder freebsd_committer freebsd_triage 2013-12-07 16:50:00 UTC
Hi,

in an effort towards upgrading lang/gcc to gcc 4.7, I'm helping gerald@
in making ports gcc47-safe.
Please consider the following patch to your port. If you approve of the
patch, gerald@ has offered his help in commiting it.
If you're commiting yourself or have someone else commit this (or
another patch to the same effect), can you please add an additional
reference to ports/183342 in the commit message?
In my test environment, the port built successfully with lang/gcc47.

Fix: This patch removes some unused template functions (gcc47 does not like
that) and removes patch-vcglib-vcg-space_deprecated_point.h which
broke the build.


# remove blocks of dead code from colorhistogram.h and trimesh.h
#   gcc47 gets confused on template functions which are never instantiated
# remove patch-vcglib-vcg-space_deprecated_point.h, it broke the calls to
#  static_assert() (which are re-defined assert()s)
$ svn status
A       files/patch-meshlabplugins-decorate_base-colorhistogram.h
D       files/patch-vcglib-vcg-space_deprecated_point.h
A       files/patch-vcglib-wrap-gl-trimesh.h



Regards,
Christoph--AaQdnnh5xf6ZMosGNZvrkJ5MxnFhR16V88ypGxJcieh457xi
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

Index: files/patch-meshlabplugins-decorate_base-colorhistogram.h
===================================================================
--- files/patch-meshlabplugins-decorate_base-colorhistogram.h	(revision 0)
+++ files/patch-meshlabplugins-decorate_base-colorhistogram.h	(working copy)
@@ -0,0 +1,15 @@
+--- ../../meshlab/src/meshlabplugins/decorate_base/colorhistogram.h.orig	2013-11-16 22:04:41.000000000 +0100
++++ ../../meshlab/src/meshlabplugins/decorate_base/colorhistogram.h	2013-11-16 22:04:56.000000000 +0100
+@@ -39,10 +39,11 @@
+   //ScalarType BinWidth(ScalarType v);
+ 
+   //! Reset histogram data.
++  /* dead code
+   void Clear() {
+     this->::Clear();
+     CV.clear();
+-  }
++  } */
+   /*
+   Note that the histogram holds <n> valid bins plus two semi-infinite bins.
+ 
Index: files/patch-vcglib-vcg-space_deprecated_point.h
===================================================================
--- files/patch-vcglib-vcg-space_deprecated_point.h	(revision 334032)
+++ files/patch-vcglib-vcg-space_deprecated_point.h	(working copy)
@@ -1,19 +0,0 @@
---- ../../vcglib/vcg/space/deprecated_point.h.orig	2013-10-30 18:12:59.000000000 +0100
-+++ ../../vcglib/vcg/space/deprecated_point.h	2013-10-30 18:12:33.000000000 +0100
-@@ -164,14 +164,14 @@
- 	}
-   inline const S &X() const { return _v[0]; }
- 	inline const S &Y() const { return _v[1]; }
--	inline const S &Z() const { static_assert(N>2); return _v[2]; }
-+	inline const S &Z() const { static_assert(N>2, ""); return _v[2]; }
- 	 /// W is in any case the last coordinate.
- 	 /// (in a 2D point, W() == Y(). In a 3D point, W()==Z()
- 	 ///  in a 4D point, W() is a separate component)
- 	inline const S &W() const { return _v[N-1]; }
- 	inline S &X() { return _v[0]; }
- 	inline S &Y() { return _v[1]; }
--	inline S &Z() { static_assert(N>2); return _v[2]; }
-+	inline S &Z() { static_assert(N>2, ""); return _v[2]; }
- 	inline S &W() { return _v[N-1]; }
- 	inline const S * V() const
- 	{
Index: files/patch-vcglib-wrap-gl-trimesh.h
===================================================================
--- files/patch-vcglib-wrap-gl-trimesh.h	(revision 0)
+++ files/patch-vcglib-wrap-gl-trimesh.h	(working copy)
@@ -0,0 +1,18 @@
+--- ../../vcglib/wrap/gl/trimesh.h.orig	2013-11-16 21:32:47.000000000 +0100
++++ ../../vcglib/wrap/gl/trimesh.h	2013-11-16 21:33:23.000000000 +0100
+@@ -895,6 +895,7 @@
+ #define VCTRACE (void)0
+ //#define VCTRACE TRACE
+ 
++/* dead code
+ template<class MESH_TYPE>
+ void Crease(MESH_TYPE &m, typename MESH_TYPE::scalar_type angleRad)
+ {
+@@ -1006,6 +1007,7 @@
+ 	m.vert.math::Swap(newvert);
+ 	m.vn=m.vert.size();
+ }
++*/
+ 
+ /*
+ 	Secondo tipo di crease angle. ha bisogno del per wedge normal
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-12-07 16:50:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->gahr

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 gerald 2013-12-07 22:53:19 UTC
Apologies, the PR to reference should have been 182136.

Gerald
Comment 3 Pietro Cerutti freebsd_committer freebsd_triage 2013-12-09 08:18:01 UTC
If this builds fine on all supported releases, please go ahead. Thanks!

-- 
Pietro Cerutti
The FreeBSD Project
gahr@FreeBSD.org

PGP Public Key:
http://gahr.ch/pgp
Comment 4 Mathieu Arnold freebsd_committer freebsd_triage 2014-01-07 22:48:15 UTC
State Changed
From-To: open->closed

Committed, thanks!
Comment 5 dfilter service freebsd_committer freebsd_triage 2014-01-07 22:48:17 UTC
Author: mat
Date: Tue Jan  7 22:48:05 2014
New Revision: 339043
URL: http://svnweb.freebsd.org/changeset/ports/339043

Log:
  Fix build with gcc47
  
  PR:		ports/184565
  Submitted by:	Christoph Moench-Tegeder
  Approved by:	maintainer

Added:
  head/cad/meshlab/files/patch-meshlabplugins-decorate_base-colorhistogram.h   (contents, props changed)
  head/cad/meshlab/files/patch-vcglib-wrap-gl-trimesh.h   (contents, props changed)
Deleted:
  head/cad/meshlab/files/patch-vcglib-vcg-space_deprecated_point.h

Added: head/cad/meshlab/files/patch-meshlabplugins-decorate_base-colorhistogram.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/cad/meshlab/files/patch-meshlabplugins-decorate_base-colorhistogram.h	Tue Jan  7 22:48:05 2014	(r339043)
@@ -0,0 +1,15 @@
+--- ../../meshlab/src/meshlabplugins/decorate_base/colorhistogram.h.orig	2013-11-16 22:04:41.000000000 +0100
++++ ../../meshlab/src/meshlabplugins/decorate_base/colorhistogram.h	2013-11-16 22:04:56.000000000 +0100
+@@ -39,10 +39,11 @@
+   //ScalarType BinWidth(ScalarType v);
+ 
+   //! Reset histogram data.
++  /* dead code
+   void Clear() {
+     this->::Clear();
+     CV.clear();
+-  }
++  } */
+   /*
+   Note that the histogram holds <n> valid bins plus two semi-infinite bins.
+ 

Added: head/cad/meshlab/files/patch-vcglib-wrap-gl-trimesh.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/cad/meshlab/files/patch-vcglib-wrap-gl-trimesh.h	Tue Jan  7 22:48:05 2014	(r339043)
@@ -0,0 +1,18 @@
+--- ../../vcglib/wrap/gl/trimesh.h.orig	2013-11-16 21:32:47.000000000 +0100
++++ ../../vcglib/wrap/gl/trimesh.h	2013-11-16 21:33:23.000000000 +0100
+@@ -895,6 +895,7 @@
+ #define VCTRACE (void)0
+ //#define VCTRACE TRACE
+ 
++/* dead code
+ template<class MESH_TYPE>
+ void Crease(MESH_TYPE &m, typename MESH_TYPE::scalar_type angleRad)
+ {
+@@ -1006,6 +1007,7 @@
+ 	m.vert.math::Swap(newvert);
+ 	m.vn=m.vert.size();
+ }
++*/
+ 
+ /*
+ 	Secondo tipo di crease angle. ha bisogno del per wedge normal
_______________________________________________
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 6 dfilter service freebsd_committer freebsd_triage 2014-01-07 23:21:48 UTC
Author: mat
Date: Tue Jan  7 23:21:35 2014
New Revision: 339048
URL: http://svnweb.freebsd.org/changeset/ports/339048

Log:
  MFH: r339043
  
  Fix build with gcc47
  
  PR:		ports/184565
  Submitted by:	Christoph Moench-Tegeder
  Approved by:	maintainer
  Approved by:	portmgr (implicit)

Added:
  branches/2014Q1/cad/meshlab/files/patch-meshlabplugins-decorate_base-colorhistogram.h
     - copied unchanged from r339043, head/cad/meshlab/files/patch-meshlabplugins-decorate_base-colorhistogram.h
  branches/2014Q1/cad/meshlab/files/patch-vcglib-wrap-gl-trimesh.h
     - copied unchanged from r339043, head/cad/meshlab/files/patch-vcglib-wrap-gl-trimesh.h
Deleted:
  branches/2014Q1/cad/meshlab/files/patch-vcglib-vcg-space_deprecated_point.h
Modified:
Directory Properties:
  branches/2014Q1/   (props changed)

Copied: branches/2014Q1/cad/meshlab/files/patch-meshlabplugins-decorate_base-colorhistogram.h (from r339043, head/cad/meshlab/files/patch-meshlabplugins-decorate_base-colorhistogram.h)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2014Q1/cad/meshlab/files/patch-meshlabplugins-decorate_base-colorhistogram.h	Tue Jan  7 23:21:35 2014	(r339048, copy of r339043, head/cad/meshlab/files/patch-meshlabplugins-decorate_base-colorhistogram.h)
@@ -0,0 +1,15 @@
+--- ../../meshlab/src/meshlabplugins/decorate_base/colorhistogram.h.orig	2013-11-16 22:04:41.000000000 +0100
++++ ../../meshlab/src/meshlabplugins/decorate_base/colorhistogram.h	2013-11-16 22:04:56.000000000 +0100
+@@ -39,10 +39,11 @@
+   //ScalarType BinWidth(ScalarType v);
+ 
+   //! Reset histogram data.
++  /* dead code
+   void Clear() {
+     this->::Clear();
+     CV.clear();
+-  }
++  } */
+   /*
+   Note that the histogram holds <n> valid bins plus two semi-infinite bins.
+ 

Copied: branches/2014Q1/cad/meshlab/files/patch-vcglib-wrap-gl-trimesh.h (from r339043, head/cad/meshlab/files/patch-vcglib-wrap-gl-trimesh.h)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2014Q1/cad/meshlab/files/patch-vcglib-wrap-gl-trimesh.h	Tue Jan  7 23:21:35 2014	(r339048, copy of r339043, head/cad/meshlab/files/patch-vcglib-wrap-gl-trimesh.h)
@@ -0,0 +1,18 @@
+--- ../../vcglib/wrap/gl/trimesh.h.orig	2013-11-16 21:32:47.000000000 +0100
++++ ../../vcglib/wrap/gl/trimesh.h	2013-11-16 21:33:23.000000000 +0100
+@@ -895,6 +895,7 @@
+ #define VCTRACE (void)0
+ //#define VCTRACE TRACE
+ 
++/* dead code
+ template<class MESH_TYPE>
+ void Crease(MESH_TYPE &m, typename MESH_TYPE::scalar_type angleRad)
+ {
+@@ -1006,6 +1007,7 @@
+ 	m.vert.math::Swap(newvert);
+ 	m.vn=m.vert.size();
+ }
++*/
+ 
+ /*
+ 	Secondo tipo di crease angle. ha bisogno del per wedge normal
_______________________________________________
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"