Are we using SimpleReferenceObject correctly?

Henrik /KaarPoSoft henrik at kaarposoft.dk
Tue Jan 29 11:33:36 PST 2013


On 01/28/2013 09:00 PM, Henrik /KaarPoSoft wrote:
> On 01/28/2013 02:22 PM, Michael Stahl wrote:
>> On 27/01/13 22:55, Henrik /KaarPoSoft wrote:
>>> Dear all,
>>>
>>> As described in the mailing-list-thread
>>> Issues building LibreOffice 4.0.0.1
>>> http://lists.freedesktop.org/archives/libreoffice/2013-January/044838.html
>>>
>>> I am trying to build and package LibreOffice 4.0.0.* for KaarPux
>>> http://kaarpux.kaarposoft.dk/
>>>
>>> I am starting a new mailing-list thread here to try to address
>>> one issue at a time.
>>>
>>> With LibreOffice 4.0.0.2, Stephans patch
>>> http://cgit.freedesktop.org/libreoffice/core/commit/?id=d71e8fb17bd008751909ef2fabc6ff4f1e2db187
>>>
>>> no other pathes and the configuration attached as "config.txt"
>>> building is now stuck at
>>> [build LNK] Library/libmysqllo.so
>>> with
>>> undefined reference to 'typeinfo for salhelper::SimpleReferenceObject'
>>
>> it seems that typeinfo is hidden in the salhelper library, the lines are
>> explicitly commented out (salhelper/source/gcc3.map):
>>
>>      # _ZTIN9salhelper21SimpleReferenceObjectE;
>>      # _ZTSN9salhelper21SimpleReferenceObjectE;
>>
>> on the other hand the wildcard at the beginning should match these:
>>
>>     _ZTI*; _ZTS*; # weak RTTI symbols for C++ exceptions
>>
>> indeed it is exported here:
>>
>>>> nm --defined-only --extern-only
>>>> solver/unxlngx6/lib/libuno_salhelpergcc3.so.3 | grep _ZTI | grep
>>>> SimpleReferenceObject
>>> 0000000000208ac0 V _ZTIN9salhelper21SimpleReferenceObjectE
>>
>> but the mysql library does not actually use it here:
>>
>>>> nm solver/unxlngx6/lib/libmysqllo.so | grep _ZTI | grep
>>>> SimpleReferenceObject
>>
>> despite some objects from that library including that FValue.hxx:
>>
>>> grep -r FValue.hxx
>>> workdir/unxlngx6/Dep/LinkTarget/Library/libmysqllo.so.d
>>>   /master/solver/unxlngx6/inc/connectivity/FValue.hxx \
>>> /master/solver/unxlngx6/inc/connectivity/FValue.hxx :
>>>   /master/solver/unxlngx6/inc/connectivity/FValue.hxx \
>>>   /master/solver/unxlngx6/inc/connectivity/FValue.hxx \
>>>   /master/solver/unxlngx6/inc/connectivity/FValue.hxx \
>>>   /master/solver/unxlngx6/inc/connectivity/FValue.hxx \
>>
>> so the difference seems to be that your gcc does generate typeinfo and
>> whatnot for a class that is not actually used.
>>
>
> THANK YOU VERY MUCH for this excellent technical insight.
>
> My gcc is build with those configure options:
>
> gcc -v
> Using built-in specs.
> COLLECT_GCC=gcc
> COLLECT_LTO_WRAPPER=/libexec/gcc/x86_64-unknown-linux-gnu/4.7.2/lto-wrapper
> Target: x86_64-unknown-linux-gnu
> Configured with: ../gcc-4.7.2/configure --prefix= --enable-shared
> --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
> --enable-languages=c,c++ --disable-multilib --disable-bootstrap
> --with-system-zlib --with-pkgversion=KaarPux
> Thread model: posix
> gcc version 4.7.2 (KaarPux)
>
> Looking at ArchLinux and Fedora, I have now rebuild gcc with those
> additional settings:
> --disable-libunwind-exceptions
> --enable-gnu-unique-object
> --enable-linker-build-id
> --with-linker-hash-style=gnu
> although it is not clear to me if those settings would make any
> difference regarding this problem.
>
> I have looked at http://gcc.gnu.org/install/configure.html
> but nothing rings a bell, and RTTI is not mentioned there.
>
> I will revert here on the list with build results for LO with my new gcc.

Building LO with GCC with the above-mentioned settings also fails ))-:

However, I am not so sure gcc is to blame...

nm --defined-only --extern-only 
solver/unxlngx6/lib/libuno_salhelpergcc3.so.3 | grep _ZTI | grep 
SimpleReferenceObject

just shows, as far as I can tell, that salhelpergcc3.so.3 contains a 
reference to SimpleReferenceObject which seems correct to me.

But maybe the linker...

Looking at the
[build LNK] Library/libmysqllo.so
command-line, we have -ldbtoolslo

And
nm ./solver/unxlngx6.pro/lib/libdbtoolslo.so | grep 
ORowSetValueDecorator | wc -l
shows 35 references.
(full output attached)

So I am conjecturing that dbtools actually (indirectly) references 
SimpleReferenceObject
which is defined in libuno_salhelpergcc3.so.3
... and this library is not linked in
[build LNK] Library/libmysqllo.so

But that still does not explain why it works for everyone else, but me.

Michael, do you have a log where you could copy the exact commandline for
[build LNK] Library/libmysqllo.so

Any further help would be much appreciated.

/Henrik

-------------- next part --------------
nm ./solver/unxlngx6.pro/lib/libdbtoolslo.so | grep ORowSetValueDecorator 
00000000000b7290 T _ZN12connectivity21ORowSetValueDecoratoraSERKNS_12ORowSetValueE
00000000000b7450 t _ZN12connectivity21ORowSetValueDecoratorD0Ev.local.169
00000000000b7d80 t _ZN12connectivity21ORowSetValueDecoratorD1Ev.local.170
00000000000b7d80 t _ZN12connectivity21ORowSetValueDecoratorD2Ev.local.171.6845
00000000000a4dc0 T _ZN12connectivity26ODatabaseMetaDataResultSet7setRowsERKSt6vectorIS1_IN3rtl9ReferenceINS_21ORowSetValueDecoratorEEESaIS5_EESaIS7_EE
0000000000090630 t _ZN3rtl9ReferenceIN12connectivity21ORowSetValueDecoratorEED1Ev.local.2943
0000000000090630 t _ZN3rtl9ReferenceIN12connectivity21ORowSetValueDecoratorEED2Ev.local.2944.10822
0000000000067280 t _ZNK12connectivity12_GLOBAL__N_123ConstantValueExpression4fillERKSt6vectorIN3rtl9ReferenceINS_21ORowSetValueDecoratorEEESaIS6_EE.26922
000000000006c550 t _ZNK12connectivity12_GLOBAL__N_123ConstantValueExpression8evaluateERKSt6vectorIN3rtl9ReferenceINS_21ORowSetValueDecoratorEEESaIS6_EE.26918
0000000000067210 t _ZNK12connectivity12_GLOBAL__N_123UnaryFunctionExpression4fillERKSt6vectorIN3rtl9ReferenceINS_21ORowSetValueDecoratorEEESaIS6_EE.26978
00000000000c3c60 t _ZNK12connectivity12_GLOBAL__N_123UnaryFunctionExpression8evaluateERKSt6vectorIN3rtl9ReferenceINS_21ORowSetValueDecoratorEEESaIS6_EE.26973
00000000000b72b0 t _ZNK12connectivity12_GLOBAL__N_124BinaryFunctionExpression4fillERKSt6vectorIN3rtl9ReferenceINS_21ORowSetValueDecoratorEEESaIS6_EE.27031
00000000000c8140 t _ZNK12connectivity12_GLOBAL__N_124BinaryFunctionExpression8evaluateERKSt6vectorIN3rtl9ReferenceINS_21ORowSetValueDecoratorEEESaIS6_EE.27027
0000000000089660 t _ZNSt12_Destroy_auxILb0EE9__destroyIN9__gnu_cxx17__normal_iteratorIPN3rtl9ReferenceIN12connectivity21ORowSetValueDecoratorEEESt6vectorIS8_SaIS8_EEEEEEvT_SE_.local.2480.14307
00000000000895d0 t _ZNSt12_Destroy_auxILb0EE9__destroyIN9__gnu_cxx17__normal_iteratorIPSt6vectorIN3rtl9ReferenceIN12connectivity21ORowSetValueDecoratorEEESaIS9_EES4_ISB_SaISB_EEEEEEvT_SG_.local.2496.12465
0000000000091600 t _ZNSt12_Destroy_auxILb0EE9__destroyIPSt6vectorIN3rtl9ReferenceIN12connectivity21ORowSetValueDecoratorEEESaIS7_EEEEvT_SB_.local.2377
00000000000749d0 t _ZNSt12_Vector_baseIN3rtl9ReferenceIN12connectivity21ORowSetValueDecoratorEEESaIS4_EED2Ev.local.158
0000000000091810 t _ZNSt20__uninitialized_copyILb0EE13__uninit_copyIPSt6vectorIN3rtl9ReferenceIN12connectivity21ORowSetValueDecoratorEEESaIS7_EESA_EET0_T_SC_SB_.local.2481.12358
0000000000098fb0 t _ZNSt6vectorIN3rtl9ReferenceIN12connectivity21ORowSetValueDecoratorEEESaIS4_EE19_M_emplace_back_auxIIS4_EEEvDpOT_.local.2490
0000000000071780 t _ZNSt6vectorIN3rtl9ReferenceIN12connectivity21ORowSetValueDecoratorEEESaIS4_EE20_M_allocate_and_copyIN9__gnu_cxx17__normal_iteratorIPKS4_S6_EEEEPS4_mT_SE_.isra.131.40282
000000000008ac40 t _ZNSt6vectorIN3rtl9ReferenceIN12connectivity21ORowSetValueDecoratorEEESaIS4_EEaSERKS6_.local.2474.14249
0000000000092af0 t _ZNSt6vectorIN3rtl9ReferenceIN12connectivity21ORowSetValueDecoratorEEESaIS4_EEC1Em.local.2381
000000000008dd70 t _ZNSt6vectorIN3rtl9ReferenceIN12connectivity21ORowSetValueDecoratorEEESaIS4_EEC1ERKS6_.local.2365
0000000000092af0 t _ZNSt6vectorIN3rtl9ReferenceIN12connectivity21ORowSetValueDecoratorEEESaIS4_EEC2Em.local.2382.14500
000000000008dd70 t _ZNSt6vectorIN3rtl9ReferenceIN12connectivity21ORowSetValueDecoratorEEESaIS4_EEC2ERKS6_.local.2366.8301
0000000000098cf0 t _ZNSt6vectorIN3rtl9ReferenceIN12connectivity21ORowSetValueDecoratorEEESaIS4_EED1Ev.local.2378
0000000000098cf0 t _ZNSt6vectorIN3rtl9ReferenceIN12connectivity21ORowSetValueDecoratorEEESaIS4_EED2Ev.local.2379.9004
0000000000098d60 t _ZNSt6vectorIS_IN3rtl9ReferenceIN12connectivity21ORowSetValueDecoratorEEESaIS4_EESaIS6_EE19_M_emplace_back_auxIIRKS6_EEEvDpOT_.local.2362
0000000000091690 t _ZNSt6vectorIS_IN3rtl9ReferenceIN12connectivity21ORowSetValueDecoratorEEESaIS4_EESaIS6_EE20_M_allocate_and_copyIN9__gnu_cxx17__normal_iteratorIPKS6_S8_EEEEPS6_mT_SG_.isra.129.40240.12333
0000000000091930 t _ZNSt6vectorIS_IN3rtl9ReferenceIN12connectivity21ORowSetValueDecoratorEEESaIS4_EESaIS6_EEaSERKS8_.local.2468
000000000009ba70 t _ZNSt6vectorIS_IN3rtl9ReferenceIN12connectivity21ORowSetValueDecoratorEEESaIS4_EESaIS6_EED1Ev.local.2375
000000000009ba70 t _ZNSt6vectorIS_IN3rtl9ReferenceIN12connectivity21ORowSetValueDecoratorEEESaIS4_EESaIS6_EED2Ev.local.2376.15701
000000000039b720 V _ZTIN12connectivity21ORowSetValueDecoratorE
000000000015c540 V _ZTSN12connectivity21ORowSetValueDecoratorE
000000000039b700 d _ZTVN12connectivity21ORowSetValueDecoratorE.local.3803


More information about the LibreOffice mailing list