Compile QCAD on Linux(UBUNTU) from source code (Community Edition)

Download the source code from github:

$git clone https://github.com/qcad/qcad.git

 
PRE-REQUISITES:

gcc version 4
make
libx11-dev
libxext-dev
libxrender-dev
libglu1-mesa-dev (Ubuntu)
libfreetype6-dev (Ubuntu)
libfontconfig1-dev (Ubuntu)
libssl-dev (Ubuntu)
libdbus-1-dev (Ubuntu)
libsm-dev (Ubuntu)

You need to have Qt4 (4.8.4) on your system. if it is not there then  use
Download and install Qt 4.8.4:

Download the tar.gz file from  http://releases.qt-project.org/qt4/source/qt-everywhere-opensource-src-4.8.4.tar.gz

Extract the tar.gz file:
$tar xfvz qt-everywhere-opensource-src-4.8.4.tar.gz

Configure Qt:
$cd qt-everywhere-opensource-src-4.8.4$./configure -fast -opensource -release -no-qt3support -fontconfig -dbus \ -sm -qt-libpng -qt-libjpeg -qt-libmng -qt-zlib -openssl -opengl desktop \ -xrender -webkit -confirm-license

Compile Qt:
$make

Add ~/opt/qt-everywhere-opensource-src-4.8.4/bin to your PATH environment variable:
$export PATH=~/opt/qt-everywhere-opensource-src-4.8.4/bin:$PATH

Configure QCAD:
$cd ~/qcad
$qmake -r       or     $qmake qcad.pro
 
Compile QCAD:
$make
 
Launch QCAD:
$cd release
$LD_LIBRARY_PATH=. ./qcad-bin
 
and enjoy 🙂
 
Note: execute QCAD with $LD_LIBRARY_PATH=. ./qcad-bin    instead of   $./qcad-bin 
My experience:
When I execute with  $./qcad-bin , I got error during executing,
./qcad-bin: error while loading shared libraries: libqcadecmaapi.so:
 cannot open shared object file: No such file or directory
then,
Above problem solved by manually coping the shared libraries (shown in error)
(like:  libqcadecmaapi.so, libqcadentity.so, libqcadcore.so, libqcadgrid.so,
libqcadgui.so, libqcadoperations.so, libqcadsnap.so,
libqcadspatialindex.so, libqcadstemmer.so, libspatialindexnavel.so )
from your QCAD package to   /usr/lib/ .
 
OR   You can alternatively set LD_LIBRARY_PATH:
USE THIS DURING EXECUTION: $LD_LIBRARY_PATH=. ./qcad-bin
 
>>Lots of Warnings are in source code.
 
Compilation Time on my system is:
real 32m33.085s
user 31m9.857s
sys 1m33.970s
  
 
For more information, visit:  http://www.qcad.org/en/component/content/article/78-qcad/111-qcad-compilation-from-sources
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s