Issue 79414 - chart2 build fails with --without-stlport4
Summary: chart2 build fails with --without-stlport4
Status: CLOSED FIXED
Alias: None
Product: General
Classification: Code
Component: chart (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: PC All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: bjoern.milcke
QA Contact: issues@graphics
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-09 16:22 UTC by ht990332
Modified: 2013-02-24 21:18 UTC (History)
5 users (show)

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


Attachments
build error. (12.04 KB, text/plain)
2007-07-09 16:23 UTC, ht990332
no flags Details
opportunistic sal fix (647 bytes, text/plain)
2007-07-11 22:35 UTC, thb
no flags Details
Explanation of the current problem with InternalDataProvider.cxx (10.92 KB, text/plain)
2007-07-12 13:05 UTC, bjoern.milcke
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description ht990332 2007-07-09 16:22:48 UTC
chart2 build fails with --without-stlport4 but it works when I remove chart2
--without-stlport4, it builds correctly.
Comment 1 ht990332 2007-07-09 16:23:31 UTC
Created attachment 46654 [details]
build error.
Comment 2 bjoern.milcke 2007-07-09 23:01:18 UTC
->ht: What does that switch do? Is an earlier version of stlport used then?
Comment 3 ht990332 2007-07-09 23:49:12 UTC
No, it uses the STL libs from my gcc4 installation instead. This was working in
OpenOffice 2.2.1
Comment 4 bjoern.milcke 2007-07-10 14:25:36 UTC
Confirmed, added thb to CC list.
Comment 5 bjoern.milcke 2007-07-11 22:02:18 UTC
->ht: Couldn't reproduce yet, as OOo build fails in sal with
"--without-stlport4" in m219 (the version I am currently working on). Usage of
STL classes in sal seems to be new. Does an issue for this already exist?
Comment 6 bjoern.milcke 2007-07-11 22:12:33 UTC
Weird error in sal. Here is the compiler output and the relevant source:

/ooo/chart07/src680-m219/sal/osl/all/debugbase.cxx: In function 'bool
osl_detail_ObjectRegistry_storeAddresses(const char*)':
/ooo/chart07/src680-m219/sal/osl/all/debugbase.cxx:106: error: invalid
initialization of reference of type 'const rtl::OString&' from expression of
type 'const rtl::OUString'

debugbase.cxx:58
typedef std::vector<rtl::OString, rtl::Allocator<rtl::OUString> > OStringVec;

struct StaticDebugBaseAddressFilter
    : rtl::StaticWithInit<OStringVec const, StaticDebugBaseAddressFilter> {
    OStringVec const operator()() const {
        OStringVec vec;
        rtl_uString * pStr = 0;
        rtl::OUString const name(
            RTL_CONSTASCII_USTRINGPARAM("OSL_DEBUGBASE_STORE_ADDRESSES") );
        if (osl_getEnvironment( name.pData, &pStr ) == osl_Process_E_None) {
            rtl::OUString const str(pStr);
            rtl_uString_release(pStr);
            sal_Int32 nIndex = 0;
            do {
                vec.push_back( rtl::OUStringToOString(
                                   str.getToken( 0, ';', nIndex ),
                                   RTL_TEXTENCODING_ASCII_US ) );
            }
            while (nIndex >= 0);
        }
        return vec;
    }
};

debugbase.cxx:102
    OStringVec const& rVec = StaticDebugBaseAddressFilter::get();
    if (rVec.empty())
        return false;
    // check for "all":
    rtl::OString const& rFirst = rVec[0];  // this is line 106

Comment 7 ht990332 2007-07-11 22:18:56 UTC
Not sure, the only module before chart2 in m219 that failed to build for me was
basebmp and that was fixed with this patch http://pastebin.archlinux.org/9306 
(I don't remember with cws).
Comment 8 thb 2007-07-11 22:35:32 UTC
Created attachment 46705 [details]
opportunistic sal fix
Comment 9 thb 2007-07-11 22:36:53 UTC
@dbo: that allocator type - typo or on purpose?

with the patch, sal at least builds like a charm ;-)
Comment 10 thb 2007-07-11 22:40:31 UTC
For the records: this prolly never occured to anyone out there, since it happens
with a dbg-util-enabled build - might even be a nice _STLP_DEBUG feature...
Comment 11 bjoern.milcke 2007-07-12 12:56:37 UTC
Fixed the first error by changing "lcl_ValarrayToSequence" to
"lcl_ValarrayToSequence< tDataType::value_type >". (See CWS chart07).

However, there remains a problem, I don't know how to fix. If I fix the problem
it works, but it no longer does on Solaris with STL-port. See attachment for
explanation.
Comment 12 bjoern.milcke 2007-07-12 13:05:32 UTC
Created attachment 46723 [details]
Explanation of the current problem with InternalDataProvider.cxx
Comment 13 bjoern.milcke 2007-07-12 13:10:37 UTC
Er, comment on my attachment: I think the STL implementation used by gcc is
broken that it isn't able to add an element to a vector< tMyMultimap::value_type
>, not the breakage after patching.
Comment 14 bjoern.milcke 2007-07-12 14:17:11 UTC
Hm, looking closely at the code: why is the temporary storage a vector? It can
as well be a multimap, as the order is not important. So, doing this change
makes all compilers happy.

Actually, now chart2 compiles completely without STL-Port in my Linux OOo build.
Comment 15 bjoern.milcke 2007-07-12 14:33:34 UTC
For the problem in sal see Issue 79535
Comment 16 bjoern.milcke 2007-07-16 10:17:09 UTC
Did OOo build wiht switch --without-stlport4 with patches for sal, basebmp and
the changes commited to this CWS in chart2, successfully.
Comment 17 ht990332 2007-07-16 14:26:34 UTC
Confirmed fixed here as well on i686. Chart2 builds correctly now without-stlport4
Thanks bm.
Comment 18 bjoern.milcke 2007-07-30 15:45:44 UTC
Found integrated in master SRC680.m223