Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added linux build example (Ubuntu 16) #68

Merged
merged 1 commit into from
Aug 20, 2018

Conversation

martinruenz
Copy link
Contributor

See src/README.md

@martinruenz
Copy link
Contributor Author

I think this might be useful, as it took me a bit to get the compilation to work.
If this is not compiling, please check my vcglib pull-request: cnr-isti-vclab/vcglib#13

@cignoni
Copy link
Member

cignoni commented Feb 3, 2017

Thanks for the contribution!
Just a question, I see that you have to explicitly set in the QMAKE_FLAGS things that are already defined in the qmake pro's . Are they really necessary?

@martinruenz
Copy link
Contributor Author

Hi,
probably not, flags that were definitely required (at least on my machine) are:

INCLUDEPATH+=/usr/include/eigen3
QMAKE_CXXFLAGS+=-fpermissive
CONFIG+=c++11
QMAKE_CXXFLAGS+=-std=c++11 #(not sure if both, though)
QMAKE_CXXFLAGS+=-fPIC

I think to add CONFIG+=release is helpful, as it shows how to switch debug / release build. The other flags might be redundant.

@DBobkov
Copy link

DBobkov commented Feb 12, 2017

Perhaps, you could find my comment useful at Comment, where I give a script for Meshlab 2016.12 for Ubuntu 14.04 with gcc-4.9.

@jnweiger
Copy link

jnweiger commented Apr 6, 2017

I've just done it successfully like this on Linux Mint 18.1 (Serena) with Qt version 5.5.1

sudo apt-get install qt5-qmake g++ qtscript5-dev libqt5xmlpatterns5-dev libqt5opengl5-dev
qmake -qt=5 -v

git clone --depth 1 git@github.com:cnr-isti-vclab/meshlab.git
git clone --depth 1 git@github.com:cnr-isti-vclab/vcglib.git -b devel

cd meshlab

QMAKE_FLAGS="-spec linux-g++ CONFIG+=release CONFIG+=qml_release CONFIG+=c++11 QMAKE_CXXFLAGS+=-fPIC QMAKE_CXXFLAGS+=-std=c++11 QMAKE_CXXFLAGS+=-fpermissive INCLUDEPATH+=/usr/include/eigen3 LIBS+=-L`pwd`/lib/linux-g++"
MAKE_FLAGS="-j1"

cd src/external
qmake -qt=5 external.pro $QMAKE_FLAGS && make $MAKE_FLAGS
cd ../common
qmake -qt=5 common.pro $QMAKE_FLAGS && make $MAKE_FLAGS
cd ..
qmake -qt=5 meshlab_mini.pro $QMAKE_FLAGS && make $MAKE_FLAGS
qmake -qt=5 meshlab_full.pro $QMAKE_FLAGS && make $MAKE_FLAGS

# ./distrib/meshlab

Thanks for the helpful instructions!

I did not investigate why the QMAKE_FLAGS=() array declaration failed with my bash. The long double quoted string above just did it.

@BETLOG
Copy link

BETLOG commented Apr 18, 2017

Confirming that @jnweiger @DBobkov script above works for
Meshlab 2016.12
on
Ubuntu 16.04.2 LTS
Linux betlogbrick 4.4.0-72-generic #93-Ubuntu SMP Fri Mar 31 14:07:41 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Many thanks. The repo version differs enough to make following instructions/tutorials difficult, and for a noobie at compiler wrangling this took far too long to get working. You just made it much easier.

[edit]
P.S. I had auth issues with your git clone syntax, so i used this:

# git clone --depth 1 git@github.com:cnr-isti-vclab/meshlab.git
# git clone --depth 1 git@github.com:cnr-isti-vclab/vcglib.git -b devel
git clone https://github.com/cnr-isti-vclab/vcglib.git -b devel
git clone https://github.com/cnr-isti-vclab/meshlab.git

P.P.S: I spoke too soon. The GUI loads, but even after importing a ply file the model viewport is just a black void. Clicking crashes it.

P.P.P.S: Hit "new" and the gui appears. Crashing is still a major issue though. Unusable at this point.

@nh2
Copy link
Contributor

nh2 commented Jun 16, 2017

So what's up here, why does the released 2016.12 not compile on pretty much any Linux distribution?

In make I'm getting

g++ -c -m64 -pipe -O2 -fPIC -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_CORE_LIB -I. -Issynth -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtOpenGL -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtXml -isystem /usr/include/x86_64-linux-gnu/qt5/QtScript -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -o VoxelStepper.o ssynth/SyntopiaCore/GLEngine/Raytracer/VoxelStepper.cpp
ssynth/SyntopiaCore/GLEngine/Raytracer/VoxelStepper.cpp:125:7: warning: identifier ‘nullptr’ is a keyword in C++11 [-Wc++0x-compat]
       if (!found) return nullptr;
       ^
ssynth/SyntopiaCore/GLEngine/Raytracer/VoxelStepper.cpp: In member function ‘QList<SyntopiaCore::GLEngine::Object3D*>* SyntopiaCore::GLEngine::VoxelStepper::setupRay(SyntopiaCore::Math::Vector3f, SyntopiaCore::Math::Vector3f, double&)’:
ssynth/SyntopiaCore/GLEngine/Raytracer/VoxelStepper.cpp:125:26: error: ‘nullptr’ was not declared in this scope
       if (!found) return nullptr;
                          ^

and it seems that simply -std=c++11 is missing in the compiler invocation.

@mdeff
Copy link

mdeff commented Feb 19, 2018

For reference, there are Archlinux PKGBUILD for 2016.12 and the latest git. They worked for me (and many people it seems). They do however apply some patches.

@luckygoodlily
Copy link

Thank you for your contribution!
I have one error in this code,when I install this program.
Like this...
{Run Build
Command:"C:/PROGRA2/MIB0551/2017/COMMUN1/Common7/IDE/COMMOM1/CMAKE/Ninja/ninja.exe"
"cmTC_d5510"

ninja:error:build.ninja:30:loading 'rules.ninja':
系統找不到指定的檔案。 (The system cannot find the specified file) }
I try to solve this problem, but I can't . Is there any solution?

@cielavenir
Copy link

Hopefully debuild with http://ppa.launchpad.net/zarquon42/meshlab/ubuntu/pool/main/m/meshlab/meshlab_2016.12~trusty2.tar.xz is still working

then you can execute debuild -uc -us

@cignoni cignoni merged commit b1b7728 into cnr-isti-vclab:master Aug 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants