From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 6KjlM8RaGV/XYQAA0tVLHw (envelope-from ) for ; Thu, 23 Jul 2020 09:39:16 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id sHLQL8RaGV+KNwAA1q6Kng (envelope-from ) for ; Thu, 23 Jul 2020 09:39:16 +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 051FC94013C for ; Thu, 23 Jul 2020 09:39:15 +0000 (UTC) Received: from localhost ([::1]:48728 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jyXh4-0001bn-5F for larch@yhetil.org; Thu, 23 Jul 2020 05:39:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50848) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jyXgs-0001aD-Ms for bug-guix@gnu.org; Thu, 23 Jul 2020 05:39:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60665) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jyXgs-0003rE-DW for bug-guix@gnu.org; Thu, 23 Jul 2020 05:39:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jyXgs-0007eY-Av for bug-guix@gnu.org; Thu, 23 Jul 2020 05:39: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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 23 Jul 2020 09:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42392 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: maxim.cournoyer@gmail.com Received: via spool by 42392-submit@debbugs.gnu.org id=B42392.159549708329324 (code B ref 42392); Thu, 23 Jul 2020 09:39:02 +0000 Received: (at 42392) by debbugs.gnu.org; 23 Jul 2020 09:38:03 +0000 Received: from localhost ([127.0.0.1]:43978 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jyXfv-0007ct-9a for submit@debbugs.gnu.org; Thu, 23 Jul 2020 05:38:03 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57108) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jyXft-0007cP-Gk for 42392@debbugs.gnu.org; Thu, 23 Jul 2020 05:38:02 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:38502) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jyXfo-0003lc-8O; Thu, 23 Jul 2020 05:37:56 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=60104 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jyXfn-00063I-Jo; Thu, 23 Jul 2020 05:37:55 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87imenk1ps.fsf@hurd.i-did-not-set--mail-host-address--so-tickle-me> <87imegoplx.fsf@gnu.org> Date: Thu, 23 Jul 2020 11:37:53 +0200 In-Reply-To: <87imegoplx.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Tue, 21 Jul 2020 17:27:22 +0200") Message-ID: <87a6zqefm6.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 42392@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=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.01 X-TUID: EkZtXFV6rGyZ --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi! Ludovic Court=C3=A8s skribis: > /tmp/guix-build-gcc-10.1.0.drv-0/build/prev-x86_64-unknown-linux-gnu/libs= tdc++-v3/config.log > reads this: > > configure:19924: checking for float trig functions > configure:19948: /tmp/guix-build-gcc-10.1.0.drv-0/build/./gcc/xgcc -shar= ed-libgcc -B/tmp/guix-build-gcc-10.1.0.drv-0/build/./gcc -nostdinc++ -L/tmp= /guix-build-gcc-10.1.0.drv-0/build/x86_64-unknown-linux-gnu/libstdc++-v3/sr= c -L/tmp/guix-build-gcc-10.1.0.drv-0/build/x86_64-unknown-linux-gnu/libstdc= ++-v3/src/.libs -L/tmp/guix-build-gcc-10.1.0.drv-0/build/x86_64-unknown-lin= ux-gnu/libstdc++-v3/libsupc++/.libs -B/gnu/store/jrzxs91zhpf6yr5fxisn3jjj7x= ai8zlk-gcc-10.1.0/x86_64-unknown-linux-gnu/bin/ -B/gnu/store/jrzxs91zhpf6yr= 5fxisn3jjj7xai8zlk-gcc-10.1.0/x86_64-unknown-linux-gnu/lib/ -isystem /gnu/s= tore/jrzxs91zhpf6yr5fxisn3jjj7xai8zlk-gcc-10.1.0/x86_64-unknown-linux-gnu/i= nclude -isystem /gnu/store/jrzxs91zhpf6yr5fxisn3jjj7xai8zlk-gcc-10.1.0/x86_= 64-unknown-linux-gnu/sys-include -fno-checking -c -fno-builtin -D_GNU_SOU= RCE conftest.cpp >&5 > In file included from /gnu/store/rn75fm7adgx3pw5j8pg3bczfqq1y17lk-gcc-7.5= .0/include/c++/math.h:36, > from conftest.cpp:122: > /gnu/store/rn75fm7adgx3pw5j8pg3bczfqq1y17lk-gcc-7.5.0/include/c++/cmath:4= 1:10: fatal error: bits/c++config.h: No such file or directory > 41 | #include > | ^~~~~~~~~~~~~~~~~~ > compilation terminated. > configure:19948: $? =3D 1 > configure: failed program was: > > [...] > > | /* end confdefs.h. */ > | #include > | int > | main () > | { > | acosf (0); asinf (0); atanf (0); cosf (0); sinf (0); tanf (0); coshf (0= ); sinhf (0); tanhf (0); > | ; > | return 0; > | } > configure:19962: result: no The attached patch addresses this with a questionable yet efficient hack. The test cases reported by Maxim and by Erik Garrison now build fine. I=E2=80=99ve asked for guidance for a proper fix at , but in the meantime, I=E2=80=99m happy to go with this patch. Thoughts? Thanks, Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 9ff5e3d7c0..8969fefd84 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -530,6 +530,12 @@ Go. It also includes runtime support libraries for these languages.") (patches (search-patches "gcc-strmov-store-file-names.patch" "gcc-7-libsanitizer-mode-size.patch" "gcc-5.0-libvtv-runpath.patch")))) + (inputs + ;; XXX: This gross hack allows us to have libstdc++'s + ;; in the search path, thereby avoiding misconfiguration of libstdc++: + ;; . + `(("libstdc++" ,libstdc++-headers) + ,@(package-inputs gcc-6))) (description "GCC is the GNU Compiler Collection. It provides compiler front-ends for several languages, including C, C++, Objective-C, Fortran, Ada, and Go. @@ -607,6 +613,31 @@ using compilers other than GCC." (propagated-inputs '()) (synopsis "GNU C++ standard library"))) +(define libstdc++ + ;; Libstdc++ matching the default GCC. + (make-libstdc++ gcc)) + +(define libstdc++-headers + ;; XXX: This package is for internal use to work around + ;; (see above). The main difference compared + ;; to the libstdc++ headers that come with 'gcc' is that + ;; is right under include/c++ and not under + ;; include/c++/x86_64-unknown-linux-gnu (aka. GPLUSPLUS_TOOL_INCLUDE_DIR). + (package + (inherit libstdc++) + (name "libstdc++-headers") + (outputs '("out")) + (build-system trivial-build-system) + (arguments + '(#:builder (let* ((out (assoc-ref %outputs "out")) + (libstdc++ (assoc-ref %build-inputs "libstdc++"))) + (mkdir out) + (mkdir (string-append out "/include")) + (symlink (string-append libstdc++ "/include") + (string-append out "/include/c++"))))) + (inputs `(("libstdc++" ,libstdc++))) + (synopsis "Headers of GNU libstdc++"))) + (define-public libstdc++-4.9 (make-libstdc++ gcc-4.9)) --=-=-=--