Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] CGal 3.5, Surface Reconstruction Demo Compiler error

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] CGal 3.5, Surface Reconstruction Demo Compiler error


Chronological Thread 
  • From: Laurent Saboret <>
  • To:
  • Subject: Re: [cgal-discuss] CGal 3.5, Surface Reconstruction Demo Compiler error
  • Date: Mon, 09 Nov 2009 09:57:33 +0100

Hi,

Frankie Li wrote:


Hi,

I'm having some trouble compiling the Surface Reconstruction Points demo. I understand that there are similar problems from the archive, but I can't quite figure out how to fix my problem based on the solutions I've seen so far.

When I try making, I end up with the warning:

-----------------------------------------------------------------------
/usr/bin/ld: skipping incompatible /usr/local/lib/libmetis.a when searching for -lmetis
/usr/bin/ld: skipping incompatible /usr/local/lib/liblapack.a when searching for -llapack
/usr/bin/ld: skipping incompatible /usr/local/lib/libmetis.a when searching for -lmetis
/usr/bin/ld: skipping incompatible /usr/local/lib/liblapack.a when searching for -llapack
-----------------------------------------------------------------------

This error may be due to the fact that you use gfortran instead of g77.
Changing the compiler implies that you recompile third party libraries
(Metis + Blas and Lapack if they are not already installed on you
machine, e.g. via a rpm). Third party libraries source code is available
at https://gforge.inria.fr/frs/download.php/24629/taucs_external_src.tgz

See my not below about gfortran.


I get a set of undefined references from QT:
-----------------------------------------------------------------------
MakeFiles/Point_set_demo.dir/Viewer.o: In function `Viewer::Viewer(QWidget*, bool)':
Viewer.cpp:(.text+0x27b): undefined reference to `QGLViewer::QGLViewer(QWidget*, QGLWidget const*, QFlags<Qt::WindowType>)'
CMakeFiles/Point_set_demo.dir/Viewer.o: In function `Viewer::Viewer(QWidget*, bool)':
Viewer.cpp:(.text+0x30b): undefined reference to `QGLViewer::QGLViewer(QWidget*, QGLWidget const*, QFlags<Qt::WindowType>)'
CMakeFiles/Point_set_demo.dir/Viewer_moc.o: In function `Viewer::qt_metacall(QMetaObject::Call, int, void**)':
Viewer_moc.cpp:(.text+0xa1): undefined reference to `QGLViewer::qt_metacall(QMetaObject::Call, int, void**)'
CMakeFiles/Point_set_demo.dir/Viewer_moc.o: In function `Viewer::qt_metacast(char const*)':
Viewer_moc.cpp:(.text+0x167): undefined reference to `QGLViewer::qt_metacast(char const*)'
CMakeFiles/Point_set_demo.dir/Viewer_moc.o:(.rodata+0x0): undefined reference to `QGLViewer::staticMetaObject'
CMakeFiles/Point_set_demo.dir/Viewer_moc.o:(.rodata._ZTV6Viewer[vtable for Viewer]+0x310): undefined reference to `QGLViewer::setPlayPathKeyboardModifiers(QFlags<Qt::KeyboardModifier>)'
CMakeFiles/Point_set_demo.dir/Viewer_moc.o:(.rodata._ZTV6Viewer[vtable for Viewer]+0x318): undefined reference to `QGLViewer::setAddKeyFrameKeyboardModifiers(QFlags<Qt::KeyboardModifier>)'
collect2: ld returned 1 exit status
-----------------------------------------------------------------------
The Polyhedron demo requires the QGLViewer library.

And finally:
-----------------------------------------------------------------------
usr/bin/ld: /usr/local/lib/libtaucs.a(taucs_sn_llt.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libtaucs.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
-----------------------------------------------------------------------
This is known bug of the TAUCS library provided with CGAL on Linux 64
bits: it is not compatible with shared libraries, thus with the
Polyhedron demo.

The easy solution is to not link with TAUCS: comment out the line
"Find(TAUCS)" in the Polyhedron demo's CMakeLists.txt file.

If you really need to link with TAUCS: add the "-fPIC" compilation
option and recompile TAUCS and third party libraries (Metis + Blas and
Lapack if they are not already installed on you machine, e.g. via a rpm).

I've also tried compiling the example from the webpage as a stand alone app, and I get:
-----------------------------------------------------------------------
main.cpp:(.text._ZN4CGAL12Taucs_solverIdE13factorize_oocEv[CGAL::Taucs_solver<double>::factorize_ooc()]+0x1dd): warning: the use of `tempnam' is dangerous, better use `mkstemp'
/usr/local/lib/libtaucs.a(taucs_sn_llt_D.o): In function `recursive_supernodal_solve_l':
taucs_sn_llt.c:(.text+0x4f9): undefined reference to `dtrsm_'
taucs_sn_llt.c:(.text+0x579): undefined reference to `dgemm_'
/usr/local/lib/libtaucs.a(taucs_sn_llt_D.o): In function `recursive_supernodal_solve_lt':

.... and so on
-----------------------------------------------------------------------
These errors mean that Blas and Lapack are missing.


I've followed the advice of the forum to go from g77 to gfortran. I've also taken out the g2c from the Tauc library that comes with CGal.
Note about gfortran:
TAUCS and CGAL have only been tested with g77. Unless you really need to
use gfortran, I recommend you to stick to g77. It is easier.


The gfortran and gcc version I have are 4.3.3.


Any help would be greatly appreciated!


Thanks,

Frankie

Best regards,
Laurent Saboret



Ce courrier électronique et toutes les pièces éventuellement jointes qu’il
contient sont CONFIDENTIELS et destinés exclusivement à l’usage de leur
destinataire. Si une erreur de transmission ou une adresse erronée a mal
dirigée ce courrier, merci d’en informer l’expéditeur en lui faisant une
réponse par courrier électronique dès réception. Si vous n’êtes pas le
destinataire de ce courrier, vous ne devez pas l’utiliser, le conserver, en
faire état, le distribuer, le copier, l’imprimer ou en révéler le contenu à
une tierce partie.
Ce courrier électronique est à usage strictement informatif et ne saurait
engager de quelque manière que ce soit INFOTERRA France SAS, ni ses filiales.

This e-mail and any attachments hereto are CONFIDENTIAL and intended solely
for the use of the addressee. If you have received this e-mail in error
please send it back to the person that sent it to you.
If you have received it in error, please notify the sender by return email.
If you are not the addressee of this email, you must not use, keep,
disseminate, copy, print or otherwise deal with it.
This email is for information only and will not bind INFOTERRA France SAS in
any contract or obligation, nor its subsidiaries.



Archive powered by MHonArc 2.6.16.

Top of Page