Duplicate linked objects are do not have to be a deadly problem, but they can introduce very hard to debug problems. As we set stuff like compile flags and include paths on the linktarget (aka the library) and in the above case the object file is linked in by two libraries, the flags it is compiled with are actually nondeterministic. That is Very Bad(tm)! So the smoketest/smoketest.cxx will either be compiled with the CFLAGS of Library/libsmoketest.so or with those of CppunitTest/libtest_smoketest.so -- actually it can be compiled different on different machines with the same code. It can even be compiled different on the same machine! So again: This is Very Bad(tm) and we should probably never ever have let that happen. Now it might be possible that the one doing the initial migration carefully checked that both libs are compiled exactly the same on all platforms (I highly doubt that), but even then this totally unproof against future changes. Someone might innocently add a define to the compile flags of one library and create a terribly hard to reproduce heisenbug. So this has to go, it should never have been there in the first place. How can this be removed? There are two possibilities: a) create a smoketest/smoketest_libtest_smoketest.cxx with this content: #include "smoketest.cxx" and then use that file instead of smoketest/smoketest.cxx in CppunitTest/libtest_smoketest. That way, the object gets build twice (with possibly different flags and defines) and everything is fine. Ugly, but does the job. b) create a static library smoketest and add the smoketest/smoketest.cxx to it. Now instead link that static library into both of the dynamic ones and everything is fine. Once all the warnings are gone, we should probably make gbuild abort if it detects one of those.
see http://nabble.documentfoundation.org/what-s-with-the-linking-warnings-td3818744.html
hi Bjoern, thanks for writing this description for why these warnings are bad, but i'm afraid i've fixed most of these today before you even filed this bug. well, perhaps some are still around that don't happen on Linux or require some esoteric configuration to trigger...
Resolving, also duplicate objects are now an error: http://cgit.freedesktop.org/libreoffice/core/commit/?id=58f5a26e2d4d6998a30e423ac67335cf62e97226
Bjoern Michaelsen committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=58f5a26e2d4d6998a30e423ac67335cf62e97226 fdo#47246: abort on duplicate linked objects
Stephan Bergmann committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=f33b3791edf7ae8eba979c16d3338ef7c0b4a768 Related fdo#47246: Extract objects used in both svp and gtk3 plugins
Michael Stahl committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=5cc6398985181574b68ab15386176fb806386490 fdo#47246: desktop: factor out a winlauncher static library
Michael Stahl committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=fe4be5047988782f3143a1af505c5eecb3f2af5a fdo#47246: dtrans: fix multiply linked ImplHelper
Michael Stahl committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=813a57cb1afa16bb306ced96d367fa1f55906620 fdo#47246: desktop: factor out a winextendloadenv static library
Michael Stahl committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=5142e628b563a9876e8884c5dd4914eff4a2f307 fdo#47246: fpicker: merge fop library into fps:
Michael Stahl committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=16e3e5437efe38308615d42924baa735f94b2484 fdo#47246: ucpodma: fix duplicate linked object
Michael Stahl committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=a13a88bd2c673d059b60e339dcf3b8fabf991f18 fdo#47246: canvas: split out static library directxcanvas
Michael Stahl committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=f04e6b0e965e3a4301e705fb41a15c5560765b5b fdo#47246: fpicker: merge fop into fps: remove Fopentry.cxx
I added Fix submitter as assignee because this will ease queries and bug tracking.
I didnt fix, Michael did. I only elaborated on the issue.
Riccardo Magliocchetti committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=b576aa1318ebdfea8349c23da7a8b1237156a8f9 fdo#47246: vcl: fix --enable-headless build
Migrating Whiteboard tags to Keywords: (EasyHack DifficultyBeginner SkillScript ) [NinjaEdit]