Revision history for CompilingQtAndScimQtModules
Additions:
CategorySoftware
Deletions:
Additions:
[[HomePage]] >[[ComponentHowTo Components and HowTos]] > [[NativeLanguageSupport Language Support]]
Deletions:
Additions:
[[http://puppylinux.org/wikka/Qt qt-4.5.3 software package]]
No Differences
Additions:
See also: MultiLingualPuppy
CategoryAdditionalSoftware
CategoryMultilingual
CategoryAdditionalSoftware
CategoryMultilingual
Deletions:
Additions:
======{{color text="Setting up Scim to work with QT Applications" c="black"}}======
====={{color text="Compiling from source" c="black"}}=====
===={{color text="Compiling QT3 with immodule capability" c="black"}}====
===={{color text="Compiling QT4" c="black"}}====
===={{color text="Compiling scim-bridge QT immodules" c="black"}}====
====={{color text="Compiling from source" c="black"}}=====
===={{color text="Compiling QT3 with immodule capability" c="black"}}====
===={{color text="Compiling QT4" c="black"}}====
===={{color text="Compiling scim-bridge QT immodules" c="black"}}====
Deletions:
=====Compiling from source=====
====Compiling QT3 with immodule capability====
====Compiling QT4====
====Compiling scim-bridge QT immodules====
Additions:
----
==Categories==
CategoryDocumentation
==Categories==
CategoryDocumentation
Additions:
======Setting up Scim to work with QT Applications======
=====Compiling from source=====
====Compiling QT3 with immodule capability====
**Preparing to compile: all Puppy versions**
Download the source code file __qt-x11-free-3.3.8.tar.bz2__ from ftp://ftp.trolltech.com/qt/source/
Decide where you are going to install QT3 on your system. Unpack the tarball to this location. If it's for your Puppy installation only, you can unpack to a folder outside of the pup_save file and symlink to the installation location.
The package contains an excellent set of documents. There is a text file of the installation instructions in the root directory, which you may like to read. The instructions that follow are extracted from it.
**Applying the patch**
Download the patch file __qt-x11-immodule-unified-qt3.3.8-20071116.diff__. It's available [[http://people.freedesktop.org/%7Edaisuke/ here]]. Unpack it and place it in the QT directory.
cd to the QT directory and run the command:
##patch -p1 -i qt-x11-immodule-unified-qt3.3.8-20071116.diff##
The README.immodule file, which you can't read until you've run the patch anyway :), says to use patch -p0. This throws up errors, whereas -p1 runs flawlessly.
One of the files that's created by the patch is make-symlinks.sh. Make this executable and run it, either by clicking on it or by typing
##./make-symlinks.sh##
in a terminal.
If you miss this step, compilation will fail with a "can't find" error.
Before you run ./configure, you need to set up some environment variables.
You need:
QTDIR - the directory where you are installing QT3
LD_LIBRARY_PATH - $QTDIR/lib //(unless you are doing something fancy, in which case refer to the official docs for help).//
PATH - $QTDIR/bin
PKG_CONFIG_PATH - $QTDIR/lib //This is necessary for later on when you are compiling things against QT3//
You can either put these in your /etc/profile file now and restart the X server, or you can type "export" commands in a terminal and adjust your /etc/profile later. If you are just doing a one-off compile that's going to be removed once it's packaged up, then you may prefer to just do the terminal commands and leave your /etc/profile alone.
Now you can begin compiling.
**Puppy 2.17**
Use the configure command:
##./configure --prefix=$QTDIR --thread -inputmethod##
$QTDIR is shorthand for where you've decided to install QT3. The default is /usr/local/qt
If you want to compile extra plugins, such as SQL drivers, you can add those to the command line e.g. -plugin-sql-sqlite
However, you can come back and compile them separately without having to recompile QT3 all over again.
You'll be told which "make" command to use. It seems to be "gmake" on Puppy systems.
Start the compiling and go away and do one of those jobs you've been putting off for ages. It takes about 40 minutes on a 3.06GHz processor, and it doesn't go any faster if you sit there staring at it.
Because you've just built QT3 in the directory where it's going to remain, you don't do "make install".
If you have any QT3 programs, they should run now. If you don't have any, you'll find a number of widgets and test programs in the "examples" directory which you can use to test your QT3 installation. Some of them are also useful for testing scim later on.
QT3 compiled on Puppy 2 should run with no trouble in Puppy 3.01 and Puppy 4.00 if set up correctly (see "Important" note at the bottom of this page).
**Puppy 3.01**
QT3 is very difficult to compile in Puppy 3.01. (Puppy 3.01 seems to be an awkward beast when it comes to compiling in general.) Several people have tried and can't get it to work! Fortunately, a package compiled on another distro will often work, and it can even be used to compile the immodule if you need to. (But see "Important" note at the bottom of this page.)
If you do manage to do it, please post letting us know how.
**Puppy 4.00**
The same instructions apply to compiling on Puppy 4.00 as for 2.17. The only difference is that you'll need to symlink /usr/X11R7/include/fontconfig to /usr/include/fontconfig
====Compiling QT4====
QT4 is actually easier to compile than QT3. It doesn't need the PATH and so on set up until afterwards, and immodule support is already built in. No patches are needed.
Download qt-x11-opensource-src-4.3.4.tar.gz or later version from ftp://ftp.trolltech.com/qt/source/ .
Unpack the tarball somewhere convenient.
Decide where you are going to install QT4. The default is /usr/local/Trolltech/Qt-4.3.4 (or other version).
You might want to symlink this directory to somewhere outside of the pup_save file before you start. A full install of QT4 is around 500 MB.
**Puppy 2.17**
The configure command is:
##./configure --prefix=(your QT4 directory)##
You can add other plugins if you wish e.g. ##-plugin-sql-sqlite## Type ##./configure --help## for a big list of options. You will be told which "make" command to use.
QT4 takes even longer to compile - about 1hr 15 mins on a 3.06GHz processor, so you can find a larger job to do this time. :)
**Puppy 3.01**
Compiling on 3.01 needs /usr/X11R7/include/X11/extensions/XI.h. If you have another distro, you can copy or symlink it from there.
##./configure --prefix=(your QT4 directory) --release --sql-sqlite -plugin-sql-sqlite##
**Puppy 4.00**
Not necessary for Puppy 4 unless you need a version later than 4.3.2 Use the official .pet file.
##./configure --prefix=(your QT4 directory)##
You can add ##-plugin-sql-sqlite## if you want to.
====Compiling scim-bridge QT immodules====
Install scim and QT first. They are dependencies.
**Puppy 2.17**
configure scim-bridge:
##./configure --prefix=/usr --enable-qt3-immodule --enable-qt4-immodule##
You may --disable one or other immodule if you don't have QT3 or QT4 installed.
If it can't find qt even though it's installed, check your PKG_CONFIG_PATH.
**Puppy 3.01**
Yes, it can be done - just!
__Install__:
QT4
libiconv //(not sure if this is needed)//
__symlink__:
libxcb.la
libxcb-xlib.la
libexpat.la
//and for the QT3 immodule://
libfreetype.la
from /usr/lib to /usr/X11R7/lib
__symlink__:
libXau.la
libXrender.la
libX11.la
libfontconfig.la
libXdmcp.la
//and for the QT3 immodule://
libICE.la
libXext.la
__symlink__:
libstdc""++"".la
from /usr/lib to /usr/lib/gcc/i486-t2-linux-gnu/3.4.4
(You'll have to create the directory.)
Then it will work.
**Puppy 4.00**
Same as for Puppy 2.17
**Important!**
QT plugins cannot be "mixed and matched". You can't take a plugin from another compilation, even if it's the same version number, and expect it to work. The safest thing is to make sure that they've been compiled against the specific version of QT that you are going to use. Alternatively, compile the plugins yourself.
=====Compiling from source=====
====Compiling QT3 with immodule capability====
**Preparing to compile: all Puppy versions**
Download the source code file __qt-x11-free-3.3.8.tar.bz2__ from ftp://ftp.trolltech.com/qt/source/
Decide where you are going to install QT3 on your system. Unpack the tarball to this location. If it's for your Puppy installation only, you can unpack to a folder outside of the pup_save file and symlink to the installation location.
The package contains an excellent set of documents. There is a text file of the installation instructions in the root directory, which you may like to read. The instructions that follow are extracted from it.
**Applying the patch**
Download the patch file __qt-x11-immodule-unified-qt3.3.8-20071116.diff__. It's available [[http://people.freedesktop.org/%7Edaisuke/ here]]. Unpack it and place it in the QT directory.
cd to the QT directory and run the command:
##patch -p1 -i qt-x11-immodule-unified-qt3.3.8-20071116.diff##
The README.immodule file, which you can't read until you've run the patch anyway :), says to use patch -p0. This throws up errors, whereas -p1 runs flawlessly.
One of the files that's created by the patch is make-symlinks.sh. Make this executable and run it, either by clicking on it or by typing
##./make-symlinks.sh##
in a terminal.
If you miss this step, compilation will fail with a "can't find" error.
Before you run ./configure, you need to set up some environment variables.
You need:
QTDIR - the directory where you are installing QT3
LD_LIBRARY_PATH - $QTDIR/lib //(unless you are doing something fancy, in which case refer to the official docs for help).//
PATH - $QTDIR/bin
PKG_CONFIG_PATH - $QTDIR/lib //This is necessary for later on when you are compiling things against QT3//
You can either put these in your /etc/profile file now and restart the X server, or you can type "export" commands in a terminal and adjust your /etc/profile later. If you are just doing a one-off compile that's going to be removed once it's packaged up, then you may prefer to just do the terminal commands and leave your /etc/profile alone.
Now you can begin compiling.
**Puppy 2.17**
Use the configure command:
##./configure --prefix=$QTDIR --thread -inputmethod##
$QTDIR is shorthand for where you've decided to install QT3. The default is /usr/local/qt
If you want to compile extra plugins, such as SQL drivers, you can add those to the command line e.g. -plugin-sql-sqlite
However, you can come back and compile them separately without having to recompile QT3 all over again.
You'll be told which "make" command to use. It seems to be "gmake" on Puppy systems.
Start the compiling and go away and do one of those jobs you've been putting off for ages. It takes about 40 minutes on a 3.06GHz processor, and it doesn't go any faster if you sit there staring at it.
Because you've just built QT3 in the directory where it's going to remain, you don't do "make install".
If you have any QT3 programs, they should run now. If you don't have any, you'll find a number of widgets and test programs in the "examples" directory which you can use to test your QT3 installation. Some of them are also useful for testing scim later on.
QT3 compiled on Puppy 2 should run with no trouble in Puppy 3.01 and Puppy 4.00 if set up correctly (see "Important" note at the bottom of this page).
**Puppy 3.01**
QT3 is very difficult to compile in Puppy 3.01. (Puppy 3.01 seems to be an awkward beast when it comes to compiling in general.) Several people have tried and can't get it to work! Fortunately, a package compiled on another distro will often work, and it can even be used to compile the immodule if you need to. (But see "Important" note at the bottom of this page.)
If you do manage to do it, please post letting us know how.
**Puppy 4.00**
The same instructions apply to compiling on Puppy 4.00 as for 2.17. The only difference is that you'll need to symlink /usr/X11R7/include/fontconfig to /usr/include/fontconfig
====Compiling QT4====
QT4 is actually easier to compile than QT3. It doesn't need the PATH and so on set up until afterwards, and immodule support is already built in. No patches are needed.
Download qt-x11-opensource-src-4.3.4.tar.gz or later version from ftp://ftp.trolltech.com/qt/source/ .
Unpack the tarball somewhere convenient.
Decide where you are going to install QT4. The default is /usr/local/Trolltech/Qt-4.3.4 (or other version).
You might want to symlink this directory to somewhere outside of the pup_save file before you start. A full install of QT4 is around 500 MB.
**Puppy 2.17**
The configure command is:
##./configure --prefix=(your QT4 directory)##
You can add other plugins if you wish e.g. ##-plugin-sql-sqlite## Type ##./configure --help## for a big list of options. You will be told which "make" command to use.
QT4 takes even longer to compile - about 1hr 15 mins on a 3.06GHz processor, so you can find a larger job to do this time. :)
**Puppy 3.01**
Compiling on 3.01 needs /usr/X11R7/include/X11/extensions/XI.h. If you have another distro, you can copy or symlink it from there.
##./configure --prefix=(your QT4 directory) --release --sql-sqlite -plugin-sql-sqlite##
**Puppy 4.00**
Not necessary for Puppy 4 unless you need a version later than 4.3.2 Use the official .pet file.
##./configure --prefix=(your QT4 directory)##
You can add ##-plugin-sql-sqlite## if you want to.
====Compiling scim-bridge QT immodules====
Install scim and QT first. They are dependencies.
**Puppy 2.17**
configure scim-bridge:
##./configure --prefix=/usr --enable-qt3-immodule --enable-qt4-immodule##
You may --disable one or other immodule if you don't have QT3 or QT4 installed.
If it can't find qt even though it's installed, check your PKG_CONFIG_PATH.
**Puppy 3.01**
Yes, it can be done - just!
__Install__:
QT4
libiconv //(not sure if this is needed)//
__symlink__:
libxcb.la
libxcb-xlib.la
libexpat.la
//and for the QT3 immodule://
libfreetype.la
from /usr/lib to /usr/X11R7/lib
__symlink__:
libXau.la
libXrender.la
libX11.la
libfontconfig.la
libXdmcp.la
//and for the QT3 immodule://
libICE.la
libXext.la
__symlink__:
libstdc""++"".la
from /usr/lib to /usr/lib/gcc/i486-t2-linux-gnu/3.4.4
(You'll have to create the directory.)
Then it will work.
**Puppy 4.00**
Same as for Puppy 2.17
**Important!**
QT plugins cannot be "mixed and matched". You can't take a plugin from another compilation, even if it's the same version number, and expect it to work. The safest thing is to make sure that they've been compiled against the specific version of QT that you are going to use. Alternatively, compile the plugins yourself.
Deletions:
<br />
<h2>Compiling from source</h2>
<br />
<h3>Compiling QT3 with immodule capability</h3>
<br />
<b>Preparing to compile: all Puppy versions</b><br />
<br />
Download the source code file qt-x11-free-3.3.8.tar.bz2 from
<a href="ftp://ftp.trolltech.com/qt/source/">ftp://ftp.trolltech.com/qt/source/</a>.<br />
<br />
Decide where you are going to install QT3 on your system. Unpack the tarball to this location. If it's for your Puppy installation only, you can unpack to a folder outside of the pup_save file and symlink to the installation location.<br />
<br />
The package contains an excellent set of documents. There is a text file of the installation instructions in the root directory, which you may like to read. The instructions that follow are extracted from it.<br />
<br />
<b>Applying the patch</b><br />
<br />
Download the patch file qt-x11-immodule-unified-qt3.3.8-20071116.diff. It's available <a href="http://people.freedesktop.org/%7Edaisuke/">here</a>. Unpack it and place it in the QT directory.<br />
<br />
cd to the qt directory and run the command:
<blockquote>
<code>patch -p1 -i qt-x11-immodule-unified-qt3.3.8-20071116.diff</code>
</blockquote>
<p>
The README.immodule file, which you can't read until you've run the patch anyway :), says to use patch -p0. This throws up errors, whereas -p1 runs flawlessly.<br />
<br />
One of the files that's created by the patch is make-symlinks.sh. Make this executable and run it, either by clicking on it or by typing <code>./make-symlinks.sh</code> in a terminal.<br />
<br />
If you miss this step, compilation will fail with a "can't find" error.<br />
<br />
Before you run ./configure, you need to set up some environment variables.<br />
<br />
You need:<br />
</p>
<blockquote>
QTDIR - the directory where you are installing qt3<br />
LD_LIBRARY_PATH - $QTDIR/lib (unless you are doing something fancy, in which case refer to the official docs for help).<br />
PATH - $QTDIR/bin<br />
PKG_CONFIG_PATH - $QTDIR/lib This is necessary for later on when you are compiling things against qt3<br />
</blockquote>
<p>
<br />
You can either put these in your /etc/profile file now and restart the X server, or you can type "export" commands in a terminal and adjust your /etc/profile later. If you are just doing a one-off compile that's going to be removed once it's packaged up, then you may prefer to just do the terminal commands and leave your /etc/profile alone.<br />
<br />
Now you can begin compiling.<br />
<br />
<br />
<b>Puppy 2.17<br />
<br />
</b>Use the configure command:
</p>
<blockquote>
<code>./configure --prefix=$QTDIR --thread -inputmethod</code>
</blockquote>
<p>
<br />
$QTDIR is shorthand for where you've decided to install QT3. The default is /usr/local/qt<br />
<br />
If you want to compile extra plugins, such as SQL drivers, you can add those to the command line e.g. -plugin-sql-sqlite<br />
<br />
However, you can come back and compile them separately without having to recompile QT3 all over again.<br />
<br />
You'll be told which "make" command to use. It seems to be "gmake" on Puppy systems.<br />
<br />
Start the compiling and go away and do one of those jobs you've been putting off for ages. It takes about 40 minutes on a 3.06GHz processor, and it doesn't go any faster if you sit there staring at it.<br />
<br />
Because you've just built QT3 in the directory where it's going to remain, you don't do "make install".<br />
<br />
If you have any QT3 programs, they should run now. If you don't have any, you'll find a number of widgets and test programs in the "examples" directory which you can use to test your QT3 installation. Some of them are also useful for testing scim later on.<br />
<br />
QT3 compiled on Puppy 2 should run with no trouble in Puppy 3.01 and Puppy 4.00 if set up correctly (see "Important" note at the bottom of this page).<br />
<b><br />
<br />
Puppy 3.01</b><br />
<br />
QT3 is very difficult to compile in Puppy 3.01. (Puppy 3.01 seems to be an awkward beast when it comes to compiling in general.) Several people have tried and can't get it to work! Fortunately, a package compiled on another distro will often work, and it can even be used to compile the immodule if you need to. (But see "Important" note at the bottom of this page.)<br />
<br />
If you do manage to do it, please post letting us know how.<br />
<br />
<br />
<b>Puppy 4.00<br />
<br />
</b>The same instructions apply to compiling on Puppy 4.00 as for 2.17. The only difference is that you'll need to symlink /usr/X11R7/include/fontconfig to /usr/include/fontconfig
</p>
<br />
<h3>Compiling QT4</h3>
<p>
QT4 is actually easier to compile than QT3. It doesn't need the PATH and so on set up until afterwards, and immodule support is already built in. No patches are needed.<br />
<br />
Download qt-x11-opensource-src-4.3.4.tar.gz or later version from <a href="ftp://ftp.trolltech.com/qt/source/">ftp://ftp.trolltech.com/qt/source/</a>.<br />
<br />
Unpack the tarball somewhere convenient.<br />
<br />
Decide where you are going to install QT4. The default is /usr/local/Trolltech/Qt-4.3.4 (or other version).<br />
<br />
You might want to symlink this directory to somewhere outside of the pup_save file before you start. A full install of QT4 is around 500 MB.<br />
<br />
<br />
<b>Puppy 2.17<br />
<br />
</b>The configure command is:
</p>
<blockquote>
<code>./configure --prefix=(your qt4 directory) </code>
</blockquote>
<p>
You can add other plugins if you wish e.g. -plugin-sql-sqlite Type ./configure --help for a big list of options. You will be told which "make" command to use. <br />
<br />
QT4 takes even longer to compile - about 1hr 15 mins on a 3.06GHz processor, so you can find a larger job to do this time. :)<br />
<br />
<br />
<b>Puppy 3.01<br />
<br />
</b>Compiling on 3.01 needs /usr/X11R7/include/X11/extensions/XI.h. If you have another distro, you can copy or symlink it from there.<br />
<br />
</p>
<blockquote>
<code>./configure --prefix=(your QT4 directory) --release --sql-sqlite -plugin-sql-sqlite</code>
</blockquote>
<p>
<br />
<br />
<b>Puppy 4.00<br />
<br />
</b>Not necessary for Puppy 4 unless you need a version later than 4.3.2 Use the official .pet file.<br />
<br />
</p>
<blockquote>
<code>./configure --prefix=(your QT4 directory)</code>
</blockquote>
<p>
You can add -plugin-sql-sqlite if you want to.
</p>
<br />
<h3>Compiling scim-bridge QT immodules</h3>
<p>
Install scim and QT first. They are dependencies.<br />
<br />
<br />
<b>Puppy 2.17<br />
<br />
</b>configure scim-bridge:
</p>
<blockquote>
<code>./configure --prefix=/usr --enable-qt3-immodule --enable-qt4-immodule</code>
</blockquote>
<p>
<br />
You may --disable one or other immodule if you don't have QT3 or QT4 installed.<br />
If it can't find qt even though it's installed, check your PKG_CONFIG_PATH.<br />
<br />
<br />
<b>Puppy 3.01<br />
<br />
</b>Yes, it can be done - just!<br />
<br />
</p>
<blockquote>
<u>Install</u>: <br />
QT4<br />
libiconv <i>(not
sure if this is needed)</i><br />
<br />
<u>symlink</u>:
<br />
libxcb.la<br />
libxcb-xlib.la<br />
libexpat.la<br />
<i>and for the QT3 immodule:</i><br />
libfreetype.la<br />
from
/usr/lib to
/usr/X11R7/lib<br />
<br />
<u>symlink</u>:<br />
libXau.la<br />
libXrender.la<br />
libX11.la<br />
libfontconfig.la<br />
libXdmcp.la<br />
<i>and for the QT3 immodule:</i><br />
<br />
libICE.la<br />
libXext.la<br />
<br />
<br />
<br />
<u>symlink</u>:<br />
libstdc++.la from /usr/lib to
/usr/lib/gcc/i486-t2-linux-gnu/3.4.4
</blockquote>
<p>
(You'll have to create the directory.)<br />
<br />
Then it will work.<br />
<br />
<br />
<b>Puppy 4.00<br />
<br />
</b>Same as for Puppy 2.17
</p>
<br />
<b><a title="Important!|outline" name="Important!|outline"></a>
Important!</b><br />
<p>
QT plugins cannot be "mixed and matched". You can't take a plugin from another compilation, even if it's the same version number, and expect it to work. The safest thing is to make sure that they've been compiled against the specific version of QT that you are going to use. Alternatively, compile the plugins yourself.<br />
<br />
</p>
""