Howto compile Qt and friends on Debian Squeeze: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
=How to compile Qt and friends on Debian Squeeze=
[[Category:HowTo]]<br />[[Category:Tutorial]]


==1) Debian installation==
[toc align_right=&quot;yes&amp;quot; depth=&quot;2&amp;quot;]


I downloaded the Debian-life dvd from the Debian website :<br />[http://live.debian.net/project/releases/ Link] ''[live.debian.net]'' 6.0.1: 2011-03-24
= How to compile Qt and friends on Debian Squeeze =


Then I booted using the life-<span class="caps">DVD</span>. Debian detected all the necessary drivers for my graphics card.<br /> Then I restarted and used the graphical install to install my new Linux box.<br /> I used [http://www.nongnu.org/synaptic/ synaptic] ''[nongnu.org]'' to update some packages.
== 1) Debian installation ==


==2) This is what I did to install Qt:==
I downloaded the Debian-life dvd from the Debian website :<br />&quot;Link &quot;:http://live.debian.net/project/releases/ 6.0.1: 2011-03-24
 
Then I booted using the life-DVD. Debian detected all the necessary drivers for my graphics card.<br />Then I restarted and used the graphical install to install my new Linux box.<br />I used &quot;synaptic&amp;quot;:http://www.nongnu.org/synaptic/ to update some packages.
 
== 2) This is what I did to install Qt: ==


(I used root privileges in console with : su )
(I used root privileges in console with : su )


I installed the latest Qt release Debian-package which will provide all the dependencies you need and settings to look into.<br /> I looked into the qconfig.pro file in the mkspecs folder to check the configure options used to build the package on Debian.<br /> You don’t need to install this package but it helped me to figure things out.
I installed the latest Qt release Debian-package which will provide all the dependencies you need and settings to look into.<br />I looked into the qconfig.pro file in the mkspecs folder to check the configure options used to build the package on Debian.<br />You don't need to install this package but it helped me to figure things out.


Get all dependencies for Qt :<br />
Get all dependencies for Qt :<br /><code>apt-get build-dep qt4-qmake<code>


Get git:<br />
Get git:<br /></code>apt-get install git-core</code>


Get Git clone:<br />
Get Git clone:<br /><code>git clone git://gitorious.org/qt/qt.git<br />cd qt</code>


I preferred to install in my own directory == /home/USER :
I preferred to install in my own directory == /home/USER :


Configure + make + install<br />
Configure + make + install<br /><code>./configure -prefix /home/USER/qtsdk<br />-debug-and-release<br />-qt3support<br />-accessibility<br />-opengl<br />-qt-lib-jpeg<br />-qt-lib-mng<br />-qt-lib-png<br />-qt-lib-tiff<br />-system-freetype<br />-system-zlib<br />-nis<br />-cups<br />-iconv<br />-glib<br />-dbus<br />-dbus-linked<br />‑system‑nas‑sound<br />-openssl<br />-xshape<br />-xsync<br />-xrender<br />-mitshm<br />-fontconfig<br />-xkb<br />‑multimedia<br />-xmlpatterns<br />-multimedia<br />-audio-backend<br />-svg -webkit<br />-script<br />-scripttools<br />-qt-sql‑psql<br />-qt-sql‑mysql<br /><s>qt-sql‑odbc
 
<br />make</code>
I choose to install several database drivers (postgresql, mysql and odbc), which are not needed for everyone. [http://www.sqlite.org/ <span class="caps">SQL</span>ite] ''[sqlite.org]'' is installed by default.
<br />I choose to install several database drivers (postgresql, mysql and odbc), which are not needed for everyone. &quot;SQLite&amp;quot;:http://www.sqlite.org/ is installed by default.
 
<br />I needed to compile the examples and demos separately because I've chosen my own directory to install in:<br /><code>make install<code>
I needed to compile the examples and demos separately because I’ve chosen my own directory to install in:<br />
<br />Then I tested my installation and even qtdemo is up and running. Nice[[Image:|Image:]]
 
<br />'''Set the Environment Variables'''
Then I tested my installation and even qtdemo is up and running. Nice!!
<br />In order to use Qt, some environment variables need to be extended.<br /> PATH</s> to locate qmake, moc and other Qt tools<br />This is done like this:<br />In .profile &amp;#40;if your shell is bash, ksh, zsh or sh&amp;amp;#41;, add the following lines:<br /></code>PATH=/home/USER/qtsdk/bin:$PATH<br /> export PATH<code>
 
'''Set the Environment Variables'''
 
In order to use Qt, some environment variables need to be extended. <span class="caps">PATH</span> to locate qmake, moc and other Qt tools<br /> This is done like this:<br /> In .profile (if your shell is bash, ksh, zsh or sh), add the following lines:<br />
 
test it with:<br /> This should point to /home/USER/qtsdk/bin<br /> Hint : not a “/” at the end like in <span class="caps">PATH</span>=/home/USER/qtsdk/bin:$PATH
 
That’s all. Qt is now installed.


==3) But where is Qt Creator?==
test it with:<br /></code>which qmake</code><br />This should point to /home/USER/qtsdk/bin<br />Hint : not a “/” at the end like in PATH=/home/USER/qtsdk/bin:$PATH


Gitorious tells me it’s a separate repository, so obviously I have to install it separately :<br /> It is recommended that you build Qt Creator not in the source directory, but in a<br /> separate directory. To do that, use the following commands:<br />
That's all. Qt is now installed.


===Categories:===
== 3) But where is Qt Creator? ==


* [[:Category:HowTo|HowTo]]
Gitorious tells me it's a separate repository, so obviously I have to install it separately :<br /><code>git clone git://gitorious.org/qt-creator/qt-creator<code><br />It is recommended that you build Qt Creator not in the source directory, but in a<br />separate directory. To do that, use the following commands:<br /></code>mkdir $BUILD_DIRECTORY<br />cd $BUILD_DIRECTORY<br />qmake $SOURCE_DIRECTORY/qtcreator.pro<br />make <code>

Revision as of 09:05, 24 February 2015


[toc align_right="yes&quot; depth="2&quot;]

How to compile Qt and friends on Debian Squeeze

1) Debian installation

I downloaded the Debian-life dvd from the Debian website :
"Link ":http://live.debian.net/project/releases/ 6.0.1: 2011-03-24

Then I booted using the life-DVD. Debian detected all the necessary drivers for my graphics card.
Then I restarted and used the graphical install to install my new Linux box.
I used "synaptic&quot;:http://www.nongnu.org/synaptic/ to update some packages.

2) This is what I did to install Qt:

(I used root privileges in console with : su )

I installed the latest Qt release Debian-package which will provide all the dependencies you need and settings to look into.
I looked into the qconfig.pro file in the mkspecs folder to check the configure options used to build the package on Debian.
You don't need to install this package but it helped me to figure things out.

Get all dependencies for Qt :

apt-get build-dep qt4-qmake<code>

Get git:<br />

apt-get install git-core Get Git clone:

git clone git://gitorious.org/qt/qt.git<br />cd qt

I preferred to install in my own directory == /home/USER :

Configure + make + install

./configure -prefix /home/USER/qtsdk<br />-debug-and-release<br />-qt3support<br />-accessibility<br />-opengl<br />-qt-lib-jpeg<br />-qt-lib-mng<br />-qt-lib-png<br />-qt-lib-tiff<br />-system-freetype<br />-system-zlib<br />-nis<br />-cups<br />-iconv<br />-glib<br />-dbus<br />-dbus-linked<br />systemnassound<br />-openssl<br />-xshape<br />-xsync<br />-xrender<br />-mitshm<br />-fontconfig<br />-xkb<br />multimedia<br />-xmlpatterns<br />-multimedia<br />-audio-backend<br />-svg -webkit<br />-script<br />-scripttools<br />-qt-sqlpsql<br />-qt-sqlmysql<br /><s>qt-sqlodbc 
<br />make


I choose to install several database drivers (postgresql, mysql and odbc), which are not needed for everyone. "SQLite&quot;:http://www.sqlite.org/ is installed by default.


I needed to compile the examples and demos separately because I've chosen my own directory to install in:

make install<code>
<br />Then I tested my installation and even qtdemo is up and running. Nice[[Image:|Image:]]
<br />'''Set the Environment Variables'''
<br />In order to use Qt, some environment variables need to be extended.<br /> PATH</s> to locate qmake, moc and other Qt tools<br />This is done like this:<br />In .profile &amp;#40;if your shell is bash, ksh, zsh or sh&amp;amp;#41;, add the following lines:<br />

PATH=/home/USER/qtsdk/bin:$PATH
export PATH

test it with:<br />

which qmake
This should point to /home/USER/qtsdk/bin
Hint : not a “/” at the end like in PATH=/home/USER/qtsdk/bin:$PATH

That's all. Qt is now installed.

3) But where is Qt Creator?

Gitorious tells me it's a separate repository, so obviously I have to install it separately :

git clone git://gitorious.org/qt-creator/qt-creator<code><br />It is recommended that you build Qt Creator not in the source directory, but in a<br />separate directory. To do that, use the following commands:<br />

mkdir $BUILD_DIRECTORY
cd $BUILD_DIRECTORY
qmake $SOURCE_DIRECTORY/qtcreator.pro
make