chrisidefix / cgal-bindings

Automatically exported from code.google.com/p/cgal-bindings
Boost Software License 1.0
0 stars 0 forks source link

installation on OSX 10.7.5 against brew #29

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
0. brew install --use-llvm mpfr
1. from homebrew: cgal: stable 4.0.2, swig: stable 2.0.8
2. cgal-bindings 851dc5f47249b3c9eef608fcd4761249032d9f0d
3. cmake -DCGAL_DIR=/usr/local/lib/CGAL -DBUILD_PYTHON=ON -DBUILD_JAVA=OFF 
-DCGAL_CXX_FLAGS=-DCGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES ../..

-- Build type: Release
-- USING CXXFLAGS = ' -DCGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES -O3 -DNDEBUG'
-- USING EXEFLAGS = '  '
-- Targetting Unix Makefiles
-- Using /usr/bin/c++ compiler.
-- DARWIN_VERSION=11
-- Mac Leopard detected
-- BUILD_Ruby is set to OFF: no CGAL-bindings for Ruby will be generated.
-- BUILD_JAVA is set to OFF: no CGAL-bindings for Java will be generated.
-- Found Python libs.
-- CGAL-SWIG Python files and libraries will be written in 
/Users/ttemple/research/projects/resman/code/thirdparty/cgal-bindings/build/CGAL
_take_two/build-python/CGAL.
-- Found JNI: JNI include dirs 
/System/Library/Frameworks/JavaVM.framework/Headers 
/System/Library/Frameworks/JavaVM.framework/Headers.
-- CGAL-SWIG Java libraries and files will be respectively written in 
/Users/ttemple/research/projects/resman/code/thirdparty/cgal-bindings/build/CGAL
_take_two/build-java/lib and 
/Users/ttemple/research/projects/resman/code/thirdparty/cgal-bindings/build/CGAL
_take_two/build-java/CGAL.
-- NOTICE: CGAL imageIO has not be found, few bindings will not be compiled
-- Configuring done
-- Generating done
-- Build files have been written to: 
/Users/ttemple/research/projects/resman/code/thirdparty/cgal-bindings/build/CGAL
_take_two

4. make

Alternatively:

3. cmake -DCGAL_DIR=/usr/local/Cellar/cgal/4.0.2/lib/CGAL/ -DBUILD_PYTHON=ON 
../..

and I got issue 24

5. edit /usr/local/Cellar/cgal/4.0.2/include/CGAL/Alpha_shape_2.h:594 to 
"this->locate"

then running make again produced the same error

What is the expected output? What do you see instead?

Linking CXX shared module ../../build-python/CGAL/_CGAL_Spatial_searching.so
Undefined symbols for architecture x86_64:
  "boost::system::system_category()", referenced from:
      boost::unique_lock<boost::mutex>::lock() in CGAL_Spatial_searchingPYTHON_wrap.cxx.o
      boost::mutex::lock() in CGAL_Spatial_searchingPYTHON_wrap.cxx.o
      boost::mutex::mutex() in CGAL_Spatial_searchingPYTHON_wrap.cxx.o
      __GLOBAL__I_a in CGAL_Spatial_searchingPYTHON_wrap.cxx.o
  "boost::system::generic_category()", referenced from:
      __GLOBAL__I_a in CGAL_Spatial_searchingPYTHON_wrap.cxx.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [build-python/CGAL/_CGAL_Spatial_searching.so] Error 1
make[1]: *** 
[SWIG_CGAL/Spatial_searching/CMakeFiles/_CGAL_Spatial_searching.dir/all] Error 2

What version of the product are you using? On what operating system?
851dc5f47249b3c9eef608fcd4761249032d9f0d, 
OSX 10.7.5, 
XCode Version 4.5 (4G182)

Please provide any additional information below.
I included the llvm flag I used with mpfr because I noticed that cmake chose a 
/usr/lib/c++.  I tried it with
3. cmake -DCMAKE_C_COMPILER=llvm-gcc -DCMAKE_CXX_COMPILER=llvm-g++ 
-DCGAL_DIR=/usr/local/lib/CGAL -DBUILD_JAVA=OFF -DBUILD_PYTHON=ON 
-DCGAL_CXX_FLAGS=-DCGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES ../..

but then "make" gave me all sorts of errors.

Original issue reported on code.google.com by tttem...@gmail.com on 12 Dec 2012 at 10:23

GoogleCodeExporter commented 9 years ago
The support for Mac llvm compiler is only available since version 4.1 of CGAL.
Also if you added the this->locate I don't see how you can still have "exactly" 
the same error message.

Original comment by sloriot...@gmail.com on 13 Dec 2012 at 6:05

GoogleCodeExporter commented 9 years ago
Sorry, (5) was unclear.  Changing Alpha_shape_2.h:594 resolved issue 24 and the 
produced the previous linker error.

New clues:
A) I tried writing my own C++ executable that included CGAL and I also got 
linker errors.  Do I need to mess with linker flags?

B) Is it possible that this is getting in the way?
>printenv | grep LD_
15:LD_LIBRARY_PATH=/Users/ttemple/Downloads/VTK-build/bin
34:DYLD_LIBRARY_PATH=:/usr/local/lib/vtk-5.4

Original comment by tttem...@gmail.com on 13 Dec 2012 at 4:11

GoogleCodeExporter commented 9 years ago
Are you suggesting to try to install CGAL 4.1 and use llvm?  I'll try that, 
although ideally I'd like to stick with the homebrew version.

Original comment by tttem...@gmail.com on 13 Dec 2012 at 4:15

GoogleCodeExporter commented 9 years ago
I think you should use 4.0 with gcc or 4.1 with llvm.

Original comment by sloriot...@gmail.com on 13 Dec 2012 at 4:31

GoogleCodeExporter commented 9 years ago
Forgive me, I haven't written C in a long time and never on a mac.  It seems to 
me that I have clang and llvm as my choices: gcc and g++ are aliases to 
llvm-gcc and llvm-g++.

Original comment by tttem...@gmail.com on 13 Dec 2012 at 4:43

GoogleCodeExporter commented 9 years ago
I downloaded CGAL 4.1 and it compiled (although not all the examples did).  
Then the bindings compiled without a hitch.

Original comment by tttem...@gmail.com on 14 Dec 2012 at 10:20

GoogleCodeExporter commented 9 years ago

Original comment by sloriot...@gmail.com on 15 Dec 2012 at 7:53