MIOpen icon indicating copy to clipboard operation
MIOpen copied to clipboard

[WORKAROUND] Allow to use boost:filesystem instead of std::filesystem, [BUGFIX] check_cxx_linker_flag

Open atamazov opened this issue 1 year ago • 6 comments

  • Allows to use boost:filesystem instead of std::filesystem via 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

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

atamazov avatar Jul 25 '24 22:07 atamazov

@BrianHarrisonAMD @apwojcik @junliume @JehandadKhan @DrizztDoUrden @CAHEK7 @shurale-nkn @averinevg Ready for reviewing, CI testing & merging.

atamazov avatar Jul 26 '24 21:07 atamazov

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 avatar Jul 26 '24 21:07 BrianHarrisonAMD

@BrianHarrisonAMD Yes, @junliume knows more details.

atamazov avatar Jul 27 '24 22:07 atamazov

https://github.com/ROCm/MIOpen/labels/TESTING_CI_PASSED except Windows, I guess.

atamazov avatar Jul 27 '24 22:07 atamazov

LGTM

BrianHarrisonAMD avatar Jul 29 '24 21:07 BrianHarrisonAMD

@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.

atamazov avatar Jul 29 '24 23:07 atamazov

@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.

atamazov avatar Aug 05 '24 12:08 atamazov