lzweopard / carve

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

Building on OS X fails #27

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I came back to have another go on implementing Python bindings for carve, but 
it fails to build on OS X (+ports). First there was:

$ makeMaking all in lib/bin/sh ../libtool --tag=CXX   --mode=compile g++ 
-DHAVE_CONFIG_H -I. -I../include -I../include/carve  -I../include   -g -O2 -MT 
aabb.lo -MD -MP -MF .deps/aabb.Tpo -c -o aabb.lo aabb.cpplibtool: Version 
mismatch error.  This is libtool 2.4, but the
libtool: definition of this LT_INIT comes from libtool 2.2.4.
libtool: You should recreate aclocal.m4 with macros from libtool 2.4libtool: 
and run autoconf again.
make[1]: *** [aabb.lo] Error 63make: *** [all-recursive] Error 1

I fixed that by calling:
ACLOCAL_FLAGS="-I /usr/share/aclocal" ./autogen.sh
ACLOCAL_FLAGS="-I /usr/share/aclocal" ./configurechecking

(I'm not sure where it belongs)

Then I got another one, this time I don't know how to fix it because of poor 
C++ skills:

$ make
Making all in lib
/bin/sh ../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. 
-I../include -I../include/carve  -I../include   -g -O2 -MT aabb.lo -MD -MP -MF 
.deps/aabb.Tpo -c -o aabb.lo aabb.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../include -I../include/carve 
-I../include -g -O2 -MT aabb.lo -MD -MP -MF .deps/aabb.Tpo -c aabb.cpp  
-fno-common -DPIC -o .libs/aabb.o
In file included from ../include/carve/collection/unordered.hpp:33,
                 from ../include/carve/collection.hpp:20,
                 from ../include/carve/carve.hpp:47,
                 from ../include/carve/aabb.hpp:19,
                 from aabb.cpp:22:
../include/carve/collection/unordered/libstdcpp_impl.hpp:50: error: ISO C++ 
forbids declaration of 'mapped_type' with no type
../include/carve/collection/unordered/libstdcpp_impl.hpp:50: error: cannot 
declare member '__gnu_cxx::hash_map<K, V, H, std::equal_to<_Key>, 
std::allocator<_T2> >::mapped_type' within 'std::unordered_map<K, V, H>'
../include/carve/collection/unordered/libstdcpp_impl.hpp:50: error: expected 
';' before 'data_type'
make[1]: *** [aabb.lo] Error 1
make: *** [all-recursive] Error 1

I googled around, found something about missing `#include <map>` or missing 
`using namespace std;` , but again, don't know where to insert this.

Original issue reported on code.google.com by dusan.ma...@gmail.com on 8 Dec 2011 at 7:23

GoogleCodeExporter commented 9 years ago
Above was with carve from repo. Below is with 1.4.0 release:

Making all in src
g++ -DHAVE_CONFIG_H -I. -I../include -I../include/carve   -I../common 
-I../include -I../external/GLOOP/include -I../external/GLEW/include 
-I../external/GLUI/include  -g -O2 -MT intersect-glu_triangulator.o -MD -MP -MF 
.deps/intersect-glu_triangulator.Tpo -c -o intersect-glu_triangulator.o `test 
-f 'glu_triangulator.cpp' || echo './'`glu_triangulator.cpp
../include/carve/face_decl.hpp: In member function ‘virtual void 
GLUTriangulator::processOutputFace(std::vector<carve::poly::Face<3u>*, 
std::allocator<carve::poly::Face<3u>*> >&, const carve::poly::Face<3u>*, 
bool)’:
../include/carve/face_decl.hpp:71: 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: error: within this context
../include/carve/face_decl.hpp:71: 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: error: within this context
../include/carve/face_decl.hpp:71: 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: error: within this context
../include/carve/face_decl.hpp:71: 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: error: within this context
make[1]: *** [intersect-glu_triangulator.o] Error 1
make: *** [all-recursive] Error 1

Original comment by dusan.ma...@gmail.com on 8 Dec 2011 at 8:02

GoogleCodeExporter commented 9 years ago
Hi,

Could you please try building with cmake? The autotools build files are a bit 
out of date. I'll take a look at getting them back up to scratch, but cmake is 
the preferred approach now.

If that fails, could you please provide gcc version info, so that I can check 
the compile errors?

OSX is the primary development environment for Carve, so you shouldn't be 
having these problems.

Original comment by tobias.s...@gmail.com on 9 Dec 2011 at 5:47

GoogleCodeExporter commented 9 years ago
On Lion, using XCode 4.3 and up-to-date CMake I have following issue:

When using the Clang LVMM compiler, I get the above errors. When switching to 
the GCC compiler it compiles fine. I know how to do this in XCode, so when I 
generate an XCode project from CMake I can do the switch over there. But I fail 
to set this up properly from the CMake command line (probably due to the 
changed setup of the command-line tools in latest XCode 4.3).

Original comment by stef...@gmail.com on 25 Apr 2012 at 7:57

GoogleCodeExporter commented 9 years ago
The above problem I noticed was still based on the 1.4.0 sources. I've retried 
using the mercurial sources and now the errors are gone.

Using Clang compiler, XCode 4.3 on OSX Lion and cmake 

Original comment by stef...@gmail.com on 25 Apr 2012 at 8:13