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 08:23:32 -0600
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:CW45exXUmDjWTRuYwMK8mD++LJbV8LGtZVwlr6E/grcLSJyIuqrYbROAt8tkgFKBZ4jH8fUM07OQ7/i7HzRYqb+681k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i764jEdAAjwOhRoLerpBIHSk9631+ev8JHPfglEnjWwba98IRmssQndqtQdjJd/JKo21hbHuGZDdf5MxWNvK1KTnhL86dm18ZV+7SleuO8v+tBZX6nicKs2UbJXDDI9M2Ao/8LrrgXMTRGO5nQHTGoblAdDDhXf4xH7WpfxtTb6tvZ41SKHM8D6Uaw4VDK/5KptVRTmijoINyQh/W/XlsN/g79VrhyvpxJhwYHaY4abOeFkca/BeNMXX2pBUtpTWiFHH4iyb5EPD+0EPetAsoTyuV0OrRmkCgmpBePvzCJDi2Lo0q0gz+shFh/G3A08ENIPrX/Zq876O7kJXu+r0KXFzynPYvNN1Djh74jIdhchoeuWUr1tdsrd01cgGB7YjliJr4HuIj2b1uMIs2eB7upgU/qii28hqwFrozig3N0giofTho4N1l/E+j92wIIvKd2/Uk57bsaoH4dRtyGBK4R2RdkuTH1vuCY/0rEGtoC0fC8PyJs52x7fcfyGc4aS7R3/SOaRJi14hXJ/dL2jgBay9E6twfD/WMmsyFtGsDZJn93Wun0O1xHf8NaLRuVz80u7xDqC1B7f5vlaLU01iabXNpsszqAzm5YOtEnOHSH7lFnqgKKTd0gp+vWn5/jib7jiupOROI15hwTgPqgwhMCyA+E1PRUSU2WU/Omx2r7u8lbkT7hMk/Y4iLPWsIrAKsQevqO5AxFa0oIk6xunCjepytUYnX0eIFJEfxKLk5HlO1/TLP37E/uzmVuskDBsx/DJOr3uHI/BIWTEkLfkZbp96khcxxQvzd1H+Z5YFrUMLOjwV0LxrtDUEAE1PgKuz+r6C9hxyJsSWWeVDa+YNKPSv0WI5uUqI+SUf4Aapi3yJOY56/PskXM0mUQQcrWu3ZsTb3C4BO5pLFieYXb2nNgODHoKshIkTOP2kF2CTSJTZ3GqUq0g6TE0EoamAZ7eSYCsm7yOwDq7HoZNZm1dEVCNEXLod52eVPsWaSKSJNVhkj0eWrS7RY8hz0LmiQnh1rAyLvbI4jZK8tX4xd1t7qvSkwsz/Hp6FYOGwmSVRiZ1mG0PADQ51aQ6rU1mwUqYyvtEhKlTGtVXov9ISQwnLoX0zupgCtm0VBiSUM2OTQOMT9OkCDQwSJobzsUFZFh8ENTq2hrO1SfyXOdIv7eMAJsu+67bmXX9OpAumD79yKA9ggx+EYN0Pmq8i/snrlmBN8vyi0yc0p2SW+EZ1S/J+n2EyDPS7kpfVAlqWKnCG30TexmP9Iir1gb5V7arTI8fHE5Z08fbdvlBbdnul1xKQ7HuNMmMOzvsyVf1Pg6Bw/a3VKSve2gZ23+DWk0NkgRW/HHecAZnVn3nrGXZAzhjU1noZhG0/A==

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




PNG image




Archive powered by MHonArc 2.6.18.

Top of Page