Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Can't compile CGAL application after upgrading to boost 1.67.0_1 on Mac

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Can't compile CGAL application after upgrading to boost 1.67.0_1 on Mac


Chronological Thread 
  • From: Benjamin Bercovici <>
  • To:
  • Subject: Re: [cgal-discuss] Can't compile CGAL application after upgrading to boost 1.67.0_1 on Mac
  • Date: Mon, 23 Apr 2018 12:23:59 -0600
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:pSecbBEzBviYz5RlgSPGOJ1GYnF86YWxBRYc798ds5kLTJ7ypc+wAkXT6L1XgUPTWs2DsrQY07GQ6/iocFdDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXdrXKo8DEdBAj0OxZrKeTpAI7SiNm82/yv95HJbAhEmDSwbaluIBmqsA7cqtQYjYx+J6gr1xDHuGFIe+NYxWNpIVKcgRPx7dqu8ZBg7ipdpesv+9ZPXqvmcas4S6dYDCk9PGAu+MLrrxjDQhCR6XYaT24bjwBHAwnB7BH9Q5fxri73vfdz1SWGIcH7S60/VDK/5KlpVRDokj8KOT4l/27Yl8J+gqxbrgyjqBJ8xIDZe5uaOOZ7fq7HfdMWWWhMU8BMXCJBGIO8aI4PAvIcMOlGqYn9pUEBrR6/BQmqGeji1yFHhmXq0q09zeQhEB3J3A09FN8Jq3vbss76O7kOXe230KXFzS7OYO9R2Tf574jIaAouruyLXb5qb8Xe1FQvGhrDg16Np4LlODaV2f4Ms2id9+dgVOSvi3Qmqw5ruDSvyN0shpHViYIa0F/E8T91wIEvJd23UEJ0fd+kEIBMuCGdLYd5XsQiQ2RwtCY11LIGvpu7czYWyJQ9xx/fZeaIfJSU4hLkTuaQIS10i25ieLK6gRu57EuuyvXkW8WqzFpHqjBJn9rMu3wXyRDf98eKRuFy80u8wTqDyh7f5+JeLUwpm6fWKIQtz78wm5YJsknOHyn7k1jsgqCMbEUr4O2o5vznYrr4op+cMJd5igTkPaQvnsyzGOU4MhQSU2SC9+Sx26Dv8Vf2QLVNif02na3Zv47AKcsHoa65BhdZ0ocl6xmhEzeryMoUkWUDIV5fex+Kj5LlN0/TLP33F/uyjEmgnC9ux//cP73hBpvNLmLEkLfkZbty8FBTxxEtwtxD5Z9YFrEMLenvVU/2sNzYCQU5PBapzObgEtlyyJ4RWX+XDq+DLKzSqUOI5v4oI+SUeIAVtyzyK/w86/HzjH85gkMSfbSy3ZsMc324BfRnI0CBYXX2mNsBEGEKvhA/TOPwklGCXyRTND6PWbkh7GQ7FJ6+FtWEAZu8haSImia9BJxfIG5cTUudFG/hMISCVfBLYy2bJoptkycPSKO6GLMmgBqhvQu/x7t8JffP4QUZs4ji3Z57/b79jxY3oBZ5CcaU1mCLB0t5hGgPWT493egrq0F3xw/cifVQiPtcEsZa6/QPXwsnY82Ph9dmAsz/D1qSNuyCT0yrF43/UGMBC+kpytpLWH5TXtCrjxTNxS2vWuNHnLuPA4Y9/qWa0nTsdZ8klyT2kZI5hlxjefNhcHW8j/cjpQPUA4nTmkme0aumaPZEhXOfxCK41WOL+XpgfktwXKHCBy1NY0LXqZH4+huHQeP3T7sgNQRFxIiJLa4YMtA=

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 <> 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) <> 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








Archive powered by MHonArc 2.6.18.

Top of Page