trmcnealy / carve

Automatically exported from code.google.com/p/carve
Other
0 stars 0 forks source link

Carve-1.4.0:Compiling fails on g++ version 4.6.3 #44

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Executed autogen.sh as follows.
sh ./autogen.sh
This created 'configure' file.
2. Executed configure as follows
sh ./configure --prefix=$HOME/carve
3. then executed make. This is the error that I get.

../include/carve/polyhedron_base.hpp:39:5: error: 'ptrdiff_t' does not name a 
type
../include/carve/polyhedron_base.hpp:44:5: error: 'ptrdiff_t' does not name a 
type
../include/carve/polyhedron_base.hpp:70:7: error: 'ptrdiff_t' does not name a 
type
../include/carve/polyhedron_base.hpp:71:7: error: 'ptrdiff_t' does not name a 
type
../include/carve/polyhedron_base.hpp:73:7: error: 'ptrdiff_t' does not name a 
type
../include/carve/polyhedron_base.hpp:74:7: error: 'ptrdiff_t' does not name a 
type
../include/carve/polyhedron_base.hpp:102:7: error: 'ptrdiff_t' does not name a 
type
../include/carve/polyhedron_base.hpp:103:7: error: 'ptrdiff_t' does not name a 
type
../include/carve/polyhedron_base.hpp:105:7: error: 'ptrdiff_t' does not name a 
type
../include/carve/polyhedron_base.hpp:106:7: error: 'ptrdiff_t' does not name a 
type
../include/carve/polyhedron_base.hpp:108:7: error: 'ptrdiff_t' does not name a 
type
../include/carve/polyhedron_base.hpp:109:7: error: 'ptrdiff_t' does not name a 
type
In file included from ../include/carve/poly_impl.hpp:25:0,
                 from ../include/carve/poly.hpp:24,
                 from ../include/carve/csg.hpp:28,
                 from convex_hull.cpp:22:
../include/carve/polyhedron_impl.hpp: In member function 'bool 
carve::poly::Geometry<3u>::orderVertices(order_t)':
../include/carve/polyhedron_impl.hpp:62:40: error: there are no arguments to 
'vertexToIndex_fast' that depend on a template parameter, so a declaration of 
'vertexToIndex_fast' must be available [-fpermissive]
../include/carve/polyhedron_impl.hpp:62:40: note: (if you use '-fpermissive', 
G++ will accept your code, but allowing the use of an undeclared name is 
deprecated)
../include/carve/polyhedron_impl.hpp:68:60: error: there are no arguments to 
'vertexToIndex_fast' that depend on a template parameter, so a declaration of 
'vertexToIndex_fast' must be available [-fpermissive]
../include/carve/polyhedron_impl.hpp:72:58: error: there are no arguments to 
'vertexToIndex_fast' that depend on a template parameter, so a declaration of 
'vertexToIndex_fast' must be available [-fpermissive]
../include/carve/polyhedron_impl.hpp:73:58: error: there are no arguments to 
'vertexToIndex_fast' that depend on a template parameter, so a declaration of 
'vertexToIndex_fast' must be available [-fpermissive]
../include/carve/polyhedron_impl.hpp: In member function 'int 
carve::poly::Geometry<3u>::_faceNeighbourhood(const face_t*, int, T*) const':
../include/carve/polyhedron_impl.hpp:92:111: error: there are no arguments to 
'edgeToIndex_fast' that depend on a template parameter, so a declaration of 
'edgeToIndex_fast' must be available [-fpermissive]
../include/carve/polyhedron_impl.hpp: In member function 'int 
carve::poly::Geometry<3u>::faceNeighbourhood(const edge_t*, int, int, T) const':
../include/carve/polyhedron_impl.hpp:117:99: error: there are no arguments to 
'edgeToIndex_fast' that depend on a template parameter, so a declaration of 
'edgeToIndex_fast' must be available [-fpermissive]
../include/carve/polyhedron_impl.hpp: In member function 'int 
carve::poly::Geometry<3u>::faceNeighbourhood(const vertex_t*, int, int, T) 
const':
../include/carve/polyhedron_impl.hpp:132:105: error: there are no arguments to 
'vertexToIndex_fast' that depend on a template parameter, so a declaration of 
'vertexToIndex_fast' must be available [-fpermissive]
../include/carve/polyhedron_impl.hpp: In member function 'int 
carve::poly::Geometry<3u>::vertexToEdges(const vertex_t*, T) const':
../include/carve/polyhedron_impl.hpp:145:88: error: there are no arguments to 
'vertexToIndex_fast' that depend on a template parameter, so a declaration of 
'vertexToIndex_fast' must be available [-fpermissive]
../include/carve/polyhedron_impl.hpp: In member function 'int 
carve::poly::Geometry<3u>::vertexToFaces(const vertex_t*, T) const':
../include/carve/polyhedron_impl.hpp:154:105: error: there are no arguments to 
'vertexToIndex_fast' that depend on a template parameter, so a declaration of 
'vertexToIndex_fast' must be available [-fpermissive]
../include/carve/polyhedron_impl.hpp: In member function 'int 
carve::poly::Geometry<3u>::edgeToFaces(const edge_t*, T) const':
../include/carve/polyhedron_impl.hpp:166:99: error: there are no arguments to 
'edgeToIndex_fast' that depend on a template parameter, so a declaration of 
'edgeToIndex_fast' must be available [-fpermissive]
../include/carve/polyhedron_impl.hpp: In member function 'const face_t* 
carve::poly::Geometry<3u>::connectedFace(const face_t*, const edge_t*) const':
../include/carve/polyhedron_impl.hpp:177:99: error: 'edgeToIndex_fast' was not 
declared in this scope
../include/carve/polyhedron_impl.hpp: In member function 'bool 
carve::poly::Polyhedron::edgeOnManifold(const edge_t*, int) const':
../include/carve/polyhedron_impl.hpp:201:99: error: 'edgeToIndex_fast' was not 
declared in this scope
../include/carve/polyhedron_impl.hpp: In member function 'bool 
carve::poly::Polyhedron::vertexOnManifold(const vertex_t*, int) const':
../include/carve/polyhedron_impl.hpp:210:94: error: 'vertexToIndex_fast' was 
not declared in this scope
../include/carve/polyhedron_impl.hpp: In member function 'int 
carve::poly::Polyhedron::edgeManifolds(const edge_t*, T) const':
../include/carve/polyhedron_impl.hpp:222:99: error: there are no arguments to 
'edgeToIndex_fast' that depend on a template parameter, so a declaration of 
'edgeToIndex_fast' must be available [-fpermissive]
../include/carve/polyhedron_impl.hpp: In member function 'int 
carve::poly::Polyhedron::vertexManifolds(const vertex_t*, T) const':
../include/carve/polyhedron_impl.hpp:240:94: error: there are no arguments to 
'vertexToIndex_fast' that depend on a template parameter, so a declaration of 
'vertexToIndex_fast' must be available [-fpermissive]
../include/carve/polyhedron_impl.hpp: In member function 'bool 
carve::poly::Geometry<3u>::orderVertices(order_t) [with order_t = 
std::less<carve::geom::vector<3u> >]':
../include/carve/polyhedron_base.hpp:114:82:   instantiated from here
../include/carve/polyhedron_impl.hpp:62:9: error: 'vertexToIndex_fast' was not 
declared in this scope
../include/carve/polyhedron_base.hpp:114:82:   instantiated from here
../include/carve/polyhedron_impl.hpp:68:11: error: 'vertexToIndex_fast' was not 
declared in this scope
../include/carve/polyhedron_base.hpp:114:82:   instantiated from here
../include/carve/polyhedron_impl.hpp:72:9: error: 'vertexToIndex_fast' was not 
declared in this scope
make[1]: *** [convex_hull.lo] Error 1
make[1]: Leaving directory `/home/sandeep/Desktop/carve-1.4.0/lib'
make: *** [all-recursive] Error 1

What version of the product are you using? On what operating system?
Carve version: 1.4.0 and operating system: Ubuntu 12.04
g++/gcc vesrion: 4.6.3

Please let me know if I am doing something wrong.

Original issue reported on code.google.com by sndpj...@gmail.com on 20 Apr 2013 at 12:41

GoogleCodeExporter commented 9 years ago
It also doesn't compile on GCC 4.7.2:

Making all in lib
make[1]: Entering directory `/home/sybren/carve/lib'
/bin/bash ../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. 
-I../include -I../include/carve  -I../include   -g -O2 -MT convex_hull.lo -MD 
-MP -MF .deps/convex_hull.Tpo -c -o convex_hull.lo convex_hull.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../include -I../include/carve 
-I../include -g -O2 -MT convex_hull.lo -MD -MP -MF .deps/convex_hull.Tpo -c 
convex_hull.cpp  -fPIC -DPIC -o .libs/convex_hull.o
In file included from /usr/include/c++/4.7/ext/hash_map:61:0,
                 from ../include/carve/collection/unordered/libstdcpp_impl.hpp:19,
                 from ../include/carve/collection/unordered.hpp:33,
                 from ../include/carve/collection.hpp:20,
                 from ../include/carve/carve.hpp:51,
                 from ../include/carve/csg.hpp:24,
                 from convex_hull.cpp:22:
/usr/include/c++/4.7/backward/backward_warning.h:33:2: warning: #warning This 
file includes at least one deprecated or antiquated header which may be removed 
without further notice at a future date. Please use a non-deprecated interface 
with equivalent functionality instead. For a listing of replacement headers and 
interfaces, consult the file backward_warning.h. To disable this warning use 
-Wno-deprecated. [-Wcpp]
In file included from ../include/carve/mesh.hpp:27:0,
                 from ../include/carve/csg.hpp:28,
                 from convex_hull.cpp:22:
../include/carve/rtree.hpp:230:29: error: 'uint32_t' has not been declared
In file included from ../include/carve/mesh.hpp:873:0,
                 from ../include/carve/csg.hpp:28,
                 from convex_hull.cpp:22:
../include/carve/mesh_impl.hpp:37:17: error: 'ptrdiff_t' does not name a type
In file included from ../include/carve/csg.hpp:32:0,
                 from convex_hull.cpp:22:
../include/carve/iobj.hpp:36:9: error: 'intptr_t' does not name a type
../include/carve/iobj.hpp: In constructor 'carve::csg::IObj::IObj()':
../include/carve/iobj.hpp:39:37: error: class 'carve::csg::IObj' does not have 
any field named 'val'
../include/carve/iobj.hpp: In member function 'size_t 
carve::csg::IObj_hash::operator()(const carve::csg::IObj&) const':
../include/carve/iobj.hpp:50:26: error: 'const struct carve::csg::IObj' has no 
member named 'val'
../include/carve/iobj.hpp: In member function 'size_t 
carve::csg::IObj_hash::operator()(const std::pair<const carve::csg::IObj, const 
carve::csg::IObj>&) const':
../include/carve/iobj.hpp:53:32: error: 'const struct carve::csg::IObj' has no 
member named 'val'
../include/carve/iobj.hpp:53:55: error: 'const struct carve::csg::IObj' has no 
member named 'val'
../include/carve/iobj.hpp: In function 'bool carve::csg::operator==(const 
carve::csg::IObj&, const carve::csg::IObj&)':
../include/carve/iobj.hpp:71:40: error: 'const struct carve::csg::IObj' has no 
member named 'val'
../include/carve/iobj.hpp:71:49: error: 'const struct carve::csg::IObj' has no 
member named 'val'
../include/carve/iobj.hpp: In function 'bool carve::csg::operator!=(const 
carve::csg::IObj&, const carve::csg::IObj&)':
../include/carve/iobj.hpp:75:40: error: 'const struct carve::csg::IObj' has no 
member named 'val'
../include/carve/iobj.hpp:75:49: error: 'const struct carve::csg::IObj' has no 
member named 'val'
../include/carve/iobj.hpp: In function 'bool carve::csg::operator<(const 
carve::csg::IObj&, const carve::csg::IObj&)':
../include/carve/iobj.hpp:79:64: error: 'const struct carve::csg::IObj' has no 
member named 'val'
../include/carve/iobj.hpp:79:72: error: 'const struct carve::csg::IObj' has no 
member named 'val'
../include/carve/iobj.hpp: In function 'bool carve::csg::operator<=(const 
carve::csg::IObj&, const carve::csg::IObj&)':
../include/carve/iobj.hpp:83:64: error: 'const struct carve::csg::IObj' has no 
member named 'val'
../include/carve/iobj.hpp:83:73: error: 'const struct carve::csg::IObj' has no 
member named 'val'
../include/carve/iobj.hpp: In function 'bool carve::csg::operator>(const 
carve::csg::IObj&, const carve::csg::IObj&)':
../include/carve/iobj.hpp:87:64: error: 'const struct carve::csg::IObj' has no 
member named 'val'
../include/carve/iobj.hpp:87:72: error: 'const struct carve::csg::IObj' has no 
member named 'val'
../include/carve/iobj.hpp: In function 'bool carve::csg::operator>=(const 
carve::csg::IObj&, const carve::csg::IObj&)':
../include/carve/iobj.hpp:91:64: error: 'const struct carve::csg::IObj' has no 
member named 'val'
../include/carve/iobj.hpp:91:73: error: 'const struct carve::csg::IObj' has no 
member named 'val'
make[1]: *** [convex_hull.lo] Error 1
make[1]: Leaving directory `/home/sybren/carve/lib'
make: *** [all-recursive] Error 1

Original comment by syb...@stuvel.eu on 26 Apr 2013 at 9:22

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I solved this problem by adding 

#include <stddef.h>

to the header file

../include/carve/polyhedron_base.hpp

but now I receive the following error:

../include/carve/face_decl.hpp: In member function ‘virtual void 
GLUTriangulator::processOutputFace(std::vector<carve::poly::Face<3u>*>&, const 
carve::poly::Face<3u>*, bool)’:
../include/carve/face_decl.hpp:71:37: error: ‘std::vector<const 
carve::poly::Vertex<3u>*, std::allocator<const carve::poly::Vertex<3u>*> > 
carve::poly::Face<3u>::vertices’ is protected
glu_triangulator.cpp:114:15: error: within this context
../include/carve/face_decl.hpp:71:37: error: ‘std::vector<const 
carve::poly::Vertex<3u>*, std::allocator<const carve::poly::Vertex<3u>*> > 
carve::poly::Face<3u>::vertices’ is protected
glu_triangulator.cpp:126:34: error: within this context
../include/carve/face_decl.hpp:71:37: error: ‘std::vector<const 
carve::poly::Vertex<3u>*, std::allocator<const carve::poly::Vertex<3u>*> > 
carve::poly::Face<3u>::vertices’ is protected
glu_triangulator.cpp:127:45: error: within this context
../include/carve/face_decl.hpp:71:37: error: ‘std::vector<const 
carve::poly::Vertex<3u>*, std::allocator<const carve::poly::Vertex<3u>*> > 
carve::poly::Face<3u>::vertices’ is protected
glu_triangulator.cpp:127:79: error: within this context
make[1]: *** [intersect-glu_triangulator.o] Error 1

Original comment by mojtahed...@gmail.com on 8 Oct 2013 at 2:22

GoogleCodeExporter commented 9 years ago
Hi, 

Could you compile it finally? I am facing the same issue. Please let me know if 
you found any solution.

Original comment by tulasiad...@gmail.com on 9 Feb 2014 at 6:01

GoogleCodeExporter commented 9 years ago
You have to add the include files by yourself:

#include <stdint.h> //for uint32_t.
#include <stddef.h> //for ptrdiff_t

Original comment by fady.moh...@gmail.com on 9 Feb 2014 at 10:53