Opened 9 years ago

Closed 6 years ago

#9327 closed Bugs (wontfix)

Fix compilation using Sun CC standard library

Reported by: vz-boost@… Owned by: Raffi Enficiaud
Milestone: To Be Determined Component: test
Version: Boost 1.54.0 Severity: Problem
Keywords: Cc:

Description

I am not sure if this patch is going to be accepted, as it makes the code slightly longer and less clear, but it is needed to make the library build with Sun CC using its standard library (that we're unfortunately stuck with due to binary compatibility concerns). As std::vector simply doesn't provide a template ctor from 2 iterators, this is the best that can be done, AFAICS.

Here is the same patch as in the attachment, for convenience:

  • boost/test/impl/unit_test_main.ipp

    diff --git a/boost/test/impl/unit_test_main.ipp b/boost/test/impl/unit_test_main.ipp
    index 9874c69..6896343 100644
    a b public:  
    110110        string_token_iterator tit( tc_to_run, (dropped_delimeters = "/", kept_delimeters = dt_none) );
    111111
    112112        while( tit != string_token_iterator() ) {
    113             m_filters.push_back(
    114                 std::vector<single_filter>( string_token_iterator( *tit, (dropped_delimeters = ",", kept_delimeters = dt_none)  ),
    115                                             string_token_iterator() ) );
     113            std::vector<single_filter> f;
     114            for( string_token_iterator titf( *tit, (dropped_delimeters = ",", kept_delimeters = dt_none) ); titf != string_token_iterator(); ++titf )
     115                f.push_back( *titf );
     116
     117            m_filters.push_back( f );
    116118
    117119            ++tit;
    118120        }

Attachments (1)

suncc_unit.diff (929 bytes ) - added by vz-boost@… 9 years ago.
Proposed patch to fix the build with Sun CC

Download all attachments as: .zip

Change History (9)

by vz-boost@…, 9 years ago

Attachment: suncc_unit.diff added

Proposed patch to fix the build with Sun CC

comment:1 by Raffi Enficiaud, 7 years ago

Owner: changed from Gennadiy Rozental to Raffi Enficiaud

We have now a builder for SunCC, and I believe the compilation should work now. Would you please test the boost master branch for us? We do not have access to this compiler.

comment:2 by Raffi Enficiaud, 7 years ago

Status: newassigned

comment:3 by vz-boost@…, 7 years ago

Sorry, but I wasn't able to find this SunCC builder, could you please point me to it? I'd like to see how is it configured, but I suspect that it uses the newer (everything is relative...) STLPort-based standard library instead of the ancient RogueWave-based default standard library (see http://docs.oracle.com/cd/E19205-01/819-5267/bkakb/index.html for more information) that we are unfortunately forced to use.

comment:4 by Raffi Enficiaud, 7 years ago

It is under SunOS there http://www.boost.org/development/tests/develop/developer/test.html

apparently using oracle compiler. This is the closest we have to your setup. Since I do not know anything about that platform and the toolchain, please report us in what extent the configuration is different to yours (it is using sun-stlport4).

comment:5 by vz-boost@…, 7 years ago

stlport4 does confirm that it uses STLPort (or has a very misleading name), which explains why it passes. I haven't retried building the latest sources yet, but if they haven't changed and still use the same ctor, it still won't build with the default RogueWave STL as it doesn't have a template vector ctor.

comment:6 by Raffi Enficiaud, 7 years ago

We will be needing your support for addressing this issue then. Would it be possible for you to test the current master or develop branch and report us any compilation issue? You can just run bjam from libs/test/test. We will then be able to know more about the effort needed by this issue.

comment:7 by VZ, 7 years ago

It's probably useless to keep this open, I tried building Boost 1.60 with this compiler and it's just hopeless, there are too many errors due to missing std::iterator_traits and I'm not sure I can (or even want...) to correct them.

comment:8 by Raffi Enficiaud, 6 years ago

Resolution: wontfix
Status: assignedclosed

There are several builds on the boost regression dashboard showing the result for the sun platform. I am sorry I cannot help more with this, at least the ppl making the compiler for this architecture are aware of the problems.

Note: See TracTickets for help on using tickets.