[scribus] Compiling Scribus for Qt5

William Bader williambader at hotmail.com
Wed Mar 2 21:47:29 UTC 2016



> From: cbradney at scribus.info
> Date: Wed, 2 Mar 2016 18:12:18 +0100
> To: scribus at lists.scribus.net
> Subject: Re: [scribus] Compiling Scribus for Qt5
> 
> 
> > On 02 Mar 2016, at 18:05, Rolf-Werner Eilert <eilert-sprachen at t-online.de> wrote:
> > 
> > 
> > Am 01.03.2016 21:43, schrieb Craig Bradney:
> >>> On 01 Mar 2016, at 15:30, William Bader <williambader at hotmail.com> wrote:
> >>> 
> >>> 
> >>> 
> >>>> Date: Tue, 1 Mar 2016 12:40:41 +0100
> >>>> From: eilert-sprachen at t-online.de
> >>>> To: scribus at lists.scribus.net
> >>>> Subject: [scribus] Compiling Scribus for Qt5
> >>>> 
> >>>> This is purely "just for fun", so just tell me if I try something
> >>>> impossible.
> >>>> 
> >>>> As I was interested in Qt5 libraries for my somewhat older Linux, I
> >>>> downloaded the sources and browsed the documentation. The first thing I
> >>>> found was how to compile the source statically into $HOME/qt5.
> >>>> 
> >>>> Having done so, I wonder how to compile and link the Scribus 1.5 source
> >>>> to this version.
> >>>> 
> >>>> Compiling Qt5,
> >>>> - "make" ran through flawlessly
> >>>> - I have not yet issued "make install" because it wasn't mentioned - is
> >>>> it necessary, anyway?
> >>>> 
> >>>> If I am not completely on the wrong path up to here, what would be the
> >>>> necessary options to give for linking the Scribus sources to my personal
> >>>> qt5?
> >>>> 
> >>>> Thanks for your advice!
> >>>> 
> >>>> Regards
> >>>> Rolf
> >>> I think that if the qt5 build works, you can get by without installing it, but the Scribus build scripts need to be able to find the qt5 build area. You will probably need to add the qt5 pkconfig directory to PKG_CONFIG_PATH and the qt5 bin directory to PATH. On a Linux distribution that did not already include qt5, I ended up faking the installation with a few sym links, but it didn't work well: ln -s /home/build/qt5/qtbase/include /usr/include/qt5; ln -s /home/build/qt5/qtbase /usr/lib64/qt5; ln -s /home/build/qt5/qtbase/libexec/ /usr/libexec/qt5; ln -s /home/build/qt5/qtbase/bin /usr/bin/qt5; mkdir /usr/share/qt5; ln -s /home/build/qt5/qtbase/translations /usr/share/qt5/translations; ln -s /home/build/qt5/qttools/src/linguist/phrasebooks  /usr/share/qt5/phrasebooks
> >>> William
> >> 
> >> All you need is this on your cmake line:
> >> -DQT_PREFIX=“/path/to/your/qt”
> >> 
> >> Craig
> >> 
> >> 
> > 
> > Thank you both for the advice. It doesn't sound so complicated. The only thing is, I have no experience with the cmake options, i. e. the only thing I know for sure is ./config, make, make install :)
> > 
> > I took a look into my $HOME/qt5, it is empty. I guess it means I have to issue a "make install" to have the readily compiled libraries installed into this directory, and I hope it won't try to write them into the /usr/lib etc... (Although it would fail anyway as long as I give no sudo, right?)
> > 
> > When this is done, shouldn't I invoke ./config with the prefix you gave me above, Craig? Or would it be
> > 
> > make   -DQT_PREFIX=/home/myHome/qt5
> > 
> > Before I do anything wrong, I wait for your answers...
> > 
> > Regards
> > Rolf
> > 
> 
> 
> The CMake options are for when you build Scribus, not Qt. Scribus does not use config to configure, it uses CMake.
> 
> For Qt, review this: http://doc.qt.io/qt-5/linux-building.html
> Follow the links within (like that to http://doc.qt.io/qt-5/configure-options.html)
> 
> Or just download it through your distro or use the Qt installer which is probably a lot easier, and certainly faster.
> 
> Craig

To explain in more detail:

> make -DQT_PREFIX=/home/myHome/qt5
The command should be "cmake -DQT_PREFIX=/home/myHome/qt5 ." The last parameter is the directory with the Scribus source. The cmake command creates Makefiles, and then after it finishes, you run "make" to do the compilation.

There are instructions at https://wiki.scribus.net/canvas/Building_SVN_versions_with_CMake  (Some of the cmake examples at the end have the directory first instead of last, which might not be right.)
It is always better to use the distribution's Qt5 when possible or else you might have problems if executables from the distribution find your Qt5 instead of the one from the distribution, but as you said that you have "a somewhat older Linux", the Qt5 provided by the distribution might be too old to build the current Scribus.
William

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scribus.net/pipermail/scribus/attachments/20160302/f9bca83d/attachment.html>


More information about the scribus mailing list