From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 86E223844036; Wed, 28 Apr 2021 01:22:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 86E223844036 From: "ed.gcc at pobox dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/100240] Compiler crashes with segmentation fault on a chrono library using nvcc Date: Wed, 28 Apr 2021 01:22:41 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 10.3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ed.gcc at pobox dot com X-Bugzilla-Status: WAITING X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Apr 2021 01:22:41 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100240 Eduard Rozenberg changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ed.gcc at pobox dot com --- Comment #9 from Eduard Rozenberg --- I run into similar errors (probably the same issue), when trying to use Nvi= dia NCCL. For ex. when trying to run `make` on the nccl tests (https://github.com/NVIDIA/nccl-tests.git), I get: nccl-tests/src' Compiling all_reduce.cu > ../build/all_reduce.o /usr/include/c++/10.3.0/chrono: In substitution of =E2=80=98template template using __is_harmonic =3D std::__bool_constant<(std::ratio<((_Period2::num / std::chrono::duration<_R= ep, _Period>::_S_gcd(_Period2::num, _Period::num)) * (_Period::den / std::chrono::duration<_Rep, _Period>::_S_gcd(_Period2::den, _Period::den))), ((_Period2::den / std::chrono::duration<_Rep, _Period>::_S_gcd(_Period2::de= n, _Period::den)) * (_Period::num / std::chrono::duration<_Rep, _Period>::_S_gcd(_Period2::num, _Period::num)))>::den =3D=3D 1)> [with _Per= iod2 =3D _Period2; _Rep =3D _Rep; _Period =3D _Period]=E2=80=99: /usr/include/c++/10.3.0/chrono:473:154: required from here /usr/include/c++/10.3.0/chrono:428:27: internal compiler error: Segmentation fault 428 | _S_gcd(intmax_t __m, intmax_t __n) noexcept | ^~~~~~ Please submit a full bug report, with preprocessed source if appropriate. See for instructions. make[1]: *** [Makefile:84: ../build/all_reduce.o] Error 1 And I get build errors when trying to build pytorch since it also tries to = use Nvidia nccl. The following might be relevant/related but can't tell for sure: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100101 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100102 Even if the issue eventually gets fixed in GCC 11/12, what will the solutio= n be for GCC 10.3 (10.x) users? Asking because it normally takes operating syste= ms and Nvidia months or years to move to or support the next major GCC version, and in particular it's recommended to use the same GCC version as the opera= ting system's kernel is built with, so I wouldn't be able to decide to just use = GCC 11 or 12.=