----- Forwarded message from David Tardon <dtardon@redhat.com> -----
Date: Tue, 11 Nov 2014 14:24:56 +0100
From: David Tardon <dtardon@redhat.com>
To: Noel Grandin <noel@peralex.com>
Subject: Re: windows and mergedlibs - help with debugging makefile
User-Agent: Mutt/1.5.23 (2014-03-12)
Hi,
On Tue, Nov 11, 2014 at 02:21:48PM +0200, Noel Grandin wrote:
HI
I'm trying to get --merged-libs working on Windows again. I fixed one bug,
but now I'm running into another with one of the unit tests.
The weird thing is that it hits only one unit test, so it doesn't seem
likely that this is a generic fault. But on the other hand there is nothing
really special about this unit test.
imerged.lib(mergedlo.dll) : error LNK2005: "public: __thiscall
connectivity::ORowSetValue::ORowSetValue(void)"
(??0ORowSetValue@connectivity@@QAE@XZ) already defined in CommonTools.o
Hi,
The problem is
$(eval $(call gb_CppunitTest_use_library_objects,connectivity_commontools,dbtools))
in connectivity/CppunitTest_connectivity_commontools.mk. That links the
object files from dbtools library directly to the test (so the test can
use even non-exported symbols). But in merged-libs build, dbtools is a
part of merged, so the symbols are present twice, which the linker does
not like.
But I really do not know how to solve this generically. If a test uses
gb_CppunitTest_use_library_objects, it means that it _needs_ to call
non-exported symbols. So making it an empty operation in merged-libs
build (thus using the code from merged) would not work. We would need to
make the function to link objects from all libs that are part of merged
and auto-magically disable the linking with merged. But that is very
hand-wavy and I do not even know if it is even possible without severe
changes. It would also immensely inflate the disk space needs for
merged-libs build, of course.
A possible workaround is to identify which non-exported symbol(s) from
dbtools the test uses (you can find that easily by dropping the
gb_CppunitTest_use_library_objects call) and export it/them.
D.
----- End forwarded message -----
--
David Tardon
Context
- [dtardon -AT- redhat.com: Re: windows and mergedlibs - help with debugging makefile] · David Tardon
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.