Issue 14048 - can no longer build toolkit with -frtti since IComboListBoxHelper added
Summary: can no longer build toolkit with -frtti since IComboListBoxHelper added
Status: CLOSED FIXED
Alias: None
Product: gsl
Classification: Code
Component: code (show other issues)
Version: OOo 1.1 Beta2
Hardware: All Linux, all
: P5 (lowest) Trivial (vote)
Target Milestone: OOo 1.1 RC
Assignee: khendricks
QA Contact: issues@gsl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-05-03 17:07 UTC by khendricks
Modified: 2003-06-06 13:53 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
patch for toolkit/inc/toolkit/helper/IComboListBoxHelper.hxx as used on Irix Port (1.02 KB, patch)
2003-06-06 03:20 UTC, Unknown
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description khendricks 2003-05-03 17:07:45 UTC
Hi,

Up through 644 m11 I have been able to build every OOo build
using -frtti as my CXXFLAGS in unxlngppc4.mk

Now since the addition of the IComboListBoxHelper.hxx and friends
in the OOo 1.1 Beta 2 of toolkit I get the following error
when checkdll is run:

Checking DLL ../unxlngppc.pro/lib/check_libtk644lp.so ...: ERROR: 
../unxlngppc.pro/lib/check_libtk644lp.so: 

undefined symbol: _ZTIN7toolkit19IComboListBoxHelperE
dmake:  Error code 1, while making '../unxlngppc.pro/lib/libtk644lp.so'
---* TG_SLO.MK *---

ERROR: Error 65280 occurred while making /src2/ooo11b2/toolkit/util
dmake:  Error code 1, while making 'build_all'
---* TG_SLO.MK *---



And c++filt _ZTIN7toolkit19IComboListBoxHelperE shows:

typeinfo for toolkit::IComboListBoxHelper

and yes I am building with -frtti

Is there any reason why gcc 3.2.2 can not generate the proper type information
here?  I looked at IComboListBoxHelper.hxx and noticed there where no
local or class vars included int he class defintion but and it first glance
I thought all of the methods were pure virtual (= 0).

But 3 new mthods at the end are classifeid as virtual but are not pure virtual
methods like the ones above it.

I am not sure this has anything top do with what is confusing gcc here and why
it can't generate type info for a global IComboListBoxHelper class.

Will someone please take a look at that class and see if they can recreate the
problem when building with -frtti

Thanks,

Kevin
Comment 1 christof.pintaske 2003-05-05 13:18:29 UTC
cp->hr: I think this is less of a toolkit issue but requires more of
an gcc expert. Can you comment on the problem resp. check with MT what
needs to be done ?
Comment 2 khendricks 2003-05-05 13:37:05 UTC
Hi, 
 
Just to add:   as long as this does not indicate some other 
more serious probem, this is is not a showstopper at all for me.

I was able to cleanly build all of OOo 1.1 Beta 2 once I 
added the -fno-rtti switch for the complete build. 
 
I just don't understand C++ well enough to understand what is so
special about the IComboListBoxHelper class that prevents gcc from
creating the proper runtime type info it seems to need.  

This is the only class in the entire OOo build that seems to have this 
problem so I was hoping someone more experienced with C++ could give
me a hint as to what to look at. 
 
I am going to reduce the priority of this way down, since I can make a
clean build by adding -fno-rtti. 
 
Thanks for any hints or advice. 
 
Kevin 

Comment 3 Unknown 2003-05-19 07:50:52 UTC
I have troubles getting past this as well.

This is the error message I see:

------------------------------
Making Module-Definitionfile : ../unxirgm.pro/misc/tk644im.def
just a dummy for UNIX
ld32: WARNING 84 : /usr/lib32/libpthread.so is not used for resolving
any symbol.
ld32: WARNING 84 :
/usr/local/gcc-2.95.3/lib/gcc-lib/mips-sgi-irix6.5/2.95.3/libgcc.a is
not used for resolving any symbol.
ld32: WARNING 84 :
/usr/local/gcc-2.95.3/lib/gcc-lib/mips-sgi-irix6.5/2.95.3/libstdc++.a
is not used for resolving any symbol.
ld32: WARNING 157: Unresolved text symbol
"toolkit::IComboListBoxHelper type_info function" -- 1st referenced by
../unxirgm.pro/slo/vclxaccessiblelist.o.
        Use linker option -v to see when and which objects, archives
and dsos are loaded.  
ld32: WARNING 157: Unresolved text symbol
"toolkit::IComboListBoxHelper type_info node" -- 1st referenced by
../unxirgm.pro/slo/vclxaccessiblelist.o.
        Use linker option -v to see when and which objects, archives
and dsos are loaded.  
Checking DLL ../unxirgm.pro/lib/check_libtk644im.so ...: ERROR:
37026:/oowp/beta2/workarea/solver/644/unxirgm.pro/bin/checkdll: rld:
Fatal Error: unresolvable symbol in
../unxirgm.pro/lib/check_libtk644im.so:
__tfQ27toolkit19IComboListBoxHelper
dmake:  Error code 1, while making '../unxirgm.pro/lib/libtk644im.so'

ERROR: Error 65280 occurred while making /oowp/beta2/workarea/toolkit/util
---* TG_SLO.MK *---

Unfortunately, we cant build OO with -no-rtti on IRIX.
Anyone suggest another possible workaround?
Comment 4 Unknown 2003-05-19 07:57:26 UTC
Sorry, edit that last post, we CAN build with -fno-rtti, it is the
other way around.... meaning we CANT build with -frtti

So now I gotta start all over again.... *sigh*
Comment 5 jens-heiner.rechtien 2003-05-20 12:10:26 UTC
Set to target Milestone OOo 1.1 RC
Comment 6 mbr 2003-06-01 18:38:18 UTC
I can confirm that the same bug breaks the FreeBSD port of
1.1Beta2 on FreeBSD.

Martin
Comment 7 foskey 2003-06-02 00:57:05 UTC
The issue here is the mixture of rtti and no-rtti.  More than likely 
when the particular element is built it is build explicitly with no-
rtti and when the module that links is built it is *defaulting* to 
rtti.  The solution is fairly simple figure out where this module is 
compiled and remove the explicit no-rtti and see if it breaks both 
types of build.  This will be a constant problem until we decide that 
we use one or the other as a default.  The rtti code adds a few meg 
to the download and perhaps slows down the application for no real 
benefit.  Can't we just standardise?
Comment 8 jens-heiner.rechtien 2003-06-02 10:23:05 UTC
Kevin, George, Ken

I'm not sure if anyone uses dynamic_cast, but if not, everything
should be compiled with fno-rtti, because it buys us nothing. GCC is
smart enough to create RTTI information if it's needed for exception
handling even with RTTI switched of.

If this doesn't work with your GCC version than just switch RTTI on.
The difference is not that huge.

Kevin, I reassign this one back to you since this is just an issue
with either building everything with or without RTTI. BTW since is a
Prio 5 task shouldn't we target it to OOo 2.0?

 
Comment 9 khendricks 2003-06-02 13:02:21 UTC
Hi, 
 
Actually, I don't think this is a mixing issue at all. 
PPC Linux used to force the build with -frtti and I grepped the entire source and 
outside of the mozilla addressbook libraries (which have nothing to do with this 
issue),  there were -fno-rtti switches. 
 
If you look in the reverse there are some -frtti switches in some of the module 
makefiles so since the last switch controls things, any mixing will come from building 
with nothing or with -fno-rtti in your solenv. 
 
I did examine this case in great detail when I first ran  into the problem and the library 
itself that contains the IComboListBoxHelper source itsled is the one that wont pass 
checkdll. 
 
Recompiling this module with neither -frtti nor -fno-rtti does not work either. 
 
So this problem is that something in the IComboListBoxHelper source confuses the 
compiler and it fails to build the proper runtime type information is needs.  This file 
must be compiled with -fno-rtti which is probably indicative of a bug in gcc or the 
source. 
 
Kevin 
 
Comment 10 jens-heiner.rechtien 2003-06-04 10:48:50 UTC
HR->OJ: IComboBoxHelper has three virtual methods which are neither
pure virtual nor implemented somewhere. This leads to the need for a
RTTI symbol for IComboBoxHelper in vclxaccesiblelist.cxx on some
versions of GCC which is unresolved since there is nowhere an
implementation of IComboBoxHelper. We need either a dummy
implementation or a *all* methods have to be pure virtual. Please fix ...

HR->KHENDRICKS: reassigning to OJ
Comment 11 khendricks 2003-06-04 13:03:34 UTC
Hi, 
 
Martin Blapp (FreeBSD) tested a fix based on Heiner's and Chris's explanation of 
what was causing the problem, and he said it worked. 
 
So for the record I am posting his message /patch here just in case it helps. 
 
Date: Wed Jun 4 01:40:00 2003 
From: Martin Blapp <mb@imp.ch> 
To: dev@porting.openoffice.org, "" <Jens-Heiner.Rechtien@Sun.COM> 
Reply to: dev@porting.openoffice.org 
 
Hi, 
 
Yes it seems you were both correct. This patch solved it for me: 
 
--- ../toolkit/inc/toolkit/helper/IComboListBoxHelper.hxx.orig  Wed May  7 11:05:11 
2003 
+++ ../toolkit/inc/toolkit/helper/IComboListBoxHelper.hxx       Wed Jun  4 00:07:03 
2003 
@@ -103,10 +103,10 @@ 
                virtual void                    SetNoSelection() = 0; 
                virtual USHORT                  GetSelectEntryPos( USHORT nSelIndex = 0 ) 
const = 0; 
                virtual BOOL            IsInDropDown() const = 0; 
-        virtual Rectangle       GetEntryCharacterBounds( const sal_Int32 
_nEntryPos, const sal_Int32 _nCharacterIndex ) const; 
-        virtual long            GetIndexForPoint( const Point& rPoint ) const; 
-        virtual ::com::sun::star::uno::Reference< 
::com::sun::star::datatransfer::clipboard::XClipboard > 
-                                GetClipboard(); 
+               virtual Rectangle       GetEntryCharacterBounds( const sal_Int32 
_nEntryPos, const sal_Int32 _nCharacterIndex )  { } const ; 
+               virtual long            GetIndexForPoint( const Point& rPoint ) { } const ; 
+               virtual ::com::sun::star::uno::Reference< 
::com::sun::star::datatransfer::clipboard::XClipboard > 
+               GetClipboard() { } ; 
        }; 
 } 
 #endif // TOOLKIT_HELPER_COMBOLISTBOXHELPER_HXX 
 
Martin 
 
Comment 12 Frank Schönheit 2003-06-04 13:42:05 UTC
pointed to this because Ocke is on vacation ....

I know very little 'bout this interface, but from the little I know,
and from looking at it's use cases, it seems that there was some ...
lazyness involved originally. No implementation is required for these
method.

I suggest making them pure virtual, instead of the fix suggested above
- simply because of the "Inline Virtual Is Evil" (TM) paradigm.

Additionally, implementing them empty only generates unnecessary
symbols (on all platforms, probably), which unnecessarily pollutes the
namespace, (slightly) increases library load time, and such (let's
stop the beginning on such things :)

Kevin, could you do this change (making them pure virtual), and check
this in, please?
Comment 13 khendricks 2003-06-04 14:13:39 UTC
Hi, 
 
Okay. I have made the change and I am rebuilding toolkit with -frtti just to check. 
Assuming all is well I will check this into cws_srx644_ooo11beta2 citing this issue. 
 
I will then resolve this as fixed after the test and commit. 
 
Thanks, 
 
Kevin 
 
Comment 14 khendricks 2003-06-04 14:41:28 UTC
Hi, 
 
Arrgghh!  To check this properly, I will need to rebuild the whole OOo with -frtti since 
my latest build was made with -fno-rtti to work around this very issue! 
 
Without a rebuild with -frtti, some of the support libs not built with -frtti result in new 
missing symbols ... 
 
Checking DLL ../unxlngppc.pro/lib/check_libtk644lp.so ...: ERROR: 
../unxlngppc.pro/lib/check_libtk644lp.so: undefined symbol: 
_ZTIN10comphelper34OAccessibleExtendedComponentHelperE 
dmake:  Error code 1, while making '../unxlngppc.pro/lib/libtk644lp.so' 
---* TG_SLO.MK *--- 
 
ERROR: Error 65280 occurred while making /src2/ooo11b2/toolkit/util 
 
So checking this will take some time.  
 
Kevin 
 
Comment 15 Unknown 2003-06-06 03:19:31 UTC
Kevin, I have verified this, it worked fine for me!
I will include my patch as well (even though you dont need it)
Comment 16 Unknown 2003-06-06 03:20:29 UTC
Created attachment 6694 [details]
patch for toolkit/inc/toolkit/helper/IComboListBoxHelper.hxx as used on Irix Port
Comment 17 khendricks 2003-06-06 13:52:14 UTC
Hi George, 
 
Thanks for testing it and your patch.  I have just commited it to 
cws_srx644_ooo11beta2 so I am now resolving this as fixed and then closing it 
since you have already verified it. 
 
Thanks, 
 
Kevin 
 
 
 
Comment 18 khendricks 2003-06-06 13:52:34 UTC
setting to fixed 
Comment 19 khendricks 2003-06-06 13:53:12 UTC
marking issue as closed since build error fix was already verified