Hi all.
I am trying to install Scribus on my Gentoo setup. I've notice significant speedup with all complex packages, when I compile them with -flto, so i trid to use that on Scribus.
With LTO ( latest gcc - 7.2), it compiles and installs fine, but it croaks on start. With non-LTO, it compiles and runs fine.
I tried to run it through ld-linux.so and it seems that it dies during dyring dynamic linking phase.
Code: [Select]
LD_DEBUG=all /lib/ld-linux-x86-64.so.2 $(which scribus)
gets me:
...
Quote
30426: symbol=_ZN7QString16fromAscii_helperEPKci; lookup in file=/usr/lib64/libQt5Core.so.5
30426: binding file /usr/bin/scribus
to /usr/lib64/libQt5Core.so.5
: normal symbol `_ZN7QString16fromAscii_helperEPKci' [Qt_5]
Has anyone tried t compile it with -flto ?
Just to clarify: I'm not whining.
Just asking - should Scribus work with LTO optimisations ( and the error is elshwere - possibly within QtCore) or is the probably cause a fault within Scribus sources.
If anyone is interested, here are my FLAGS:
COMMON_FLAGS="-march=native -pipe -O3 -flto=8 -ffat-lto-objects -fuse-linker-plugin -fuse-ld=gold -fno-delete-null-pointer-checks -fgraphite-identity -floop-nest-optimize"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS} -fpermissive"
LDFLAGS="-Wl,-O3 -Wl,--sort-common -Wl,-flto=8 -Wl,--as-needed -ffat-lto-objects -fuse-linker-plugin -fuse-ld=gold -fno-delete-null-pointer-checks -fgraphite-identity -floop-nest-optimize"
Out of those, only really relevant here are "flto=8 -ffat-lto-objects"
hi brane,
personally, i've never heared of LTO, so i really don't know if anybody has tried it in combination with scribus.
what you are quoting refers to qt5... but does not tell what the error is...
just a guess from my side: if you want to compile with LTO, could it be, that all libraries you want to bind should also be compiled with the same flag?
... as said: just a guess!
Quote from: a.l.e on September 04, 2017, 01:47:11 PM
just a guess from my side: if you want to compile with LTO, could it be, that all libraries you want to bind should also be compiled with the same flag?
... as said: just a guess!
I have quite a few packages and libraries compiled with LTO. Until now, if there was a problem, it was exclusively during compile phase, not at runtime.
LTO doesn't cross a border between packages and libraries- it is just an optimisation that can be used between units of the same package- to the outside world, package compiled with LTO should behave just the same as ordinary one. Exception is static linking, but even that is handled in backwards-compatible manner and shouldn't make a difference.
if you give me instructions on how to compile LTO enabled on a debian (testing) machine, i can give a try here and see if i face the same issue...
otherwise, well, you can try to write a ticket in the bug tracker (https://bugs.scribus.net) and see if jean or craig have a clue about this...
sorry, that i can't help you more with this...
a.l.e