|
Boost Users : |
Subject: Re: [Boost-users] Sun C++ 5.10 and BGL adjacency_list (solved)
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2010-02-13 13:17:47
On Sat, 13 Feb 2010, Nicholas Brealey wrote:
> Jeremiah Willcock wrote:
>> On Sun, 7 Feb 2010, Nicholas Brealey wrote:
>>
>>> I am trying to use the Boost Graph Library from Boost 1.42.0 with Sun
>>> Studio 12 update 1 but the adjacency_list.cpp example from the
>>> libs/graph/example directory does not compile.
>>>
> (trimmed)
>>
>> The Sun compiler has many issues with compiling BGL; the regression tests
>> show many failures. In particular, bundled properties are problematic. I
>> believe the issue was partial specialization on pointer-to-member types,
>> but I am not sure about that. The code should work if you use old-style
>> properties; look at the documentation, book, or other examples and test
>> cases for that style.
>>
>> -- Jeremiah Willcock
>
> I finally managed to figure out what was going wrong.
>
> Using BOOST_ASSERT_CONFIG gives an error:
>
> "/home/nick/boost_1_42_0/boost/config/compiler/sunpro_cc.hpp", line 128:
> Error: #error "Unknown compiler version - please run the configure tests and
> report the results".
>
> Sun CC 5.10 defines __SUNPRO_CC as 0x5100 and sunpro_cc.hpp says:
>
> // last known and checked version is 0x590:
> #if (__SUNPRO_CC > 0x590)
> # if defined(BOOST_ASSERT_CONFIG)
> # error "Unknown compiler version - please run the configure tests and
> report the results"
> # endif
> #endif
>
>
> So I ran the configure program and produced a config file (see below).
>
>
> Then I ran:
>
> $ CC -I /home/nick/boost_1_42_0 -D
> BOOST_SITE_CONFIG=/home/nick/boost_test2/suncc510.hpp -D
> BOOST_DETECT_OUTDATED_WORKAROUNDS -o adjacency_list adjacency_list.cpp
> "/home/nick/boost_1_42_0/boost/type_traits/config.hpp", line 37: Error: The
> divisor of a remainder must be greater than zero.
> "/home/nick/boost_1_42_0/boost/detail/allocator_utilities.hpp", line 194:
> Error: The divisor of a remainder must be greater than zero.
> "/home/nick/boost_1_42_0/boost/iterator/detail/config_def.hpp", line 53:
> Error: The divisor of a remainder must be greater than zero.
> "/home/nick/boost_1_42_0/boost/mpl/aux_/nested_type_wknd.hpp", line 22:
> Error: The divisor of a remainder must be greater than zero.
> "/home/nick/boost_1_42_0/boost/utility/addressof.hpp", line 64: Error: The
> divisor of a remainder must be greater than zero.
> "/home/nick/boost_1_42_0/boost/iterator/detail/config_def.hpp", line 53:
> Error: The divisor of a remainder must be greater than zero.
> "/home/nick/boost_1_42_0/boost/iterator/detail/config_def.hpp", line 53:
> Error: The divisor of a remainder must be greater than zero.
> "/home/nick/boost_1_42_0/boost/iterator/detail/config_def.hpp", line 53:
> Error: The divisor of a remainder must be greater than zero.
> "/home/nick/boost_1_42_0/boost/iterator/detail/config_def.hpp", line 53:
> Error: The divisor of a remainder must be greater than zero.
> "/home/nick/boost_1_42_0/boost/iterator/detail/config_def.hpp", line 53:
> Error: The divisor of a remainder must be greater than zero.
> "/home/nick/boost_1_42_0/boost/graph/properties.hpp", line 373: Error: The
> divisor of a remainder must be greater than zero.
> "/home/nick/boost_1_42_0/boost/multi_index/detail/access_specifier.hpp", line
> 49: Error: The divisor of a remainder must be greater than zero.
> 12 Error(s) detected.
>
> The final error is:
> #if BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590)) && !defined
> (BOOST_GRAPH_NO_BUNDLED_PROPERTIES)
> // This compiler cannot define a partial specialization based on a
> // pointer-to-member type, as seen in boost/graph/subgraph.hpp line 985 (as
> of
> // trunk r53912)
> # define BOOST_GRAPH_NO_BUNDLED_PROPERTIES
> #endif
Yes -- I put that in there to make more test cases pass with the Sun
compilers.
> So I ran:
>
> $ CC -O -I /home/nick/boost_1_42_0 -D
> BOOST_SITE_CONFIG=/home/nick/boost_test2/suncc510.hpp -D BOOST_STRICT_CONFIG
> -o adjacency_list adjacency_list.cpp
>
> which compiled without errors and WHEN RUN gives the same output as the g++
> version.
Good. Could you please file a ticket for adding your new config file (I
don't handle that, and don't remember who does)? Could you also please
check whether all of the BGL tests pass with
BOOST_GRAPH_NO_BUNDLED_PROPERTIES off on your compiler (you can just
comment out the #define for it for testing purposes)? Thank you.
-- Jeremiah Willcock
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net