reductionista opened a new pull request #537:
URL: https://github.com/apache/madlib/pull/537
This is an assortment of bug fixes and improvements for our optional C++11
support.
It's mostly only relevant for those who were compiling by passing the
-DCXX11++ option manually.
Previously, that was the only way to compile with C++11, and it only
affected clang (not gcc).
But in addition to fixing some bugs and warnings, this PR also improves the
logic in the CMake
configuration files. Previously if you had too recent a version of boost (
> v1.64) and the -DCXX11++
option was not passed, it would just fail. With the new behavior, it will
auto-enable CXX11++ support
if the version of Boost requires it. It could still fail, if the compiler
doesn't support C++11, but this
is no worse than the previous behavior. If the option is passed manually
and the detected Boost is
too old, it will still fail as before... but with a hint to upgrade Boost
before trying again.
Also, if boost is not detected, the version it automatically downloads will
now depend on whether
-DCXX11++ was passed.
This has still only been tested on OSX platform, but the option is now
available for other platforms as
well (in case it works).
Critical bug fixes:
- Use bernoulli_distribution from boost::, not stl:: or boost::TR1
The TR1 sub namespace no longer exists in recent versions of boost.
Previously, this was fixed by using the C++11 STL version if it's
available, otherwise falling back on TR1. But that didn't work
(caused a crash) due to a slight incompatibility between the C++11 and
the boost version. The boost version still exists, just not under
TR1--and
we already use it elsewhere in the codebase, so this should be
the cleanest fix.
- Fix memory-corruption crash in std::domain_error(), by copying
formatted
string to memory allocated safely via postgres with palloc()
Non-critical fixes/improvements:
- Convert ptr_fun() to function() to get rid of C++11 deprecation warning
- src/dbal/Reference_proto.hpp: Fix an error in the template definition
of class Ref. The default value for IsMutable should be the value true
or false, not the type bool. The only reason this wasn't generating
compiler errors is that IsMutable happens to be passed explicitly in
every place in the code where the template is instantiated--so the
default was ignored.
- Hide global boost symbols from external libraries
We were already doing this for all STL symbols--for the same reasons,
doing it for boost as well should make MADlib more robust when
integrating with 3rd party libraries.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]