Error in make when dockerizing CGAL python binding
Closed this issue · 1 comments
angdmz commented
Hello there! I couldn't find any Dockerfile for the python bindings so I'm creating my own, and it looks like this:
FROM python:3.8
RUN apt update
RUN apt -y install vim apt-utils cmake libboost-all-dev libeigen3-dev libcgal-dev swig
RUN git clone https://github.com/cgal/cgal-swig-bindings
RUN mkdir cgal-swig-bindings/build/CGAL-5.0_release -p
WORKDIR cgal-swig-bindings/build/CGAL-5.0_release
RUN cmake -DCGAL_DIR=/usr/lib/CGAL -DBUILD_JAVA=OFF -DBUILD_PYTHON=ON -DPYTHON_OUTDIR_PREFIX=../../examples/python ../..
RUN make
but on the step 8 I get the following error:
Step 8/8 : RUN make
---> Running in 500f37fee059
[ 1%] Building CXX object SWIG_CGAL/Kernel/CMakeFiles/CGAL_Kernel_cpp.dir/Point_2.cpp.o
In file included from /cgal-swig-bindings/SWIG_CGAL/Kernel/Bbox_2_decl.h:11,
from /cgal-swig-bindings/SWIG_CGAL/Kernel/Bbox_2.h:10,
from /cgal-swig-bindings/SWIG_CGAL/Kernel/Point_2_decl.h:12,
from /cgal-swig-bindings/SWIG_CGAL/Kernel/Point_2.h:10,
from /cgal-swig-bindings/SWIG_CGAL/Kernel/Point_2.cpp:9:
/cgal-swig-bindings/SWIG_CGAL/Common/Macros.h:17:10: fatal error: CGAL/type_traits/is_iterator.h: No such file or directory
17 | #include <CGAL/type_traits/is_iterator.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [SWIG_CGAL/Kernel/CMakeFiles/CGAL_Kernel_cpp.dir/build.make:76: SWIG_CGAL/Kernel/CMakeFiles/CGAL_Kernel_cpp.dir/Point_2.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:619: SWIG_CGAL/Kernel/CMakeFiles/CGAL_Kernel_cpp.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
Error response from daemon: The command '/bin/sh -c make' returned a non-zero code: 2
I take it that I'm missing something in my dependencies but I can't figure out what it is, any clue?
lrineau commented
The version of CGAL you have in /usr
is too old. You need CGAL-5.6 or later.
Too solution: use a more recent version of CGAL, or use an older version of cgal-swig-bindings.