InBetweenNames / gentooLTO

A Gentoo Portage configuration for building with -O3, Graphite, and LTO optimizations
GNU General Public License v2.0
571 stars 96 forks source link

Deepin and LTO #361

Closed glitchking007 closed 5 years ago

glitchking007 commented 5 years ago

Is anyone currently running the Deepin Desktop Environment with the default overlay CFLAGS? I'm about to start bringing my fresh install up to the safe CFLAGS then get more aggressive and try to bring it up to -Ofast. Was wondering if anyone has tried getting deepin working?

javashin commented 5 years ago

im going to install DDe today i will share

javashin commented 5 years ago

hmm looks like im gonna pass

deppin pkgs wants me to downgrade qt pkgs and enable gles2 for qt 
>=dev-qt/qtgui-5.13.0_pre gles2
# required by dev-qt/qtdeclarative-5.13.0_pre::pg_overlay[widgets]
# required by dde-base/dde-control-center-4.10.11::deepin
# required by dde-base/dde-meta-15.10.1::deepin
# required by dde-base/dde-meta (argument)
>=dev-qt/qtwidgets-5.13.0_pre gles2
# required by dde-base/dde-session-ui-4.9.11::deepin
# required by dde-base/dde-meta-15.10.1::deepin
# required by dde-base/dde-meta (argument)
>=x11-misc/lightdm-1.30.0 qt5

which i do not want because citra-emu dont work with qt with gles2 and i use citra lot .... bye

InBetweenNames commented 5 years ago

@glitchking007 I'm assuming you're using deepin-overlay? I'll test it out when I get a chance.

glitchking007 commented 5 years ago

Yes I'm using deepin-overly I switched to using -03 and lto + graphite from just ,-O2. control center worked on -02 after switching it segfaults when I try opening it

javashin commented 5 years ago

well i figured out now no gles2 and no downgrade of qt im emerging now .

javashin commented 5 years ago

well so far media-gfx/byzanz cant campile here
(media-gfx/deepin-screen-recorder-2.8.0:0/0::deepin, ebuild scheduled for merge) requires media-gfx/byzanz, media-gfx/byzanz (dde-extra/dde-meta-multimedia-0.2-r1:0/0::deepin, ebuild scheduled for merge) requires media-gfx/deepin-screen-recorder (dde-base/dde-meta-15.10.1:0/0::deepin, ebuild scheduled for merge) requires dde-extra/dde-meta-multimedia

@glitchking007 do you enabled multimedia ? and emerged those two pkgs ? byzanz and deepin-screen-recorder?

EDIT: ok disabling gif media-gfx/deepin-screen-recorder -gif drops byzanz dep

glitchking007 commented 5 years ago

Im using the 17.1 desktop profile with the deepin-overlay I and using kwin and have ~amd64 set globaly. I am not using multimedia right now.

javashin commented 5 years ago

other pkg failed too dde-base/dtkwidget-2.0.14::deepin

javashin commented 5 years ago

@glitchking007 what Qt Version ? i have 5.13.0 here

javashin commented 5 years ago

ok i found afix for dde-base/dtkwidge and qt 5.13.0

javashin commented 5 years ago

uff is taking long than i though i have to fix a lot of ebuilds and deps of deepin to build with new Qt 5.13 and a lot of manually "ebuild * unpack configure compile install qmerge" merges jejeje but for what deepin is a nice mixed qt/gtk desktop , made with GO. never care about deepin but i watched a video on youtube about the top 5 linux desktop and i tried elementary os livecd and was not very good to me this pantheon , so the next one was deepin i downloaded the wrong iso the installer one and i booted from my usb pendrive and i was not going to install it so i booted it on virtualbox and i installed it there and was too slow and based on ubuntu lts with old kernel so i deleted and i saw this issue before about deepin and want to know if i can get it working on my gentoo lto :>

InBetweenNames commented 5 years ago

Interesting that the control center segfaults. Are you familiar enough with gdb to get a stacktrace of where the segfault happens?

glitchking007 commented 5 years ago

I haven't used it before but I tried to use it. But it complained about no debugging symbols.

javashin commented 5 years ago

https://gist.github.com/javashin/fe8a8bc7deb9c471081cc76d3d6eebcc

deepin-movie-reborn fails with lto + ld.gold , and qtnetwork 5.13.0 , fails with no lto and ld.bfd but seems related to qtnetwork 5.13.0

javashin commented 5 years ago

wow what a mess i finally emerged all the deepin stuff , i can confirm deepin-control-center segfaults , also dde-dock , i have no desktop either everything is broken , just deepin-music and deepin-movie and deepin-mutter or deepin-metacity i dont know but i got window manager composited and no screen tearing . well im recompiling some core deps with no lto to see if i get a working desktop

javashin commented 5 years ago

yes dde-file-manager works fine now compiled with no lto

javashin commented 5 years ago

media-gfx/deepin-image-viewer segfaults too , by the way everything here was compiled with lto all the deepin-stuff and seems like removing lto from those deepin pkgs which are segfaulting gets fixed doing that

javashin commented 5 years ago

media-gfx/deepin-image-viewer fixed too with no lto

javashin commented 5 years ago

hmm deepin-control-center and dde-dock needs more than eliminating lto to stop segfault im trying with sane cflags now

javashin commented 5 years ago

@glitchking007 have u checked the dmesg when deepin-control-center segfault and dde-dock too

here segfault because of qtmultimedia

ModuleInitThrea = deepin-control-center [ 1332.163504] ModuleInitThrea[9043]: segfault at 3ef3e1bd70 ip 0000003eeb65f653 sp 00007f74ed9a48d8 error 7 in libQt5Multimedia.so.5.13.0[3eeb600000+100000] [ 1332.163530] Code: 83 c4 08 4c 89 e0 5b 41 5c c3 66 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 85 f6 74 20 48 8b 16 48 89 17 48 85 d2 74 0d ff 02 c3 66 0f 1f 84 00 00 00 00 00 c3 0f 1f 80 00 00 00 00 48 [ 1333.496507] dde-dock[8998]: segfault at 3ef3e1bd70 ip 0000003eeb65f653 sp 00007ffc2e157298 error 7 in libQt5Multimedia.so.5.13.0[3eeb600000+100000]

javashin commented 5 years ago

good after rebuild qtmultimedia with no lto dde-dock dont segfault anymore and deepin-control center either

javashin commented 5 years ago

no segfaults with

dde-base/dde-control-center-4.10.12::deepin was built with the following: USE="systemd -redshift" ABI_X86="(64)" CFLAGS="-march=native -mfpmath=both -funroll-loops -falign-functions=32 -fgraphite-identity -floop-nest-optimize -fno-semantic-interposition -fuse-ld=gold -O3 -fipa-pta -fno-plt -fno-math-errno -fno-trapping-math -fdevirtualize-at-ltrans -fno-stack-protector -pipe -Wl,-O2 -Wl,--as-needed,-z,now -Wl,--hash-style=gnu" CXXFLAGS="-march=native -mfpmath=both -funroll-loops -falign-functions=32 -fgraphite-identity -floop-nest-optimize -fno-semantic-interposition -fuse-ld=gold -O3 -fipa-pta -fno-plt -fno-math-errno -fno-trapping-math -fdevirtualize-at-ltrans -fno-stack-protector -pipe -Wl,-O2 -Wl,--as-needed,-z,now -Wl,--hash-style=gnu"

javashin commented 5 years ago

i tried to recompile back deepin-image-viewer with lto and segfaults again

[ 3178.644727] deepin-image-vi[30503]: segfault at 20 ip 00000000004326bb sp 00007ffca9919e10 error 4 in deepin-image-viewer[400000+fa000]

glitchking007 commented 5 years ago

I'm running qt version 5.12. I don't much experience with debugging trying to learn. I have not checked the dmesg. I haven't had time the last 2 days

javashin commented 5 years ago

well i got working deepin desktop with no segfaults -O3 as default and every thing lto with some exeptions

javashin commented 5 years ago

dde-base/dde-dock-4.10.5::deepin was built with the following: USE="" ABI_X86="(64)" CFLAGS="-march=native -mfpmath=both -funroll-loops -falign-functions=32 -fuse-ld=gold -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=3 -fuse-linker-plugin -fno-plt -fno-math-errno -fno-trapping-math -fno-stack-protector -pipe -Wl,-O2 -Wl,--as-needed,-z,now -Wl,--hash-style=gnu" CXXFLAGS="-march=native -mfpmath=both -funroll-loops -falign-functions=32 -fuse-ld=gold -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=3 -fuse-linker-plugin -fno-plt -fno-math-errno -fno-trapping-math -fno-stack-protector -pipe -Wl,-O2 -Wl,--as-needed,-z,now -Wl,--hash-style=gnu" LDFLAGS="-Wl,-O2 -Wl,--as-needed,-z,now -Wl,--hash-style=gnu -march=native -mfpmath=both -funroll-loops -falign-functions=32 -fuse-ld=gold -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=3 -fuse-linker-plugin -fno-plt -fno-math-errno -fno-trapping-math -fno-stack-protector -pipe"

javashin commented 5 years ago

dde-base/dde-control-center-4.10.12::deepin was built with the following: USE="systemd -redshift" ABI_X86="(64)" CFLAGS="-march=native -mfpmath=both -funroll-loops -falign-functions=32 -fuse-ld=gold -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=3 -fuse-linker-plugin -fno-plt -fno-math-errno -fno-trapping-math -fno-stack-protector -pipe -Wl,-O2 -Wl,--as-needed,-z,now -Wl,--hash-style=gnu" CXXFLAGS="-march=native -mfpmath=both -funroll-loops -falign-functions=32 -fuse-ld=gold -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=3 -fuse-linker-plugin -fno-plt -fno-math-errno -fno-trapping-math -fno-stack-protector -pipe -Wl,-O2 -Wl,--as-needed,-z,now -Wl,--hash-style=gnu" LDFLAGS="-Wl,-O2 -Wl,--as-needed,-z,now -Wl,--hash-style=gnu -march=native -mfpmath=both -funroll-loops -falign-functions=32 -fuse-ld=gold -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=3 -fuse-linker-plugin -fno-plt -fno-math-errno -fno-trapping-math -fno-stack-protector -pipe"

javashin commented 5 years ago

deepin-dock and deepin-control-center compiles fine with lto nd works fine the two after re-emerge QtMultimedia with no-lto @glitchking007 try rebuild qtmultimedia without lto and problem fixed

javashin commented 5 years ago

well i cant change the fonts on deepin-control-center maybe its related to lto who knows

EDIT: no problems with lto , noto-fonts was missing

glitchking007 commented 5 years ago

Ok thank you I will try it out when I get some time

javashin commented 5 years ago

Nice Desktop Compiled With LTO , Compatible With GentooLTO Certified , lol DeepinScreenshot_20190627121235

javashin commented 5 years ago

this issue can be closed since there is nothing wrong on building deepin with LTO with the exption of deepin-image-viewer and deepin-file-manager needs to be compiled without LTO to not segfault

better open a issue about QtMultimedia Compiled With LTO That Causes dde-dock to segfault and dde-control-center :) cheers and happy compiling.

javashin commented 5 years ago

well there is other pkg that not support LTO if compiled deepin-toolbar with llto the settings dont works \ without lto works fine