[WORKAROUND] Allow to use boost:filesystem instead of std::filesystem, [BUGFIX] check_cxx_linker_flag
- Allows to use
boost:filesysteminstead ofstd::filesystemvia CMake flag.- This is to workaround runtime issues (SIGSEGV) related to misconfigured/buggy std::filesystem on some host configurations (e.g. CentOS 8 with manually installed gcc 10).
- Usage:
cmake ... -DMIOPEN_WORKAROUND_USE_BOOST_FILESYSTEM=On ...
- By-products
- [NFC][CMake] Improved logging in
check_cxx_linker_flag - [NFC] Some formatting for readability
- [NFC][CMake] Improved logging in
Locally tested (make check with debug configuration, make analyze etc.)
[Attribution] @junliume @JehandadKhan
- https://github.com/ROCm/MIOpen/labels/workaround
- https://github.com/ROCm/MIOpen/labels/non-miopen-bug
- https://github.com/ROCm/MIOpen/labels/urgency_blocker
- Proposed reviewers:
- @BrianHarrisonAMD
- @apwojcik
- @junliume
- Optional reviewers:
- @DrizztDoUrden
- @CAHEK7
- @shurale-nkn
- @averinevg
@BrianHarrisonAMD @apwojcik @junliume @JehandadKhan @DrizztDoUrden @CAHEK7 @shurale-nkn @averinevg Ready for reviewing, CI testing & merging.
Is there still more issues with std::filesystem leading to segfaults after the #3126 fix?
I was under the impression that the issue only came up when using GCC8, and not including stdc++fs, but seems like there must be some other way to have issues come up if you were hitting issues with CentOS 8 & GCC10.
@BrianHarrisonAMD Yes, @junliume knows more details.
https://github.com/ROCm/MIOpen/labels/TESTING_CI_PASSED except Windows, I guess.
LGTM
@junliume @BrianHarrisonAMD @apwojcik @JehandadKhan @DrizztDoUrden @CAHEK7 @shurale-nkn @averinevg Ready for (hopefully last) reviewing round.
Contains a bugfix now https://github.com/ROCm/MIOpen/labels/bug.
I highly recommend re-running CI.
@junliume It seems like the problem with CentOS8/gcc10 is not a blocker anymore? Even if so, I would recommend merging this soon because this PR contains a bugfix in check_cxx_linker_flag. Or, If we do not need boost:filesystem, then I can prepare the PR that contains only bugfixes and improvements.