[scribus] Linking error

Morten Langlo mlanglo at mail.dk
Fri Sep 26 15:07:30 UTC 2014


Fri, Sep 26, 2014 at 01:01:36PM +0200, skrev JLuc:
> Le 23/09/2014 14:53, Morten Langlo a écrit :
> >
> >And the dev-package MUST be the same version as the .so package.
> Ah ! What are the pratcical consequences ?
> As for now, i've never had to force-update the dev packages when minor-updating  Qt
> (that's not including the switch from Qt4 to Qt5)

Since the dev-package describe the functions and how they are called, 
You get weird kinds of trouble if a new package has new, removed or change functions, 
and You do not have the corresponding dev-package with the right descriptions.
 
> Anyway, here, my issue happens at compile time, so apt-get installed dev-packages should not be relevant.
> 
> >So add this to whatever cmake command You use:
> >    -DCMAKE_EXE_LINKER_FLAGS="-lQt5Quick -lQt5PrintSupport"
> >before You compile, do a make clean to avoid trouble.
> 
> I tried doing so and FYI my updated script is there :
> https://github.com/JLuc/makscribus/blob/master/maksvn
> but in my case, it doesnt help.
> 
> Error still is :
> Linking CXX executable scribus-1.5.0.svn
> /usr/bin/ld: CMakeFiles/scribus-1.5.0.svn.dir/ui/helpbrowser.cpp.o:
> référence au symbole non défini «_ZN12QPrintDialogC1EP8QPrinterP7QWidget»
> /home/jluc/dev/Qt/Qt5.3.2/5.3/gcc_64/lib/libQt5PrintSupport.so: error adding symbols: DSO missing from command line
> collect2: error: ld returned 1 exit status

That message means, add "-lQt5PrintSupport" as an option to the linker.

So the above linker option seems not to be used, instead You could try 
either CMAKE_EXE_LINKER_FLAGS_DEBUG, CMAKE_EXE_LINKER_FLAGS_MINSIZEREL, 
CMAKE_EXE_LINKER_FLAGS_RELEASE or CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO

or maybe set all of them, it doesn't hurt and quicker than try one at a time.

You find a description of all these variables in CMakeCache.txt in the build directory.

If it still doesn't work, a last resort could be to manually add 
  -lQt5Quick -lQt5PrintSupport 
to the file "Your_build_directory/scribus/CMakeFiles/scribus.dir/link.txt"
  just before CMakeFiles/scribus.dir/moc_

so it starts with something like this

/usr/bin/c++ -O2 -Wall -fPIC -lQt5Quick -lQt5PrintSupport CMakeFiles/scribus.dir/moc_...

This is really a messy way of doing it, but it might work. 
The file - is big, more than 38k bytes, so be careful.

Then cd to the root of the build directory and continue 
the build by typing make and it should succeed in linking scribus.

Otherwise, just now i can't think of something else to try.

Enjoy


-- 
Morten Langlo
Denmark




More information about the scribus mailing list