Created attachment 544248 [details] archived libreoffice emerge build.log Emerge libreoffice fails at linkage. Profile is linux/amd64/17.0. Strange thing is that I already have the same version of libreoffice installed, and the last time it got built without trouble: $ eix libreoffice$ [I] app-office/libreoffice Installed versions: 6.0.3.2(09:48:33 PM 06/23/2018)(branding cups gtk -bluetooth -coinmp -dbus -debug -eds -firebird -googledrive -gstreamer -gtk2 -java -jemalloc -kde -libressl -mysql -odk -pdfimport -postgres -test -vlc ELIBC="-FreeBSD" LIBREOFFICE_EXTENSIONS="-nlpsolver -scripting-beanshell -scripting-javascript -wiki-publisher" PYTHON_SINGLE_TARGET="python3_6 -python2_7 -python3_4 -python3_5" PYTHON_TARGETS="python2_7 python3_6 -python3_4 -python3_5") Attached log is from rebuilding it with USE=+dbus, but same exact problem occurs at the same place if I do plain # emerge -1 libreoffice revdep-rebuild shows that the system is consistent, and I have rebuilt @world at least once since switching to 17.0 profile. build.log attached. /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/app-office/libreoffice-6.0.3.2/work/libreoffice-6.0.3.2/workdir/CxxObject/sw/source/ui/config/mailconfigpage.o: warning: relocation agai nst `_ZThn80_N4cppu30PartialWeakComponentImplHelperIJN3com3sun4star4mail19XConnectionListenerEEE7acquireEv' in read-only section `.text' /var/tmp/portage/app-office/libreoffice-6.0.3.2/work/libreoffice-6.0.3.2/workdir/CxxObject/sw/source/ui/config/mailconfigpage.o: In function `SwTestAccountSettingsDialog::Test()': mailconfigpage.cxx:(.text+0x4726): undefined reference to `non-virtual thunk to cppu::PartialWeakComponentImplHelper<com::sun::star::mail::XConnectionListener>::acquire()' /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/app-office/libreoffice-6.0.3.2/work/libreoffice-6.0.3.2/workdir/CxxObject/sw/source/ui/config/mailconfigpage.o: relocation R_X86_64_PC32 against undefined symbol `_ZThn80_N4cppu30PartialWeakComponentImplHelperIJN3com3sun4star4mail19XConnectionListenerEEE7acquireEv' can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Bad value collect2: error: ld returned 1 exit status make[1]: *** [/var/tmp/portage/app-office/libreoffice-6.0.3.2/work/libreoffice-6.0.3.2/sw/Library_swui.mk:20: /var/tmp/portage/app-office/libreoffice-6.0.3.2/work/libreoffice-6.0.3.2/instdir/program/libswuilo.so] Error 1
Created attachment 544250 [details] emerge environment
Created attachment 544252 [details] emerge info GENTOO_VM= CLASSPATH="" JAVA_HOME="" JAVACFLAGS="" COMPILER=""
I'm not sure either. Please try with 6.0.6.2, which is currently slated for stabilisation.
Created attachment 544608 [details] libreoffice-6.0.6.2 build.log Same problem here. /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/app-office/libreoffice-6.0.6.2/work/libreoffice-6.0.6.2/workdir/CxxObject/sw/source/ui/config/mailconfigpage.o: warning: relocation against `_ZThn80_N4cppu30PartialWeakComponentImplHelperIJN3com3sun4star4mail19XConnectionListenerEEE7acquireEv' in read-only section `.text' /var/tmp/portage/app-office/libreoffice-6.0.6.2/work/libreoffice-6.0.6.2/workdir/CxxObject/sw/source/ui/config/mailconfigpage.o: In function `SwTestAccountSettingsDialog::Test()': mailconfigpage.cxx:(.text+0x4726): undefined reference to `non-virtual thunk to cppu::PartialWeakComponentImplHelper<com::sun::star::mail::XConnectionListener>::acquire()' /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/app-office/libreoffice-6.0.6.2/work/libreoffice-6.0.6.2/workdir/CxxObject/sw/source/ui/config/mailconfigpage.o: relocation R_X86_64_PC32 against undefined symbol `_ZThn80_N4cppu30PartialWeakComponentImplHelperIJN3com3sun4star4mail19XConnectionListenerEEE7acquireEv' can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Bad value
So, I've only now gotten around to look into this further. Problem has nothing to do with -fPIC - it's undefined reference to _ZThn80_N4cppu30PartialWeakComponentImplHelperIJN3com3sun4star4mail19XConnectionListenerEEE7acquireEv (non-virtual thunk to cppu::PartialWeakComponentImplHelper<com::sun::star::mail::XConnectionListener>::acquire()) that is the problem. So, I looked up where this template is defined (I expected multiple object files, since header with implementation is included in multiple places - https://github.com/LibreOffice/core/search?utf8=%E2%9C%93&q=%22compbase.hxx%22) But the only one with it appears to be uibase/dbui/mailmergehelper.on: # find CxxObject/ -type f -exec sh -c 'file $1 | grep "ELF" &>/dev/null && objdump -d $1 | grep 000000000000000e <_ZThn80_N4cppu30PartialWeakComponentImplHelperIJN3com3sun4star4mail19XConnectionListenerEEE7acquireEv>: 16: e8 00 00 00 00 callq 1b <_ZThn80_N4cppu30PartialWeakComponentImplHelperIJN3com3sun4star4mail19XConnectionListenerEEE7acquireEv+0xd> CxxObject/sw/source/uibase/dbui/mailmergehelper.on And this object file is not passed to ld when libswuilo.so is made. If I manually call ld with this extra file appended, g++ links the library just fine. It's really strange that nobody else but me appears to be affected by this issue, since it still reliably persists for me - both 6.1.5.2 and 6.2.1.2 from repo fail to build in the exact same way. Is this something I shoudl report to libreoffice devs? Isn't compiled template definitions supposed to be included in every object file, and linker then throws away all the references but one?
libreoffice builds normally if i change gcc optimization to -O2. But fails like I described with -O1.
Do you still have this problem with current versions?