Compilation on Ubuntu 12.04 64bit

All about Linux portage
anagno
Posts: 20
Joined: Fri Mar 30, 2012 1:47 pm

Compilation on Ubuntu 12.04 64bit

Post by anagno »

I am trying to compile CC on Ubuntu 12.04.
I have installed Code::Blocks IDE 10.05 and qt4-dev-tools python-qt4-gl glew-utils dependencies.
On the Current Viarable on the menu Settings, i putted qt_dir, on base /usr/share/qt4 and on include /usr/include/qt4 as mentioned on the compilation informations.
But when i build the workspace i get:

Code: Select all

"Lib - triangle - default" does not support the current platform. Skipping...
"Lib - Glew" does not support the current platform. Skipping...
"Lib - CCFbo - release" does not support the current platform. Skipping...
"Lib - CCFbo - debug" does not support the current platform. Skipping...
"Lib - CCLib - release" does not support the current platform. Skipping...
"Lib - CCLib - debug" does not support the current platform. Skipping...
"Tool - qt-prebuild - default" does not support the current platform. Skipping...
"Lib - qCC_db - release" does not support the current platform. Skipping...
"Lib - qCC_db - debug" does not support the current platform. Skipping...
"Lib - PCV - release" does not support the current platform. Skipping...
"Lib - PCV - debug" does not support the current platform. Skipping...
"qCC - release" does not support the current platform. Skipping...
"qCC - debug" does not support the current platform. Skipping...
"Plugin - qPCV - release" does not support the current platform. Skipping...
"Plugin - qPCV - debug" does not support the current platform. Skipping...
"Lib - Qhull - default" does not support the current platform. Skipping...
"Plugin - qHPR - release" does not support the current platform. Skipping...
"Plugin - qHPR - debug" does not support the current platform. Skipping...
"Lib - RandomKit - release" does not support the current platform. Skipping...
"Lib - RandomKit - debug" does not support the current platform. Skipping...
"Plugin - qSSAO - release" does not support the current platform. Skipping...
"Plugin - qSSAO - debug" does not support the current platform. Skipping...
"Plugin - qEDL - release" does not support the current platform. Skipping...
"Plugin - qEDL - debug" does not support the current platform. Skipping...
"Plugin - qPoissonRecon - release" does not support the current platform. Skipping...
"Plugin - qPoissonRecon - debug" does not support the current platform. Skipping...
"Plugin - qKinect" does not support the current platform. Skipping...
"ccViewer - release" does not support the current platform. Skipping...
"ccViewer - debug" does not support the current platform. Skipping...

-------------- Build: default.linux in Lib - triangle ---------------

Target is up to date.

-------------- Build: release.linux in Lib - CCFbo ---------------

Compiling: src/ccBilateralFilter.cpp
In file included from include/ccGlFilter.h:28:0,
                 from include/ccBilateralFilter.h:40,
                 from /home/anagno/Documents/CloudCompare/qCC/libs/CCFbo/src/ccBilateralFilter.cpp:25:
include/ccGlew.h:29:21: fatal error: GL/glew.h: No such file or directory
compilation terminated.
Process terminated with status 1 (0 minutes, 0 seconds)
1 errors, 0 warnings
What i am doing wrong???

Thank you in advance !!!
daniel
Site Admin
Posts: 7711
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Compilation on Ubuntu 12.04 64bit

Post by daniel »

Hi,

It seems that the current configuration you are trying to compile with is not supported. Maybe it comes from 32/64 bits incompatibility, or the Code::Blocks project file is rotten: you should check that the project properties are correct (for instance, right click on the qCC project in the solution tree and select 'Properties', then the second pannel 'Build targets', then check that in the supported 'Platforms' list you have either 'All' or 'Unix').

Moreover, this night the project structure has totally changed (we use solely CMake from now on). So you can delete your actual repository and grab a new (clean) one. Then CMake will let you choose your preferate editor (even if I only validated compilation with Code::Blocks on Linux yet ;). And once again, 64 bits compilation is not yet available (it should be ready in a few weeks).
Daniel, CloudCompare admin
anagno
Posts: 20
Joined: Fri Mar 30, 2012 1:47 pm

Re: Compilation on Ubuntu 12.04 64bit

Post by anagno »

Hi,
Thank you for your response
daniel wrote: Moreover, this night the project structure has totally changed (we use solely CMake from now on). So you can delete your actual repository and grab a new (clean) one. Then CMake will let you choose your preferate editor (even if I only validated compilation with Code::Blocks on Linux yet ;). And once again, 64 bits compilation is not yet available (it should be ready in a few weeks).
I grab the new version and i tried to re do the compilation process but i am not sure what i have to do in this step (my programming skills are basic) :

Code: Select all

On Linux, you may encounter issues with shared libraries (.so files). In this case, set the LD_LIBRARY_PATH variable so that it points to the qCC and ccViewer installation folders (export LD_LIBRARY_PATH=...). 
I would appreciate your help .

Thank you in advance.
daniel
Site Admin
Posts: 7711
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Compilation on Ubuntu 12.04 64bit

Post by daniel »

Well,

I'm far from being a Linux guru myself, but I realized that the .so files (roughly the equivalent of DLLs on Windows) must be placed at very specific locations on Linux (see http://tldp.org/HOWTO/Program-Library-H ... aries.html for instance).

By default, all the .so files should go in '/usr/local/lib' and qCC should go in '/usr/local/bin'. I should have configured the CMake files so this is done by default, but I was in a bit of a hurry and my own Debian distrib wasn't allowing me to do this by default (I guess I should must be root to install anything there). So for the moment I relied on the LD_LIBRARY_PATH (even if it seems to be "bad").

To do this, you have (for instance) to open a console, go to the installed qCC folder, the explicitly call:

Code: Select all

export LD_LIBRARY_PATH=.
./qCC.exe
Moreover, If I remember well, as long as you stay in Code::Blocks, you can launch CloudCompare without any problem (with the 'run' command, once the 'qCC' configuration is selected). However, as the plugins are not placed in the plugins subdirectory (this is the job of the 'install' configuration), you might have to move them once compiled.

I'll try to make this cleaner/simpler asap...
Daniel, CloudCompare admin
anagno
Posts: 20
Joined: Fri Mar 30, 2012 1:47 pm

Re: Compilation on Ubuntu 12.04 64bit

Post by anagno »

Sorry for my late responce. Indeed it work on Ubuntu 12.04 32bit. I just did it. What i had to do was to download the trunk and then in the forlder of the trunk from a terminal i wrote:

Code: Select all

sudo apt-get install qt4-dev-tools python-qt4-gl
cmake .
make
sudo make install 
and CC was installed.

As you mentioned there was a problem with LD_LIBRARY_PATH and it was solved the way you mentioned.

Thank you for your help.

Vasilis-Thanos Anagnostopoulos

P.S.: The edition for the 64bit systems when it will be ready ???

Also when i tried to compile the CC on 64 edition of ubuntu i got:

Code: Select all

[ 13%] Built target triangle
[ 13%] Built target CC_DLL
[ 13%] Built target GLEW
[ 13%] Built target CC_FBO
Linking CXX shared library libQCC_DB_DLL.so
/usr/bin/ld: ../Glew/libGLEW.a(glew.c.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
../Glew/libGLEW.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [libs/qCC_db/libQCC_DB_DLL.so] Error 1
make[1]: *** [libs/qCC_db/CMakeFiles/QCC_DB_DLL.dir/all] Error 2
make: *** [all] Error 2
I hope that it wil help ...
redfeilds
Posts: 1
Joined: Tue Jul 24, 2012 9:18 pm

Re: Compilation on Ubuntu 12.04 64bit

Post by redfeilds »

thanks for sharing..i tried and it worked for me!
atman
Posts: 6
Joined: Mon Dec 17, 2012 6:13 pm

Re: Compilation on Ubuntu 12.04 64bit

Post by atman »

Hi all!
My issue while compiling on Ubuntu 12.04 64bit:

Code: Select all

/home/user/Desktop/trunk-master/qCC/ccPointPairRegistrationDlg.cpp:4:24: fatal error: MainWindow.h: No such file or directory
compilation terminated.
make[2]: *** [qCC/CMakeFiles/qCC.dir/ccPointPairRegistrationDlg.cpp.o] Error 1
make[1]: *** [qCC/CMakeFiles/qCC.dir/all] Error 2
make: *** [all] Error 2
daniel
Site Admin
Posts: 7711
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Compilation on Ubuntu 12.04 64bit

Post by daniel »

Oups, it's "mainwindow.h" instead of "MainWindow.h" (Windows is not case sensitive).

I've updated the trunk,

Sorry for the inconvenience!
Daniel, CloudCompare admin
atman
Posts: 6
Joined: Mon Dec 17, 2012 6:13 pm

Re: Compilation on Ubuntu 12.04 64bit

Post by atman »

ok, next one ))

Code: Select all

/home/user/Desktop/trunk-master/qCC/ccPointPairRegistrationDlg.cpp:14:27: fatal error: QMdiSubWindow.h: No such file or directory
compilation terminated.
make[2]: *** [qCC/CMakeFiles/qCC.dir/ccPointPairRegistrationDlg.cpp.o] Error 1
make[1]: *** [qCC/CMakeFiles/qCC.dir/all] Error 2
make: *** [all] Error 2
daniel
Site Admin
Posts: 7711
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Compilation on Ubuntu 12.04 64bit

Post by daniel »

Should be "QMdiSubWindow" ;)
Daniel, CloudCompare admin
Post Reply