0

I'm have trouble compiling meshlab-2016.12 on Centos.EL7.
I got some of the way.
Updated QT to Qt-5.9.1 as latest on Centos is Qt version 5.6.1 - which I had previously installed

sudo yum install qt5-qtbase
sudo yum install qt5-qtx11extras
sudo yum install qt5-qtbase-devel

However at least Qt5.7 is needed for meshlab

Then set these env. variables

setenv QTDIR /usr/local/Qt-5.9.1
setenv QTINC /usr/local/Qt-5.9.1/include
setenv QTLIB /usr/local/Qt-5.9.1/lib 
setenv PATH /usr/local/Qt-5.9.1/bin:$PATH
setenv PATH /usr/local/bin:/usr/local/Qt-5.9.1/bin:$PATH

Then followed instructions on a test machine, installing into /opt/TESTING

  1. Installed vcglib into /opt/TESTING

  2. downloaded meshlab-2016.12 into /opt/TESTING and unpacked it there

  3. Ran the following

    qmake -project

(This picks up the correct version of QT)

qmake src/external/external.pro

(To make the external libraries - including jhead-2.95

gmake
gmake install

(To make the external libraries - including jhead-2.95 )

qmake src/meshlab_mini.pro

(To build meshlab with a minimal set of plugins )

This is where it fails, as below;

../../vcglib/vcg/complex/algorithms/clean.h:1789:0: 
warning: ignoring #pragma omp parallel [-Wunknown-pragmas]

pragma omp parallel for schedule(dynamic, 10)

g++ -Wl,-O1 -Wl,-z,origin -Wl,-rpath,\$ORIGIN/../distrib -Wl,-rpath,
/usr/local/Qt-5.9.1/lib -o ../distrib/meshlab main.o mainwindow_Init.o 
mainwindow_RunTime.o glarea.o multiViewer_Container.o plugindialog.o 
customDialog.o filterScriptDialog.o saveSnapshotDialog.o layerDialog.o 
savemaskexporter.o changetexturename.o stdpardialog.o ml_std_par_dialog.o 
xmlstdpardialog.o additionalgui.o xmlgeneratorgui.o ml_render_gui.o 
ml_rendering_actions.o ml_default_decorators.o ml_selection_buffers.o
trackball.o trackmode.o coordinateframe.o glarea_setting.o filterthread.o
qrc_meshlab.o moc_interfaces.o moc_mainwindow.o moc_glarea.o
moc_multiViewer_Container.o moc_plugindialog.o moc_customDialog.o 
moc_filterScriptDialog.o moc_saveSnapshotDialog.o moc_savemaskexporter.o 
moc_changetexturename.o moc_layerDialog.o moc_stdpardialog.o 
moc_ml_std_par_dialog.o moc_xmlstdpardialog.o moc_additionalgui.o 
moc_xmlgeneratorgui.o moc_ml_render_gui.o moc_ml_rendering_actions.o 
moc_filterthread.o   -L../external/lib/linux-g++ -ljhead -L../distrib 
-lcommon -lGLU -L/usr/local/Qt-5.9.1/lib -lQt5OpenGL -lQt5Widgets -lQt5Gui 
-lQt5Xml -lQt5XmlPatterns -lQt5Network -lQt5Script -lQt5Core -lGL -lpthread 
/bin/ld: cannot find -ljhead
collect2: error: ld returned 1 exit status
gmake[1]: *** [../distrib/meshlab] Error 1    
gmake[1]: Leaving directory `/opt/TESTING/meshlab-2016.12/meshlab'    
gmake: *** [sub-meshlab-make_first-ordered] Error 2

So it's saying ld can't find ljhead. Other parts of the compile do seem to be finding it though eg

-I../src/external/glew-1.7.0/include -I../src/external/jhead-2.95 

Looking at ld

/bin/ld -V
GNU ld version 2.25.1-22.base.el7 
  Supported emulations:
   elf_x86_64
   elf32_x86_64
   elf_i386
   i386linux
   elf_l1om
   elf_k1om

and /

usr/bin/ld -V
GNU ld version 2.25.1-22.base.el7 
  Supported emulations:
   elf_x86_64
   elf32_x86_64
   elf_i386
   i386linux
   elf_l1om
   elf_k1om

Any advice would be useful at this point. Hopefully I've just missed something out

Updated: Tried workaround from William Brown below, which gave some progress. Failed at later point

gmake[1]: Leaving directory `/opt/src/meshlab/meshlabplugins/filter_layer'
cd meshlabplugins/filter_measure/ && ( test -e Makefile || /opt/bin/Qt5.7.1/5.7/gcc_64/bin/qmake 
/opt/src/meshlab/src/meshlabplugins/filter_measure/filter_measure.pro -o Makefile ) && gmake -f Makefile 
gmake[1]: Entering directory `/opt/src/meshlab/meshlabplugins/filter_measure'
gmake[1]: *** No rule to make target `filter_measure.xml', needed by `../../distrib/plugins/libfilter_measure.so'.  Stop.
gmake[1]: Leaving directory `/opt/src/meshlab/meshlabplugins/filter_measure'
gmake: *** [sub-meshlabplugins-filter_measure-make_first-ordered] Error 2

1 Answers1

0

I have managed to get past that problem on Centos 7 (7.3.1611).

There seem to be 2 issues, and I don't claim that this is the right fix, just a work-around.

After unpacking the tar file I cd to the top level (I have unpacked to /local/meshlab). I then create a link:

# ln -s ./src/external eternal

The reason being that the -L in the statement that fails seems to be pointed to an external folder at that top level, not in ./src.

Having done that I can build external.pro without any problem, and the output .a files all go into /local/meshlab/lib/linux-g++. Without the link they were deep down in a temporary build folder.

However the -L doesn't look there, it looks in /local/meshlab/src/external/lib/linux-g++/, where there are some pre-shipped .a files already. So I copy the .a files to there:

# cp /local/meshlab/lib/linux-g++/*.a /local/meshlab/src/external/lib/linux-g++/

Now when I use:

# qmake src/meshlab_mini.pro
# gmake

It works and builds a runnable meshlab binary in /local/meshlab/distrib.

  • Thanks William. That got rid of the errors I reported. Unfortunately it generated another one (I'm trying to build the meshlab_full.pro `gmake[1]: *** No rule to make target `filter_measure.xml', needed by `../../distrib/plugins/libfilter_measure.so'. Stop.` Progress though!! – Terry Stewart Feb 13 '18 at 16:58