CGAL::Surface_mesh_simplification compiling errors in G++ 4.3

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

CGAL::Surface_mesh_simplification compiling errors in G++ 4.3

Xiaofan Li-2

Hi all,

 

Just found out that due to changes in GCC 4.3, the Surface_mesh_simplification module complains when compiling. It is basically the common problem of the macro definition of CHAR_BIT that is also seen in the boost library, plus one more warning message that the module is including a header file which will be obsolete without notice in future gcc versions.

 

Check the detail report here:

 

make[5]: Entering directory `/farm/home/li14/devel/BioSimz/src/Validation'

/bin/sh ../../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include/BioSimz  -I./../../include    -O3 -MT MolSkinMesh.lo -MD -MP -MF .deps/MolSkinMesh.Tpo -c -o MolSkinMesh.lo MolSkinMesh.cpp

 g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include/BioSimz -I./../../include -O3 -MT MolSkinMesh.lo -MD -MP -MF .deps/MolSkinMesh.Tpo -c MolSkinMesh.cpp  -fPIC -DPIC -o .libs/MolSkinMesh.o

In file included from /usr/lib/gcc/x86_64-redhat-linux/4.3.0/../../../../include/c++/4.3.0/ext/hash_set:64,

                 from /usr/include/boost/graph/adjacency_list.hpp:22,

                 from /usr/include/CGAL/Surface_mesh_simplification/Detail/Edge_collapse.h:28,

                 from /usr/include/CGAL/Surface_mesh_simplification/edge_collapse.h:24,

                 from ./../../include/BioSimz/MolSkinMesh.h:30,

                 from MolSkinMesh.cpp:2:

/usr/lib/gcc/x86_64-redhat-linux/4.3.0/../../../../include/c++/4.3.0/backward/backward_warning.h:32: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.

In file included from /usr/include/CGAL/Modifiable_priority_queue.h:21,

                 from /usr/include/CGAL/Surface_mesh_simplification/Detail/Common.h:35,

                 from /usr/include/CGAL/Surface_mesh_simplification/halfedge_collapse_Polyhedron_3.h:21,

                 from /usr/include/CGAL/Surface_mesh_simplification/HalfedgeGraph_Polyhedron_3.h:25,

                 from ./../../include/BioSimz/MolSkinMesh.h:29,

                 from MolSkinMesh.cpp:2:

/usr/include/CGAL/boost_relaxed_heap.hpp: In member function 'size_t boost::boost_relaxed_heap<IndexedType, Compare, ID>::log_base_2(size_t)':

/usr/include/CGAL/boost_relaxed_heap.hpp:115: error: 'CHAR_BIT' was not declared in this scope

make[5]: *** [MolSkinMesh.lo] Error 1

 

The first warning msg should be a boost one as it is from adjacency_list.hpp:22, while the second compilation error arises from CGAL/boost_relaxed_heap.hpp which indicated a CGAL one but with links to boost, too. However the code compiles & runs well in gcc 4.1.2 with boost 1.34.

 

Has anybody found a workaround for this problem?

 

Regards,

Xiaofan

 

Reply | Threaded
Open this post in threaded view
|

Re: CGAL::Surface_mesh_simplification compiling errors

Sylvain Pion
Administrator
Xiaofan Li a écrit :

> /usr/include/CGAL/boost_relaxed_heap.hpp: In member function 'size_t
> boost::boost_relaxed_heap<IndexedType, Compare, ID>::log_base_2(size_t)':
>
> /usr/include/CGAL/boost_relaxed_heap.hpp:115: error: 'CHAR_BIT' was not
> declared in this scope
>
> make[5]: *** [MolSkinMesh.lo] Error 1
>
>  
>
> The first warning msg should be a boost one as it is from
> adjacency_list.hpp:22, while the second compilation error arises from
> CGAL/boost_relaxed_heap.hpp which indicated a CGAL one but with links to
> boost, too. However the code compiles & runs well in gcc 4.1.2 with
> boost 1.34.
>
>  
>
> Has anybody found a workaround for this problem?
It's a missing header file.
Add #include <climits> somewhere before the macro is used.

--
Sylvain Pion
INRIA Sophia-Antipolis
Geometrica Project-Team
CGAL, http://cgal.org/


smime.p7s (5K) Download Attachment