Scribus Forums

Scribus => Installation and Setup => Linux => Topic started by: Danielsan on October 18, 2015, 07:17:58 PM

Title: [RESOLVED] Compiling Scribus1.5 on Debian Testing from the dedicated Ubuntu PPA
Post by: Danielsan on October 18, 2015, 07:17:58 PM
Jump directly to the solution >>> (http://forums.scribus.net/index.php/topic,1859.msg8209.html#msg8209)




Hi All,

this is my first post, my name is Daniel and I considered myself a Scribus poweruser, as Scribus 1.5 is not yet available in Debian SID and neither in the EXPERIMENTAL repo I decided to compile it by myself but unfortunately I am blocked at the first step.

This is my error and I don't know how to resolve it:


cmake ../scribus -Wno-dev -DCMAKE_INSTALL_PREFIX:PATH=/usr/local/bin/
CMake Error at styles/CMakeLists.txt:21 (QT5_WRAP_CPP):
  Unknown CMake command "QT5_WRAP_CPP".


-- Configuring incomplete, errors occurred!
See also "/home/zagor/Compilati/scribus-1.5.0/builddir/CMakeFiles/CMakeOutput.log".
zagor@Debian-635:~/Compilati/scribus-1.5.0/builddir$ cmake ../scribus -Wno-dev -DCMAKE_INSTALL_PREFIX:PATH=/usr/local/bin/
CMake Error at styles/CMakeLists.txt:21 (QT5_WRAP_CPP):
  Unknown CMake command "QT5_WRAP_CPP".


-- Configuring incomplete, errors occurred!


However there's none: styles/CMakeLists.txt.

Attached the output log, thanks!

[attachment deleted by admin]
Title: Re: Issue Compiling Scribus 1.5 src on Debian Testing (Stretch)
Post by: a.l.e on October 18, 2015, 09:29:05 PM
ciao danielsan

welcome in the forum!

styles/CmakeLists.txt does exist!

http://scribus.net/websvn/filedetails.php?repname=Scribus&path=%2Ftrunk%2FScribus%2Fscribus%2Fstyles%2FCMakeLists.txt

if you really do not have it, you should try to get a fresh copy of the source code.

i'm not sure, but i would tip on a missing dependency... how did you get the list of -dev files to be installed?
which packages did you install?

ciao
a.l.e

otherwise, i would not use /usr/local/bin as a prefix ... try to make install scribus somewhere in your home and, if necessary / probably, create a symlink in /usr/local/bin to the created scribus binary. (but this is not related to your issue)

p.s.: since you're a power use, i would love to know what you do with scribus :-) ... just out of curiosity: it's always nice to hear what people do with scribus!
Title: Re: Issue Compiling Scribus 1.5 src on Debian Testing (Stretch)
Post by: Danielsan on October 19, 2015, 06:24:43 AM
Hello,

I changed the destination for a local folder but I still got the same error, I followed the instruction from the BUILDING file, from the file install4.html and from this wepage: http://wiki.scribus.net/canvas/Building_SVN_versions_with_CMake; and obviusly I downloaded the latest src file from sourceforge.

I tried to figure out which were the missing dependencies but unofrtunately the documentation is not enough updated anyaway I remembered I can use alien to convert an rpm package to a deb. So in case I will try this second option.

I am not yet allowed to publish my latest works I made with Scribus and unfortunately the management eventually decided to move from open sources software to the Adobe CC, I am dealing with them to get an authorization. I have been using Scribus to create real printing ads not fake covers.
Title: Re: Issue Compiling Scribus 1.5 src on Debian Testing (Stretch)
Post by: a.l.e on October 19, 2015, 08:23:02 AM
the target was for sure not the cause of your issue :-)

can you check if you really don't have the CMakeLists.txt file mentioned above?

if it's not there, you have a faulty download.

you should remove the whole repository and to a fresh svn checkout.

if the file is there, i really think that you're missing a dependency. but, as you correctly wrote, it's not easy to know what is missing.
i can try to do a fresh debian testing setup and make a list of all the packages needed... but i doubt that i can do it this week!

if you confirm that you have that file, i will dig deeper into your make output and see what the cause could be...

ciao
a.l.e
Title: Re: Issue Compiling Scribus 1.5 src on Debian Testing (Stretch)
Post by: GarryP on October 19, 2015, 02:30:54 PM
Daniel, I'm looking forward to seeing your work too. It's great to see the different things that can be achieved with Scribus. The more inspiration people get from examples the more they might want to create something of their own. I hope the management gives you authorisation to show it.
Title: Re: Issue Compiling Scribus 1.5 src on Debian Testing (Stretch)
Post by: Danielsan on October 20, 2015, 07:01:25 AM
@ A.l.e.

I downloaded the scribus-1.5.0.tar.xz from source forge and installed the suggested packages from the sources above. I am not using the SVN version. I looked in the web engine search to find something but about QT5_WRAP_CPP there is almost nothing.

Attached find the cmakelists.txt available with the scribus-1.5.0.tar.xz

Thanks,

D.

[attachment deleted by admin]
Title: Re: Issue Compiling Scribus 1.5 src on Debian Testing (Stretch)
Post by: a.l.e on October 20, 2015, 09:15:21 AM
ciao danielsan

the tar.xz you downloaded does contain the scribus/styles/CMakeLists.txt file...

it looks like a dependency problem.

do you have a list of all dependencies you have installed for scribus?

did you install the dev package for qt 5?

ciao
a.l.e
Title: Re: Issue Compiling Scribus 1.5 src on Debian Testing (Stretch)
Post by: Danielsan on October 20, 2015, 05:05:08 PM
Of course I believe to have installed all the dependencies however could you be so kind to write me which are those QT5-dev packages so I can check if someone is still missing?

Thanks!

D.
Title: Re: Issue Compiling Scribus 1.5 src on Debian Testing (Stretch)
Post by: Nermander on October 20, 2015, 07:35:37 PM
Did you read this part?
http://wiki.scribus.net/canvas/Building_SVN_versions_with_CMake#Getting_and_installing_Qt5

And the sentence above that section, saying:
QuoteOn Linux, for each item you have to install both the main package and the development package (for example: cairo and cairo-devel, pixman and pixman-devel, and so on). Some packages should be already installed (for example, Cairo or CUPS).


Title: Re: Issue Compiling Scribus 1.5 src on Debian Testing (Stretch)
Post by: Danielsan on October 20, 2015, 08:28:52 PM
I followed this page and I installed only the DEV version because the main packages required are already installed in my system, but probably what I missed is this:

QuoteIf you have Qt4 and Qt5 installed, and/or cmake does not find Qt5, you need to specify its location with the build option -DQT_PREFIX="path-to-Qt5" (for example: -DQT_PREFIX="/home/user/Qt/5.1.1/gcc/")

I have Debian Testing since Lenny probably I have duplicate library of QT4 and QT5 (if not even QT3).


Anyway I will follow this part with more attention and probably using directly the SVN version, thanks!
Title: Re: Issue Compiling Scribus 1.5 src on Debian Testing (Stretch)
Post by: Danielsan on October 21, 2015, 05:18:24 AM
Hi, I am still doing the test with the sourceforge source tar. So I tried to export the environment variable as suggested by the Scribus wiki but nothing change. Yes of course I double checked all the dependencies as well:
$ export PATH=/usr/lib/x86_64-linux-gnu/qt5/bin/:$PATH
$ cmake ../scribus -Wno-dev -DCMAKE_INSTALL_PREFIX:PATH=/usr/local/bin/
-- The C compiler identification is GNU 5.2.1
-- The CXX compiler identification is GNU 5.2.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at styles/CMakeLists.txt:21 (QT5_WRAP_CPP):
  Unknown CMake command "QT5_WRAP_CPP".


-- Configuring incomplete, errors occurred!
See also "/home/myuser/Compilati/scribus-1.5.0/builddir/CMakeFiles/CMakeOutput.log".


I found where is the error but I am not a coder so I don't know what to do:
INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/scribus
${FREETYPE_INCLUDE_DIRS}
)

SET(SCRIBUS_STYLES_MOC_CLASSES
)

SET(SCRIBUS_STYLES_LIB_SOURCES
style.cpp
stylecontext.cpp
stylecontextproxy.cpp
linestyle.cpp
charstyle.cpp
paragraphstyle.cpp
tablestyle.cpp
cellstyle.cpp
)

QT5_WRAP_CPP(SCRIBUS_STYLES_MOC_SOURCES ${SCRIBUS_STYLES_MOC_CLASSES})

SET(SCRIBUS_STYLES_LIB "scribus_styles_lib")
ADD_LIBRARY(${SCRIBUS_STYLES_LIB} STATIC ${SCRIBUS_STYLES_LIB_SOURCES} ${SCRIBUS_STYLES_MOC_SOURCES})

# This is a convenience library that for linkage purposes is part of Scribus's
# main API.
SET_TARGET_PROPERTIES(${SCRIBUS_STYLES_LIB}
PROPERTIES
COMPILE_FLAGS -DCOMPILE_SCRIBUS_MAIN_APP
)


This is the line 21 which get an error:

QT5_WRAP_CPP(SCRIBUS_STYLES_MOC_SOURCES ${SCRIBUS_STYLES_MOC_CLASSES})
Title: Re: Issue Compiling Scribus 1.5 src on Debian Testing (Stretch)
Post by: Nermander on October 21, 2015, 07:18:55 AM
I think you should not point to the Qt5 binaries, you should point to the Qt5 source (i.e. the -devel package).

QT5_WRAP_CPP is a commande provided by the Qt5 core source package.
Title: Re: Issue Compiling Scribus 1.5 src on Debian Testing (Stretch)
Post by: a.l.e on October 21, 2015, 08:35:32 AM
on debian testing there is nothing special to be done for installing qt5.

but you need the qt-5 dev package. at least, you probably need qtbase5-dev.

on debian testing my cmake command looks like this:

cmake -DCMAKE_INSTALL_PREFIX:PATH=/home/ale/docs/bin/scribus -DWANT_DEBUG=1 -DWANT_GUI_LANG="en_GB;de;fr;it;en" ..

you might want to add -DWANT_NOOSG=1 if osg is installed (as far as i recall, cmake or make crashe in a bad way if it finds osg... and you probably don't need it in scribus)

you don't need any QT5 path directive in the cmake.

and i'm pretty sure that there is nothing you should change in the code!
it's about getting the right packages and not putting "ill" commands in cmake...

danielsan: at this point, i think the best is an interactive session, where we try in parallel to set it up...

i can be available over lunch on http://wiki.scribus.net/canvas/Special:WebChat if you tell me that you'll be there.

----> this seems to be a bit broken, too:
if you're already on irc: get into #scribus on freenode.
otherwise on the web interface above, write the two commands:
/nick danielsan
/join #scribus
<----- sorry, i'm not in charge of that :-(

ciao
a.l.e
Title: Re: Issue Compiling Scribus 1.5 src on Debian Testing (Stretch)
Post by: a.l.e on October 21, 2015, 10:57:11 AM
danielsan, for a very different reason, i'm currently installing a debian testing vm... with a bit of luck, i will soon be able to produce a list of packages needed for compiling scribus.
Title: Re: Issue Compiling Scribus 1.5 src on Debian Testing (Stretch)
Post by: Danielsan on October 21, 2015, 05:15:44 PM
Hi, unfortunately I have very few time so we can't deal for doing any web chat session.

About the issue I found this directions from the QT5 website: http://doc.qt.io/qt-5/cmake-manual.html


And I played a bit with those hints and I was able to do few steps forward but soon I found a tons of other errors, thus, simply, what I got is the instruction to build Scribus 1.5 perhaps are not updated to work with the latest version of CMAKE, at least for the tar source hosted on sourceforge.

That's all
Title: Re: Issue Compiling Scribus 1.5 src on Debian Testing (Stretch)
Post by: a.l.e on October 22, 2015, 06:25:23 AM
sorry, danielsan, you're waisting your time.

that cmake documentation is a very interesting read but it is not what is helping you compiling scribus from source.

the package and all the files in there are correct (or at least you have not proved the contrary until now!) and debian testing *can* compile scribus 1.5 without needing to pull in any external (as not from the provided packages) code.

what you need is to figure out which packages you are missing.

for the cmake command, if you use the one i mentioned in the previous post, it should work.
if you use the one you mentioned in one of your first posts, then it should work, too... even if you will have your scribus in an uncommon place (and not the best one, for my taste)

if it does not work, it means that you are missing some -dev packages.

since you don't want or cannot provide the list of packages you have installed during your tries to get scribus to work, please check at least if qtbase5-dev is installed... since the error seems to be pretty basic and qt5 does not get installed when pulling in the dependencies for the stable scribus.

good luck!
a.l.e
Title: Re: Issue Compiling Scribus 1.5 src on Debian Testing (Stretch)
Post by: Danielsan on October 22, 2015, 06:54:28 PM
Somebody in the Debian forum suggested to me to try to build a deb package directly from the Ubuntu source available in the Scribus Ubuntu PPA, this is also the better way to discover if there are still lacking some dependencies. I hope to find the time to make a test within a couple of days, thanks.
Title: Re: Issue Compiling Scribus 1.5 src on Debian Testing (Stretch)
Post by: a.l.e on October 23, 2015, 09:41:01 AM
yep that could work...
good idea.

i'll also have a look at the ppa and see if it helps creating a list of dependencies!
Title: Re: Issue Compiling Scribus 1.5 src on Debian Testing (Stretch)
Post by: a.l.e on October 23, 2015, 10:14:23 AM
i had a look at

https://launchpadlibrarian.net/216817551/scribus-ng_1.5.0-0ubuntu15.10.0~ppa1.dsc

and it says:

Build-Depends:
- cmake (>= 2.4.3),
- debhelper (>= 9),
- gettext,
- libboost-python-dev,
- libcairo2-dev,
- libcdr-dev (>= 0.1),
- libcups2-dev,
- libgraphicsmagick1-dev,
- libhunspell-dev,
- libhyphen-dev,
- liblcms2-dev,
- libmspub-dev (>= 0.1),
- libosgearth-dev [!armel !armhf],
- libpagemaker-dev,
- libpodofo-dev (>= 0.9.0),
- libpoppler-private-dev,
- libpoppler-qt5-dev,
- libqt5opengl5-dev,
- libqt5webkit5-dev,
- librevenge-dev,
- libtiff-dev,
- libvisio-dev (>= 0.1),
- libwpg-dev,
- libxml2-dev (>= 2.6.16),
- python-all-dev (>= 2.6.6-3~),
- qtbase5-dev,
- qttools5-dev,
- qttools5-dev-tools,
- zlib1g-dev

as already said, personally, i would not install
- libosgearth-dev [!armel !armhf],

the following packages do not seem mandatory to me:

- libcdr-dev (>= 0.1),
- libpagemaker-dev,
- libqt5opengl5-dev,
- libvisio-dev (>= 0.1),
- libwpg-dev,

they mostly relate to foreign file formats

and this one seems a bit overkill to me:
- python-all-dev (>= 2.6.6-3~),
you might get along with a smaller collection of python-dev modules :-)

buona fortuna!
a.l.e
Title: Re: Issue Compiling Scribus 1.5 src on Debian Testing (Stretch)
Post by: Danielsan on October 23, 2015, 03:23:32 PM
Yes I did it, it worked.

These were the missing dependencies:
libgraphicsmagick1-dev libhyphen-dev libosgearth-dev libpoppler-private-dev libpoppler-qt5-dev libtiff-dev libwpg-dev python-all-dev

In soldoni ce l'ho fatta. ;-)
Title: Re: Issue Compiling Scribus 1.5 src on Debian Testing (Stretch)
Post by: a.l.e on October 23, 2015, 04:00:28 PM
ottimo! complimenti!

i will keep that list around and i will try not to forget about looking at the PPA, next time!
Title: Re: Issue Compiling Scribus 1.5 src on Debian Testing (Stretch)
Post by: Danielsan on October 23, 2015, 08:39:56 PM
I would summarize:

1) Installing the right tools: packaging-dev, devscripts and build-essential

2) Download these two closer package to your Debian (remember that Ubuntu is based on a snapshot of Debian Sid), as I am using Debian Testing (Stretch) I downloaded these two: scribus-ng_1.5.0-0ubuntu15.10.0~ppa1.debian.tar.xz and scribus-ng_1.5.0.orig.tar.xz.

3) Extract as first scribus-ng-1.5.0.orig...tar.xz move scribus-ng_1.5.0-0ubuntu...tar.xz inside it and extract this one as well. Open a terminal inside the Scribus folder and launch the build command: debuild -uc -us. If there are missing dependencies those will be shown, in case install them and reissue the build command. IMPORTANT: the compiling may take several time, on my "crappy" laptop took around 4/5 hours.

4) When it is finished you will find the packages in the upper folder, they are named as ubuntu packages but are compiled for your Debian. I don't know how to change the names, probably there is a file able to do that if modified, anyway it doesn't matter, the build command creates 4 packages scribus, scribus-data, scribus-doc and scribus-dbg; in order to use Scribus you need to install just the first two.

Enjoy Scribus 1.5 on your Debian!
Title: Re: [RESOLVED] Compiling Scribus1.5 on Debian Testing from the dedicated Ubuntu PPA
Post by: Kunda on October 23, 2015, 08:51:32 PM
Glad it worked out.
Would you be interested in writing up your experience ? Perhaps adding to the wiki ?
Cheers,
Kunda
Title: Re: [RESOLVED] Compiling Scribus1.5 on Debian Testing from the dedicated Ubuntu PPA
Post by: a.l.e on October 24, 2015, 09:27:53 AM
@danielsan

the idea is the good one, but you don't need to take apart the PPA file to get to that information... it's freely available at the link i posted above!

so the points are

1) Instal build-essential

2) Read the .dsc file on the launchpad website:

  - Go to the "Scribus Team" page on Launchpad: https://launchpad.net/~scribus
  - Click on "PPA for Scribus friends" and then click on "View package details"
  - You should get a list of "Source" packages. Click on the latest "scribus-trunk" package
  - A the end of the page you should see a list of "Package files"
  - Click on the link to the .dsc file and you will see a text file

3) In the .dsc file, the "Build depends" section tells you which package this version of Scribus depends. The names for those packages are exactly the same or very similar to the ones used by Debian.

It's the same as you are suggesting, but you don't need to reverse engineer the package: all the information you need is on the website where you download the package :-)