Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Segmentation fault in example mesh_3D_image_variable_size.cpp

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Segmentation fault in example mesh_3D_image_variable_size.cpp


Chronological Thread 
  • From: Danyang Su <>
  • To:
  • Subject: Re: [cgal-discuss] Segmentation fault in example mesh_3D_image_variable_size.cpp
  • Date: Mon, 21 Mar 2016 00:56:11 -0700
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:3cz5XRTRdHKQl5+Bkx/3/zUhu9psv+yvbD5Q0YIujvd0So/mwa64YRCN2/xhgRfzUJnB7Loc0qyN4/CmADRLuM7c+Fk5M7VyFDY9wf0MmAIhBMPXQWbaF9XNKxIAIcJZSVV+9Gu6O0UGUOz3ZlnVv2HgpWVKQka3CwN5K6zPF5LIiIzvjqbpq82VOl0D3WLgKZpJbzyI7izp/vEMhoVjLqtjgjDomVBvP9ps+GVzOFiIlAz97MrjtLRq8iBXpu5zv5UYCfaySY1jEucdVGhucz1tpZ6jiR6WRgSG4j4QU34djwFTKwnD9hDzGJnr4QXgse8o9CCcLMTwQvgPRHz2465tWRbuh2EcKhY29WjWjop7i6cN80HpnAB234OBONLdD/F5ZK6IIIsX

Hi Andreas,

It seems that the problem is caused by link options. After changing the link options from

-frounding-math -O3 -DNDEBUG --std=c++11 -lCGAL -lCGAL_ImageIO -lgmp

to

-frounding-math -O3 -DNDEBUG --std=c++11 -L/usr/local/lib -rdynamic /usr/local/lib/libmpfr.so /usr/local/lib/libgmp.so /usr/local/lib/libCGAL_ImageIO.so.11.0.1 /usr/local/lib/libCGAL.so.11.0.1 /usr/local/lib/libboost_thread.so /usr/local/lib/libboost_system.so -lpthread -lGLU -lGL -lSM -lICE -lX11 -lXext -lz /usr/local/lib/libCGAL_ImageIO.so.11.0.1 /usr/local/lib/libCGAL.so.11.0.1 /usr/local/lib/libboost_thread.so /usr/local/lib/libboost_system.so -lpthread -lGLU -lGL -lSM -lICE -lX11 -lXext -lz /usr/local/lib/libmpfr.so /usr/local/lib/libgmp.so /usr/local/lib/libboost_thread.so /usr/local/lib/libboost_system.so -lpthread -Wl,-rpath,/usr/local/lib

the code can work now.

I am not sure why both link options can be used to compile the code, but only the second one works when run the program. The second one is derived from the example makefile generated by Cmake.

Thanks,

Danyang

On 16-03-20 11:00 PM, Andreas Fabri wrote:
Dear Danyang,

You should give more context, in order
to give you a reasonable answer.

In which directory did you execute it?
Did you pass it a file with data?

best,

andreas

On 20/03/2016 05:51, Danyang Su wrote:
Dear All,

I could compile the example mesh_3D_image_variable_size.cpp successfully
but got "Segmentation fault" when run it. Anything wrong with the code
or my installation?

Thanks,

Danyang





Archive powered by MHonArc 2.6.18.

Top of Page