Add support for modular build structure. - #196
Conversation
|
Please review and merge this PR at your earliest convenience. |
|
Regarding the CI failures..
I'll investigate 2 further. But everything else someone else would need to deal with. And I suspect it's all existing issues unrelated to this PR. |
Becheler
left a comment
There was a problem hiding this comment.
Hope that helps a bit 😅
|
|
||
| - name: Install Clang 10 | ||
| if: matrix.config.cxx == 'clang++-10' | ||
| run: sudo apt-get update && sudo apt-get install -y clang-10 |
There was a problem hiding this comment.
../../../boost/numeric/ublas/tensor/extents/extents_static_size.hpp:74:5: note: non-constexpr function 'copy<const unsigned long *, unsigned long *>' cannot be used in a constant expression
std::copy(li.begin(), li.end(), _base.begin());
Ubuntu 20.04 ships with libstdc++9, where std::copy is not constexpr:
run: sudo apt-get update && sudo apt-get install -y clang-10 libstdc++-10-dev
|
|
||
| - name: Install Clang 11 | ||
| if: matrix.config.cxx == 'clang++-11' | ||
| run: sudo apt-get update && sudo apt-get install -y clang-11 |
There was a problem hiding this comment.
run: sudo apt-get update && sudo apt-get install -y clang-11 libstdc++-10-dev
Ubuntu 20.04 ships with libstdc++9, where std::copy is not constexpr
There was a problem hiding this comment.
test/tensor/tensor/test_tensor_operator_arithmetic_binary.cpp:58: error: in
"test_tensor_binary_arithmetic/test_tensor_dynamic<std____1__pair<float_ boost__numeric__ublas__basic_column_major<unsigned long_ long>>>":
check r(i) == t2(i) / (t1(i)+three)*(t1(i)+one) - t2(i) has failed [-1.71428585 != -1.71428561]
The tests execute for the first time in years, now on arm64 and much newer compilers so suddenly FMA contraction breaks the float equality check in test_tensor_operator_arithmetic_binary.cpp:58
Maybe use -ffp-contract=off ? :
<toolset>gcc:<cxxflags>"-Wall -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-but-set-variable -ffp-contract=off"
<toolset>clang:<cxxflags>"-Wall -Wno-unknown-pragmas -Wno-sign-compare -ffp-contract=off"
One more possible fix: ublas/include/boost/numeric/ublas/tensor/expression_evaluation.hpp Lines 237 to 241 in 8708cbf
|
|
Another bit of investigation.. The UBsan errors for filesystem appear to be actual UB in that library. |
|
@grafikrobot look at boostorg/filesystem@3e94c81
Do you think adding |
Did not help.. |
|
@grafikrobot I tried those fixes over your PR : bd7392c and it results in a green CI: #200 I don't know how you want to proceed, you can cherry pick the commit maybe ? |
82a3165 to
e2078bf
Compare
This is part of the effort to make the Boost libraries "modular" for build and consumption. See https://lists.boost.org/Archives/boost/2024/01/255704.php and https://github.com/grafikrobot/boost-b2-modular/blob/b2-modular/README.adoc for more information.
This PR depends on the following other PRs being merged to both develop and master branches of the respective repos:
This PR will be changed to ready for review, i.e. not draft, when the above are merged. Do not merge this one until that time.