Can't compile CGAL application after upgrading to boost 1.67.0_1 on Mac

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

Can't compile CGAL application after upgrading to boost 1.67.0_1 on Mac

bebe0705
I am getting errors while compiling a piece of software that uses CGAL (see compiler trace below). This error arises using Apple’s Clang or a-built-from-source GCC 7.3.0.

[  2%] Building CXX object CMakeFiles/ASPEN.dir/source/ShapeBuilder.cpp.o
In file included from /usr/local/include/CGAL/internal/boost/mutable_queue.hpp:27:0,
                 from /usr/local/include/CGAL/Modifiable_priority_queue.h:27,
                 from /usr/local/include/CGAL/Surface_mesh_simplification/Detail/Common.h:46,
                 from /usr/local/include/CGAL/Surface_mesh_simplification/Detail/Edge_collapse.h:25,
                 from /usr/local/include/CGAL/Surface_mesh_simplification/edge_collapse.h:28,
                 from /Users/bbercovici/GDrive/CUBoulder/Research/code/ASPEN_gui_less/lib/external/CGAL_interface/include/CGAL_interface.hpp:21,
                 from /Users/bbercovici/GDrive/CUBoulder/Research/code/ASPEN_gui_less/lib/source/ShapeBuilder.cpp:21:
/usr/local/include/CGAL/internal/boost/array_binary_tree.hpp:54:28: error: expected template-name before '<' token
         : ::boost::iterator<std::forward_iterator_tag,
                            ^
/usr/local/include/CGAL/internal/boost/array_binary_tree.hpp:54:28: error: expected '{' before '<' token
/usr/local/include/CGAL/internal/boost/array_binary_tree.hpp:54:28: error: expected unqualified-id before '<' token
make[2]: *** [CMakeFiles/ASPEN.dir/source/ShapeBuilder.cpp.o] Error 1
make[1]: *** [CMakeFiles/ASPEN.dir/all] Error 2
make: *** [all] Error 2


I’m using CGAL 4.11.1, downloaded through Homebrew . The same error was raised using the bleeding-edge CGAL 4.13 (that I compiled from source since it is not on Homebrew yet).

I believe a Boost upgrade may be the cause for this, based on when the last upgrade was applied. I’m using Boost 1.67.0_1 , also downloaded from Homebrew a couple days ago. I am certain I was able to compile without trouble until I got the update, hence my suspicion that something is wrong with boost.

Any advice ? 
Reply | Threaded
Open this post in threaded view
|

Re: Can't compile CGAL application after upgrading to boost 1.67.0_1 on Mac

Laurent Rineau (CGAL/GeometryFactory)
Le Sunday, April 22, 2018 10:27:23 PM CEST Benjamin Bercovici a écrit :

> I am getting errors while compiling a piece of software that uses CGAL (see
> compiler trace below). This error arises using Apple’s Clang or
> a-built-from-source GCC 7.3.0.
>
> [  2%] Building CXX object CMakeFiles/ASPEN.dir/source/ShapeBuilder.cpp.o
> In file included from
> /usr/local/include/CGAL/internal/boost/mutable_queue.hpp:27:0, from
> /usr/local/include/CGAL/Modifiable_priority_queue.h:27, from
> /usr/local/include/CGAL/Surface_mesh_simplification/Detail/Common.h:46,
> from
> /usr/local/include/CGAL/Surface_mesh_simplification/Detail/Edge_collapse.h
> :25, from
> /usr/local/include/CGAL/Surface_mesh_simplification/edge_collapse.h:28,
> from
> /Users/bbercovici/GDrive/CUBoulder/Research/code/ASPEN_gui_less/lib/extern
> al/CGAL_interface/include/CGAL_interface.hpp:21, from
> /Users/bbercovici/GDrive/CUBoulder/Research/code/ASPEN_gui_less/lib/source
> /ShapeBuilder.cpp:21:
> /usr/local/include/CGAL/internal/boost/array_binary_tree.hpp:54:28: error:
> expected template-name before '<' token
>          : ::boost::iterator<std::forward_iterator_tag,
>
>                             ^
> /usr/local/include/CGAL/internal/boost/array_binary_tree.hpp:54:28: error:
> expected '{' before '<' token
> /usr/local/include/CGAL/internal/boost/array_binary_tree.hpp:54:28: error:
> expected unqualified-id before '<' token make[2]: ***
> [CMakeFiles/ASPEN.dir/source/ShapeBuilder.cpp.o] Error 1 make[1]: ***
> [CMakeFiles/ASPEN.dir/all] Error 2
> make: *** [all] Error 2
>
>
> I’m using CGAL 4.11.1, downloaded through Homebrew . The same error was
> raised using the bleeding-edge CGAL 4.13 (that I compiled from source
> since it is not on Homebrew yet).
>
> I believe a Boost upgrade may be the cause for this, based on when the last
> upgrade was applied. I’m using Boost 1.67.0_1 , also downloaded from
> Homebrew a couple days ago. I am certain I was able to compile without
> trouble until I got the update, hence my suspicion that something is wrong
> with boost.
>
> Any advice ?

Hi Benjamin,

It seems there is a missing `#include` in that file of CGAL.

As a workaround, you can add a

  #include <boost/iterator.hpp>

in the file

  ASPEN_gui_less/lib/external/CGAL_interface/include/CGAL_interface.hpp

before its lines 21. That should fix your issue. Let us know.

--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory           http://www.geometryfactory.com/
Release Manager of the CGAL Project       http://www.cgal.org/




--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Can't compile CGAL application after upgrading to boost 1.67.0_1 on Mac

bebe0705
thanks, that removed the compile error.

However I am now getting linking errors:

Undefined symbols for architecture x86_64:
  "CGAL::get_mode(std::basic_ios<char, std::char_traits<char> >&)", referenced from:
      std::basic_ostream<char, std::char_traits<char> >& CGAL::insert<CGAL::Epick>(std::basic_ostream<char, std::char_traits<char> >&, CGAL::Point_3<CGAL::Epick> const&, CGAL::Cartesian_tag const&) in CGAL_interface.cpp.o
ld: symbol(s) not found for architecture x86_64

I had a look at the libraries linked at the end of the compile job, and I could only find one related to CGAL :

/usr/local/lib/libCGAL.13.0.1.dylib

There are a few other symlinks to CGAL libraries in /usr/local/lib:



Could this linker error be explained by the fact that these other .dylib are not included?

my cmake lists looks like this: 

# CMakeLists.txt
……
…...
# Find CGAL
find_package(CGAL REQUIRED)
include( ${CGAL_USE_FILE} )
include( CGAL_CreateSingleSourceCGALProgram )

set(library_dependencies
${CGAL_LIBRARIES} 
${CGAL_3RD_PARTY_LIBRARIES}
….
)

target_link_libraries(${LIB_NAME} ${library_dependencies})

On 23 Apr 2018, at 04:03, Laurent Rineau (CGAL/GeometryFactory) <[hidden email]> wrote:

Le Sunday, April 22, 2018 10:27:23 PM CEST Benjamin Bercovici a écrit :
I am getting errors while compiling a piece of software that uses CGAL (see
compiler trace below). This error arises using Apple’s Clang or
a-built-from-source GCC 7.3.0.

[  2%] Building CXX object CMakeFiles/ASPEN.dir/source/ShapeBuilder.cpp.o
In file included from
/usr/local/include/CGAL/internal/boost/mutable_queue.hpp:27:0, from
/usr/local/include/CGAL/Modifiable_priority_queue.h:27, from
/usr/local/include/CGAL/Surface_mesh_simplification/Detail/Common.h:46,
from
/usr/local/include/CGAL/Surface_mesh_simplification/Detail/Edge_collapse.h
:25, from
/usr/local/include/CGAL/Surface_mesh_simplification/edge_collapse.h:28,
from
/Users/bbercovici/GDrive/CUBoulder/Research/code/ASPEN_gui_less/lib/extern
al/CGAL_interface/include/CGAL_interface.hpp:21, from
/Users/bbercovici/GDrive/CUBoulder/Research/code/ASPEN_gui_less/lib/source
/ShapeBuilder.cpp:21:
/usr/local/include/CGAL/internal/boost/array_binary_tree.hpp:54:28: error:
expected template-name before '<' token
        : ::boost::iterator<std::forward_iterator_tag,

                           ^
/usr/local/include/CGAL/internal/boost/array_binary_tree.hpp:54:28: error:
expected '{' before '<' token
/usr/local/include/CGAL/internal/boost/array_binary_tree.hpp:54:28: error:
expected unqualified-id before '<' token make[2]: ***
[CMakeFiles/ASPEN.dir/source/ShapeBuilder.cpp.o] Error 1 make[1]: ***
[CMakeFiles/ASPEN.dir/all] Error 2
make: *** [all] Error 2


I’m using CGAL 4.11.1, downloaded through Homebrew . The same error was
raised using the bleeding-edge CGAL 4.13 (that I compiled from source
since it is not on Homebrew yet).

I believe a Boost upgrade may be the cause for this, based on when the last
upgrade was applied. I’m using Boost 1.67.0_1 , also downloaded from
Homebrew a couple days ago. I am certain I was able to compile without
trouble until I got the update, hence my suspicion that something is wrong
with boost.

Any advice ?

Hi Benjamin,

It seems there is a missing `#include` in that file of CGAL.

As a workaround, you can add a

 #include <boost/iterator.hpp>

in the file

 ASPEN_gui_less/lib/external/CGAL_interface/include/CGAL_interface.hpp

before its lines 21. That should fix your issue. Let us know.

--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory           http://secure-web.cisco.com/1K985_KCWrXn7O7YUsZu8-QyfwjwB-GqF0-hWQfqx0V4_VpGqrOBeKOlVsPI7ma9Oeo8lryDhUYGX11bjnep3UCnTcQf9y2WHhTjt6TwTZ3qWv5Up_kSH2aawq0ORSFdufg21Z-iW81lMDVQ7ptbafQftxigjTCNCA_xNlyGpAK7yJzridj25PJ2_WHx8i7btS5vrETiYph9xSJ9DY1MwK044Iv2qXDoSTbgDr6px4asA3cGNgMJEwt922GRSTUxdbrovkR9ETwFyCoem7ILxelap9IjCL5Abh-fkLXfXohWNhvPYRhdlRHTYE1G13kXVDCBrzb6s8ZCAE1Z1WtYSz7Oh7985cZl3IURLVrn4XqHmquK7V8hm5ccQwyp29MwQUrH7Q1gwBjT9tLSBmwTZRB0uhr0ze7UOaJhxkqp7K_9cMzhqZlQcwir3u1OzLKazGft_4vyeYsKh6J4UmLi0dg/http%3A%2F%2Fwww.geometryfactory.com%2F
Release Manager of the CGAL Project       http://www.cgal.org/




--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss




Reply | Threaded
Open this post in threaded view
|

Re: Can't compile CGAL application after upgrading to boost 1.67.0_1 on Mac

bebe0705
Actually this is not CGAL’s fault. I compiled CGAL with the default clang but was attempting to build my library with GCC 7.3.

Compiling my library with clang works like a charm.

On 23 Apr 2018, at 08:23, Benjamin Bercovici <[hidden email]> wrote:

thanks, that removed the compile error.

However I am now getting linking errors:

Undefined symbols for architecture x86_64:
  "CGAL::get_mode(std::basic_ios<char, std::char_traits<char> >&)", referenced from:
      std::basic_ostream<char, std::char_traits<char> >& CGAL::insert<CGAL::Epick>(std::basic_ostream<char, std::char_traits<char> >&, CGAL::Point_3<CGAL::Epick> const&, CGAL::Cartesian_tag const&) in CGAL_interface.cpp.o
ld: symbol(s) not found for architecture x86_64

I had a look at the libraries linked at the end of the compile job, and I could only find one related to CGAL :

/usr/local/lib/libCGAL.13.0.1.dylib

There are a few other symlinks to CGAL libraries in /usr/local/lib:

<Screen Shot 2018-04-23 at 08.17.02.png>


Could this linker error be explained by the fact that these other .dylib are not included?

my cmake lists looks like this: 

# CMakeLists.txt
……
…...
# Find CGAL
find_package(CGAL REQUIRED)
include( ${CGAL_USE_FILE} )
include( CGAL_CreateSingleSourceCGALProgram )

set(library_dependencies
${CGAL_LIBRARIES} 
${CGAL_3RD_PARTY_LIBRARIES}
….
)

target_link_libraries(${LIB_NAME} ${library_dependencies})

On 23 Apr 2018, at 04:03, Laurent Rineau (CGAL/GeometryFactory) <[hidden email]> wrote:

Le Sunday, April 22, 2018 10:27:23 PM CEST Benjamin Bercovici a écrit :
I am getting errors while compiling a piece of software that uses CGAL (see
compiler trace below). This error arises using Apple’s Clang or
a-built-from-source GCC 7.3.0.

[  2%] Building CXX object CMakeFiles/ASPEN.dir/source/ShapeBuilder.cpp.o
In file included from
/usr/local/include/CGAL/internal/boost/mutable_queue.hpp:27:0, from
/usr/local/include/CGAL/Modifiable_priority_queue.h:27, from
/usr/local/include/CGAL/Surface_mesh_simplification/Detail/Common.h:46,
from
/usr/local/include/CGAL/Surface_mesh_simplification/Detail/Edge_collapse.h
:25, from
/usr/local/include/CGAL/Surface_mesh_simplification/edge_collapse.h:28,
from
/Users/bbercovici/GDrive/CUBoulder/Research/code/ASPEN_gui_less/lib/extern
al/CGAL_interface/include/CGAL_interface.hpp:21, from
/Users/bbercovici/GDrive/CUBoulder/Research/code/ASPEN_gui_less/lib/source
/ShapeBuilder.cpp:21:
/usr/local/include/CGAL/internal/boost/array_binary_tree.hpp:54:28: error:
expected template-name before '<' token
        : ::boost::iterator<std::forward_iterator_tag,

                           ^
/usr/local/include/CGAL/internal/boost/array_binary_tree.hpp:54:28: error:
expected '{' before '<' token
/usr/local/include/CGAL/internal/boost/array_binary_tree.hpp:54:28: error:
expected unqualified-id before '<' token make[2]: ***
[CMakeFiles/ASPEN.dir/source/ShapeBuilder.cpp.o] Error 1 make[1]: ***
[CMakeFiles/ASPEN.dir/all] Error 2
make: *** [all] Error 2


I’m using CGAL 4.11.1, downloaded through Homebrew . The same error was
raised using the bleeding-edge CGAL 4.13 (that I compiled from source
since it is not on Homebrew yet).

I believe a Boost upgrade may be the cause for this, based on when the last
upgrade was applied. I’m using Boost 1.67.0_1 , also downloaded from
Homebrew a couple days ago. I am certain I was able to compile without
trouble until I got the update, hence my suspicion that something is wrong
with boost.

Any advice ?

Hi Benjamin,

It seems there is a missing `#include` in that file of CGAL.

As a workaround, you can add a

 #include <boost/iterator.hpp>

in the file

 ASPEN_gui_less/lib/external/CGAL_interface/include/CGAL_interface.hpp

before its lines 21. That should fix your issue. Let us know.

--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory           http://secure-web.cisco.com/1K985_KCWrXn7O7YUsZu8-QyfwjwB-GqF0-hWQfqx0V4_VpGqrOBeKOlVsPI7ma9Oeo8lryDhUYGX11bjnep3UCnTcQf9y2WHhTjt6TwTZ3qWv5Up_kSH2aawq0ORSFdufg21Z-iW81lMDVQ7ptbafQftxigjTCNCA_xNlyGpAK7yJzridj25PJ2_WHx8i7btS5vrETiYph9xSJ9DY1MwK044Iv2qXDoSTbgDr6px4asA3cGNgMJEwt922GRSTUxdbrovkR9ETwFyCoem7ILxelap9IjCL5Abh-fkLXfXohWNhvPYRhdlRHTYE1G13kXVDCBrzb6s8ZCAE1Z1WtYSz7Oh7985cZl3IURLVrn4XqHmquK7V8hm5ccQwyp29MwQUrH7Q1gwBjT9tLSBmwTZRB0uhr0ze7UOaJhxkqp7K_9cMzhqZlQcwir3u1OzLKazGft_4vyeYsKh6J4UmLi0dg/http%3A%2F%2Fwww.geometryfactory.com%2F
Release Manager of the CGAL Project       http://www.cgal.org/




--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss





Reply | Threaded
Open this post in threaded view
|

Re: Can't compile CGAL application after upgrading to boost 1.67.0_1 on Mac

Pratyush Pranav
this is possibly because your boost or some other prerequisite is compiled with some other version of clang… there is a version clash in linking libraries and even before possibly..

Pratyush

On 23 Apr 2018, at 20:23, Benjamin Bercovici <[hidden email]> wrote:

Actually this is not CGAL’s fault. I compiled CGAL with the default clang but was attempting to build my library with GCC 7.3.

Compiling my library with clang works like a charm.

On 23 Apr 2018, at 08:23, Benjamin Bercovici <[hidden email]> wrote:

thanks, that removed the compile error.

However I am now getting linking errors:

Undefined symbols for architecture x86_64:
  "CGAL::get_mode(std::basic_ios<char, std::char_traits<char> >&)", referenced from:
      std::basic_ostream<char, std::char_traits<char> >& CGAL::insert<CGAL::Epick>(std::basic_ostream<char, std::char_traits<char> >&, CGAL::Point_3<CGAL::Epick> const&, CGAL::Cartesian_tag const&) in CGAL_interface.cpp.o
ld: symbol(s) not found for architecture x86_64

I had a look at the libraries linked at the end of the compile job, and I could only find one related to CGAL :

/usr/local/lib/libCGAL.13.0.1.dylib

There are a few other symlinks to CGAL libraries in /usr/local/lib:

<Screen Shot 2018-04-23 at 08.17.02.png>


Could this linker error be explained by the fact that these other .dylib are not included?

my cmake lists looks like this: 

# CMakeLists.txt
……
…...
# Find CGAL
find_package(CGAL REQUIRED)
include( ${CGAL_USE_FILE} )
include( CGAL_CreateSingleSourceCGALProgram )

set(library_dependencies
${CGAL_LIBRARIES} 
${CGAL_3RD_PARTY_LIBRARIES}
….
)

target_link_libraries(${LIB_NAME} ${library_dependencies})

On 23 Apr 2018, at 04:03, Laurent Rineau (CGAL/GeometryFactory) <[hidden email]> wrote:

Le Sunday, April 22, 2018 10:27:23 PM CEST Benjamin Bercovici a écrit :
I am getting errors while compiling a piece of software that uses CGAL (see
compiler trace below). This error arises using Apple’s Clang or
a-built-from-source GCC 7.3.0.

[  2%] Building CXX object CMakeFiles/ASPEN.dir/source/ShapeBuilder.cpp.o
In file included from
/usr/local/include/CGAL/internal/boost/mutable_queue.hpp:27:0, from
/usr/local/include/CGAL/Modifiable_priority_queue.h:27, from
/usr/local/include/CGAL/Surface_mesh_simplification/Detail/Common.h:46,
from
/usr/local/include/CGAL/Surface_mesh_simplification/Detail/Edge_collapse.h
:25, from
/usr/local/include/CGAL/Surface_mesh_simplification/edge_collapse.h:28,
from
/Users/bbercovici/GDrive/CUBoulder/Research/code/ASPEN_gui_less/lib/extern
al/CGAL_interface/include/CGAL_interface.hpp:21, from
/Users/bbercovici/GDrive/CUBoulder/Research/code/ASPEN_gui_less/lib/source
/ShapeBuilder.cpp:21:
/usr/local/include/CGAL/internal/boost/array_binary_tree.hpp:54:28: error:
expected template-name before '<' token
        : ::boost::iterator<std::forward_iterator_tag,

                           ^
/usr/local/include/CGAL/internal/boost/array_binary_tree.hpp:54:28: error:
expected '{' before '<' token
/usr/local/include/CGAL/internal/boost/array_binary_tree.hpp:54:28: error:
expected unqualified-id before '<' token make[2]: ***
[CMakeFiles/ASPEN.dir/source/ShapeBuilder.cpp.o] Error 1 make[1]: ***
[CMakeFiles/ASPEN.dir/all] Error 2
make: *** [all] Error 2


I’m using CGAL 4.11.1, downloaded through Homebrew . The same error was
raised using the bleeding-edge CGAL 4.13 (that I compiled from source
since it is not on Homebrew yet).

I believe a Boost upgrade may be the cause for this, based on when the last
upgrade was applied. I’m using Boost 1.67.0_1 , also downloaded from
Homebrew a couple days ago. I am certain I was able to compile without
trouble until I got the update, hence my suspicion that something is wrong
with boost.

Any advice ?

Hi Benjamin,

It seems there is a missing `#include` in that file of CGAL.

As a workaround, you can add a

 #include <boost/iterator.hpp>

in the file

 ASPEN_gui_less/lib/external/CGAL_interface/include/CGAL_interface.hpp

before its lines 21. That should fix your issue. Let us know.

--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory           http://secure-web.cisco.com/1K985_KCWrXn7O7YUsZu8-QyfwjwB-GqF0-hWQfqx0V4_VpGqrOBeKOlVsPI7ma9Oeo8lryDhUYGX11bjnep3UCnTcQf9y2WHhTjt6TwTZ3qWv5Up_kSH2aawq0ORSFdufg21Z-iW81lMDVQ7ptbafQftxigjTCNCA_xNlyGpAK7yJzridj25PJ2_WHx8i7btS5vrETiYph9xSJ9DY1MwK044Iv2qXDoSTbgDr6px4asA3cGNgMJEwt922GRSTUxdbrovkR9ETwFyCoem7ILxelap9IjCL5Abh-fkLXfXohWNhvPYRhdlRHTYE1G13kXVDCBrzb6s8ZCAE1Z1WtYSz7Oh7985cZl3IURLVrn4XqHmquK7V8hm5ccQwyp29MwQUrH7Q1gwBjT9tLSBmwTZRB0uhr0ze7UOaJhxkqp7K_9cMzhqZlQcwir3u1OzLKazGft_4vyeYsKh6J4UmLi0dg/http%3A%2F%2Fwww.geometryfactory.com%2F
Release Manager of the CGAL Project       http://www.cgal.org/




--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss