From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id MBkxK8pbEF9wPwAA0tVLHw (envelope-from ) for ; Thu, 16 Jul 2020 13:53:14 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id ePEjJ8pbEF+MKQAAB5/wlQ (envelope-from ) for ; Thu, 16 Jul 2020 13:53:14 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id EA7B2940225 for ; Thu, 16 Jul 2020 13:53:13 +0000 (UTC) Received: from localhost ([::1]:39182 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jw4Jz-0000u6-5W for larch@yhetil.org; Thu, 16 Jul 2020 09:53:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34144) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jw4Jq-0000tL-GG for bug-guix@gnu.org; Thu, 16 Jul 2020 09:53:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43473) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jw4Jq-00080B-7H for bug-guix@gnu.org; Thu, 16 Jul 2020 09:53:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jw4Jq-0005s0-6h for bug-guix@gnu.org; Thu, 16 Jul 2020 09:53:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#42392: GCC includes ordering issue? g++: error: 'round' is not a member of 'std' Resent-From: maxim.cournoyer@gmail.com Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 16 Jul 2020 13:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 42392 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 42392@debbugs.gnu.org X-Debbugs-Original-To: bug-guix Received: via spool by submit@debbugs.gnu.org id=B.159490756022530 (code B ref -1); Thu, 16 Jul 2020 13:53:02 +0000 Received: (at submit) by debbugs.gnu.org; 16 Jul 2020 13:52:40 +0000 Received: from localhost ([127.0.0.1]:55019 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jw4JT-0005rK-NV for submit@debbugs.gnu.org; Thu, 16 Jul 2020 09:52:40 -0400 Received: from lists.gnu.org ([209.51.188.17]:54820) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jw4JQ-0005rA-Ta for submit@debbugs.gnu.org; Thu, 16 Jul 2020 09:52:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34040) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jw4JQ-0000qO-LP for bug-guix@gnu.org; Thu, 16 Jul 2020 09:52:36 -0400 Received: from mail-qv1-xf2d.google.com ([2607:f8b0:4864:20::f2d]:36034) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jw4JO-0007ws-Dp for bug-guix@gnu.org; Thu, 16 Jul 2020 09:52:36 -0400 Received: by mail-qv1-xf2d.google.com with SMTP id h18so2712711qvl.3 for ; Thu, 16 Jul 2020 06:52:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=hcLnd3yfK/KRX283bcP6OjWMd4T0njr00PIcvm0GGmg=; b=BpGPXYBkh0wLaDH7FxdnZgCxQ81nkiQ4PEM9/rX96qURNSgVa5SS2bRI+WzlFKor0M RCJGV3c81ygky2pHnVk+n2pIzOujr8lKXJYtlrX8tAQit6zXXnvmAFaE3Q5MZGIe7/JP UOzKMRQJgUYWcZ84Zd40mdm3iP9qN6BHMqA+7tlvQmsr6BvpyeeBMoA+goY6lgnl9wvl m/CNSlU3eb787z6B1XxRZgr4v3iE5FMSNTwUH1OGF58uGIVQMhF5OQjcbmgyhI6VHgfD iIk8k07QxXmtoegruCYC+b2Exb5jA2rqK5o+rYcSWLZDasm5MAHCcHKwodAD0syOZv4A XxUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=hcLnd3yfK/KRX283bcP6OjWMd4T0njr00PIcvm0GGmg=; b=q38gx7bGYNUCsbVHSHVmOG9xs4io+4qQDMRdjYNxzO/CO/t89GVilaeB2Qgj6EYpDQ sOpTMAZxaBjhGgO0w3oromAuZk34hRbWhF2UOIi+iK4/11DDIoeOf4gRye/rffSse5xJ 72Tx5HPj/rME2z/8PCzujJElPlQK/h+KphWGxXL6DqotibySd2gwM5aB/+XWE2x2D2TG NuVuwpbYTGPGMIpcbsE+5H4U5xyVFe0Wc8z+uJiv57GuVMqCxtLRFz+cWjzGGsk/7hdF B0dmw+unfVJFzznBPAVYMXdTkkltSM1jj0agHl1rr2rIQWxK3C15CPOeJKY78/SczFYT euhA== X-Gm-Message-State: AOAM533LOjXxUa44pCNlLWs2m8bwKhhS3I0g3UBFMBCCsjjEdNSC9A2I WEHXwlBsn12U5QCDyOak5gDK87RA X-Google-Smtp-Source: ABdhPJzbVLUOoTcnsrqb2dVKI6YlcOq3b/bmdV3bBgw9piAJAG+d0I+RmS69Z7d0fMv77J58vOXHUA== X-Received: by 2002:a0c:f802:: with SMTP id r2mr4316843qvn.197.1594907553154; Thu, 16 Jul 2020 06:52:33 -0700 (PDT) Received: from hurd (dsl-149-149.b2b2c.ca. [66.158.149.149]) by smtp.gmail.com with ESMTPSA id o18sm6417412qkk.91.2020.07.16.06.52.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jul 2020 06:52:32 -0700 (PDT) From: maxim.cournoyer@gmail.com X-Google-Original-From: maxim@hurd.i-did-not-set--mail-host-address--so-tickle-me Date: Thu, 16 Jul 2020 09:51:11 -0400 Message-ID: <87imenk1ps.fsf@hurd.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::f2d; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qv1-xf2d.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -2.3 (--) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=gmail.com header.s=20161025 header.b=BpGPXYBk; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: 1.09 X-TUID: pRsTzDVaJ4zg --=-=-= Content-Type: text/plain Hello, The following C++ snippet file reproduces it: --=-=-= Content-Type: text/plain Content-Disposition: inline; filename=test.cpp Content-Description: reproducer // file: test.cpp #include #include int main() { float x = 9.999; std::cout << "rounding value: " << x << " --> " << std::round(x); return 0; } // build with: // g++ -o test.o -std=c++17 test.cpp --=-=-= Content-Type: text/plain It affects only GCC 8 and newer, GCC 7 is fine. The available "round" seems to be the one originating from tgmath.h (implementation detail of math.h AFAICT). The std::round function is conditionally defined in the C++ standard (since C++11) in the cmath header. It is supposed to also #undef the global "round" macro, but it doesn't, or perhaps the ordering of the includes is wrong and math.h gets included following cmath. In cmath, macros such as 'round' are undefined based on some conditions. These conditions appear to be: __cplusplus >= 201103L and _GLIBCXX_USE_C99_MATH_TR1 and not _GLIBCXX_NO_C99_ROUNDING_FUNCS The following are some data points I've gathered from the following guix environment: --8<---------------cut here---------------start------------->8--- guix environment --pure gcc-toolchain@10 --ad-hoc coreutils findutils strace the-silver-searcher --8<---------------cut here---------------end--------------->8--- --8<---------------cut here---------------start------------->8--- echo $CPLUS_INCLUDE_PATH /gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/c++:/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include --8<---------------cut here---------------end--------------->8--- The following lists the special #include_next directives, which tells cpp (the C preprocessor) to look for the next file with that name in the remaining of the its search path (as opposed to by starting the lookup in the current search path). --8<---------------cut here---------------start------------->8--- ag -f include_next $(realpath /gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/*) /gnu/store/jrzxs91zhpf6yr5fxisn3jjj7xai8zlk-gcc-10.1.0/include/c++/bits/std_abs.h 37:#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS 38:#include_next 40:# include_next 42:#undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS /gnu/store/jrzxs91zhpf6yr5fxisn3jjj7xai8zlk-gcc-10.1.0/include/c++/cmath 44:#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS 45:#include_next 46:#undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS /gnu/store/jrzxs91zhpf6yr5fxisn3jjj7xai8zlk-gcc-10.1.0/include/c++/complex.h 38:# include_next /gnu/store/jrzxs91zhpf6yr5fxisn3jjj7xai8zlk-gcc-10.1.0/include/c++/cstdlib 74:#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS 75:#include_next 76:#undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS /gnu/store/fa6wj5bxkj5ll1d7292a70knmyl7a0cr-glibc-2.31/include/limits.h 40: #include's protect themselves, and in GCC 2 we may #include_next through 47:/* We don't have #include_next. 119: We put this #include_next outside the double inclusion check because 124:# include_next /gnu/store/jrzxs91zhpf6yr5fxisn3jjj7xai8zlk-gcc-10.1.0/include/c++/fenv.h 36:# include_next /gnu/store/jrzxs91zhpf6yr5fxisn3jjj7xai8zlk-gcc-10.1.0/include/c++/math.h 29:#if !defined __cplusplus || defined _GLIBCXX_INCLUDE_NEXT_C_HEADERS 30:# include_next /gnu/store/jrzxs91zhpf6yr5fxisn3jjj7xai8zlk-gcc-10.1.0/include/c++/stdlib.h 29:#if !defined __cplusplus || defined _GLIBCXX_INCLUDE_NEXT_C_HEADERS 30:# include_next /gnu/store/jrzxs91zhpf6yr5fxisn3jjj7xai8zlk-gcc-10.1.0/include/c++/tgmath.h 35:# include_next --8<---------------cut here---------------end--------------->8--- Finally, the following lists the exact order in which g++/cpp have opened them (I'm hoping that maps with the order it derived from its search path/#include_next): --8<---------------cut here---------------start------------->8--- strace -z -f -e trace=openat g++ -o test.o -std=c++14 test.cpp [...] [pid 8163] openat(AT_FDCWD, "test.cpp", O_RDONLY|O_NOCTTY) = 3 [pid 8163] openat(AT_FDCWD, "/tmp/ccEUTfto.s", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/stdc-predef.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/c++/cmath", O_RDONLY|O_NOCTTY) = 4 # From gcc-10.1.0 [pid 8163] openat(AT_FDCWD, "/gnu/store/jrzxs91zhpf6yr5fxisn3jjj7xai8zlk-gcc-10.1.0/include/c++/x86_64-unknown-linux-gnu/bits/c++config.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/jrzxs91zhpf6yr5fxisn3jjj7xai8zlk-gcc-10.1.0/include/c++/x86_64-unknown-linux-gnu/bits/os_defines.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/features.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/sys/cdefs.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/wordsize.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/long-double.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/gnu/stubs.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/gnu/stubs-64.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/jrzxs91zhpf6yr5fxisn3jjj7xai8zlk-gcc-10.1.0/include/c++/x86_64-unknown-linux-gnu/bits/cpu_defines.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/c++/bits/cpp_type_traits.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/c++/ext/type_traits.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/math.h", O_RDONLY|O_NOCTTY) = 4 # This one is from glibc-2.31 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/libc-header-start.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/types.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/wordsize.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/timesize.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/typesizes.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/time64.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/math-vector.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/libm-simd-decl-stubs.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/floatn.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/floatn-common.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/long-double.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/flt-eval-method.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/fp-logb.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/fp-fast.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/mathcalls-helper-functions.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/mathcalls.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/mathcalls-helper-functions.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/mathcalls.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/mathcalls-helper-functions.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/mathcalls.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/mathcalls.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/mathcalls.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/mathcalls-helper-functions.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/mathcalls.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/mathcalls.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/mathcalls.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/mathcalls-narrow.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/mathcalls-narrow.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/mathcalls-narrow.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/mathcalls-narrow.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/mathcalls-narrow.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/mathcalls-narrow.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/mathcalls-narrow.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/mathcalls-narrow.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/mathcalls-narrow.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/mathcalls-narrow.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/mathcalls-narrow.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/mathcalls-narrow.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/mathcalls-narrow.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/iscanonical.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/c++/bits/std_abs.h", O_RDONLY|O_NOCTTY) = 4 [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/stdlib.h", O_RDONLY|O_NOCTTY) = 4 [...] [pid 8163] openat(AT_FDCWD, "test.cpp", O_RDONLY) = 4 test.cpp: In function 'int main()': test.cpp:10:61: error: 'round' is not a member of 'std'; did you mean 'round'? 10 | std::cout << "rounding value: " << x << " --> " << std::round(x); | ^~~~~ [pid 8163] openat(AT_FDCWD, "/gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/mathcalls.h", O_RDONLY) = 5 In file included from /gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/features.h:465, from /gnu/store/jrzxs91zhpf6yr5fxisn3jjj7xai8zlk-gcc-10.1.0/include/c++/x86_64-unknown-linux-gnu/bits/os_defines.h:39, from /gnu/store/jrzxs91zhpf6yr5fxisn3jjj7xai8zlk-gcc-10.1.0/include/c++/x86_64-unknown-linux-gnu/bits/c++config.h:518, from /gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/c++/cmath:41, from test.cpp:3: /gnu/store/4rssdv43wikii23rghfjlr62z83x44r0-profile/include/bits/mathcalls.h:298:1: note: 'round' declared here 298 | __MATHCALLX (round,, (_Mdouble_ __x), (__const__)); | ^~~~~~~~~~~ [pid 8163] +++ exited with 1 +++ --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=8163, si_uid=1000, si_status=1, si_utime=43, si_stime=8} --- +++ exited with 1 +++ --8<---------------cut here---------------end--------------->8--- Perhaps the wrong math.h (the one from glibc) is being included? Indeed, browsing its content, I can't see a definition for round, and all cmath does is wrap the original definitions in the std namespace! The possible math.h candidates are: --8<---------------cut here---------------start------------->8--- find -L /gnu/store/dis9nlzbqy5j860gl1nxjijmcw9dsb6w-profile/include -name '*math.h' | xargs realpath /gnu/store/jrzxs91zhpf6yr5fxisn3jjj7xai8zlk-gcc-10.1.0/include/c++/math.h /gnu/store/jrzxs91zhpf6yr5fxisn3jjj7xai8zlk-gcc-10.1.0/include/c++/tgmath.h /gnu/store/jrzxs91zhpf6yr5fxisn3jjj7xai8zlk-gcc-10.1.0/include/c++/tr1/math.h /gnu/store/jrzxs91zhpf6yr5fxisn3jjj7xai8zlk-gcc-10.1.0/include/c++/tr1/tgmath.h /gnu/store/fa6wj5bxkj5ll1d7292a70knmyl7a0cr-glibc-2.31/include/math.h /gnu/store/fa6wj5bxkj5ll1d7292a70knmyl7a0cr-glibc-2.31/include/tgmath.h --8<---------------cut here---------------end--------------->8--- The #include_next does what it's intended to do and pick math.h from another search directory with a file of the same name, which it finds in glibc. I don't have any more ideas of things to look at at this point in time. Maxim --=-=-=--