From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id yPMKNKxSoGNciQAAbAwnHQ (envelope-from ) for ; Mon, 19 Dec 2022 13:01:48 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 4FQVM6xSoGN1LgAAG6o9tA (envelope-from ) for ; Mon, 19 Dec 2022 13:01:48 +0100 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 68F763A96D for ; Mon, 19 Dec 2022 13:01:48 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p7EpY-0002V3-FR; Mon, 19 Dec 2022 07:01:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p7EpL-0002S0-5Y for bug-guix@gnu.org; Mon, 19 Dec 2022 07:01:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p7EpK-0001QT-Dg for bug-guix@gnu.org; Mon, 19 Dec 2022 07:01:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p7EpK-0005Cs-8A for bug-guix@gnu.org; Mon, 19 Dec 2022 07:01:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#60200: Incompatibilities between gcc-toolchain and R packages Resent-From: Lars-Dominik Braun Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 19 Dec 2022 12:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 60200 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 60200@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167145122919994 (code B ref -1); Mon, 19 Dec 2022 12:01:02 +0000 Received: (at submit) by debbugs.gnu.org; 19 Dec 2022 12:00:29 +0000 Received: from localhost ([127.0.0.1]:38338 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p7Eom-0005CQ-FL for submit@debbugs.gnu.org; Mon, 19 Dec 2022 07:00:28 -0500 Received: from lists.gnu.org ([209.51.188.17]:45904) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p7Eok-0005CK-Id for submit@debbugs.gnu.org; Mon, 19 Dec 2022 07:00:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p7Eoi-0002B0-Bx for bug-guix@gnu.org; Mon, 19 Dec 2022 07:00:26 -0500 Received: from mout-p-102.mailbox.org ([80.241.56.152]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1p7Eof-0001DM-Gr for bug-guix@gnu.org; Mon, 19 Dec 2022 07:00:23 -0500 Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4NbJDN1tJ2z9sqw for ; Mon, 19 Dec 2022 13:00:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6xq.net; s=MBO0001; t=1671451204; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=Cw7Ngt0BeLW1uCi/DST1K8dgA7JHcIN5i8JGlBSOav4=; b=1OdVOr+aMp3qRceYJgbEsOTuwLo+Rq7N83SRlY0WnIlAyJhQ517D9vHMNmj8NKE7xHTOjQ F91LMpVJhswp5s7ak6zlh+mzum/dMEHROCdRos0hwt9F5dLhf1EofevpBdBh+WcDcSOrBO 9fLjmvAXrgtgiVcBFec90W1GAhEB4Z936xbgfJMSIpK3yY1y/Pb/ia/BF2UwKu72McpXjd o7uHnRcz5UFZYDWbZRR1eYYgAeKDLTYEXdI3zi8ZNnDhJaVLR4h1wgiMuHSdfSEBW+OapJ F8SG8EuhaNB4aJNJlIz1Qkn2+FsVSZ1yM4cXRX0N6ZuHqSrwt2z/QZSA3txbLg== Date: Mon, 19 Dec 2022 13:00:02 +0100 From: Lars-Dominik Braun Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Rspamd-Queue-Id: 4NbJDN1tJ2z9sqw Received-SPF: pass client-ip=80.241.56.152; envelope-from=lars@6xq.net; helo=mout-p-102.mailbox.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=6xq.net header.s=MBO0001 header.b=1OdVOr+a; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=6xq.net (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1671451308; a=rsa-sha256; cv=none; b=qmXCxAsEZmT66jKrSPfyudSbvDF6QSPN5vhNHwxZXdSL3imscB/20gpaSB0IdzHjl75N4f XsCA+ZsFJuA2qiGC3Ka17aKRWBmUJNzKx+slz3lLQ8whflFXMaA6dqPVsFjN1ufZgEn/Xk 1Pf+xISsFdipue00PUDLMp8bortzrD52GzaTta1hrCys5au3JIsrRJ9thFs1AtcRl2WtU+ GRp0ZisRZTaVD+xGZKhIi6C47tI2dDhekcW+1KBv/2W2mAY0lK/GTjHjkJafOqw0O93C/O b3GP9McsUS0+MYjCn+DdES/yqwg04Op8xboC4YkDLuvudoGic1Zp4N97uEulQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671451308; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=Cw7Ngt0BeLW1uCi/DST1K8dgA7JHcIN5i8JGlBSOav4=; b=OVtswx/CkhKXLKnF6TNm9Jt7nmNjdOXVcQye5ijiS8v4QVK0jEH+yC3lMxq+P0Q4i6/QSu B3fLwI226rwX6gKb0L8ZoI5ukC5pTsgb8GzZwopmYUETsdUlr25UfsivDl1og7oJgrxev0 iUhna9x+qC9QYgwmC7vThnULOFJ2h+7qowWqMtzQkM4PT0lfvPn6fvWVRtSBO149dEypgK R9aH3kGievpmhT9OeAAz+NuHJ240mOIymJevLkqkjoVjZaCbW7HQFGwYHCc4H1HhL/1JdS SDNMl7enknRR3wxbD1URnSxx1V8ShUehzyf2DGcyjNuBEvMw+DL5BPb+qlAc7Q== X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=6xq.net header.s=MBO0001 header.b=1OdVOr+a; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=6xq.net (policy=none) X-Migadu-Spam-Score: 4.92 X-Spam-Score: 4.92 X-Migadu-Queue-Id: 68F763A96D X-TUID: 5pZ0VYjBBjdl Hi, I ran into issues with the package r-brms. Take the following reproducer as an example: $ guix shell r-brms r make sed gcc-toolchain bash -C --no-cwd --share=/tmp $ R > library(brms) > fit1 <- brm(count ~ zAge + zBase * Trt + (1|patient), data = epilepsy, family = poisson()) Compiling Stan program... Error in dyn.load(libLFile) : unable to load shared object '/tmp/RtmpKqzbYg/file3245e787c.so': /gnu/store/vqhamsanmlm8v6f90a635zc6gmhwlphp-gfortran-10.3.0-lib/lib/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /tmp/RtmpKqzbYg/file3245e787c.so) Error in sink(type = "output") : invalid connection The same code works well with gcc-toolchain@10 instead of gcc-toolchain (@12, which is the default). As we can see the generated shared library above depends on GCC 12, 10 and GFortran 10 at the same time: $ ldd /tmp/RtmpKqzbYg/file3245e787c.so | grep -e gcc -e fortran libstdc++.so.6 => /gnu/store/4zvswpr2h3b7dvqpvjcdam8vfhyjrmgl-gcc-12.2.0-lib/lib/libstdc++.so.6 (0x00007f69bd9fc000) libgcc_s.so.1 => /gnu/store/4zvswpr2h3b7dvqpvjcdam8vfhyjrmgl-gcc-12.2.0-lib/lib/libgcc_s.so.1 (0x00007f69bd898000) libgfortran.so.5 => /gnu/store/vqhamsanmlm8v6f90a635zc6gmhwlphp-gfortran-10.3.0-lib/lib/libgfortran.so.5 (0x00007f69bd3e6000) libquadmath.so.0 => /gnu/store/094bbaq6glba86h1d4cj16xhdi6fk2jl-gcc-10.3.0-lib/lib/libquadmath.so.0 (0x00007f69bd39b000) libgomp.so.1 => /gnu/store/094bbaq6glba86h1d4cj16xhdi6fk2jl-gcc-10.3.0-lib/lib/libgomp.so.1 (0x00007f69bccf9000) The command used to link that .so is revealed by strace to be (filenames are random and may differ between runs): ["g++", "-std=gnu++14", "-shared", "-L/gnu/store/145dmr8drw3yzrdhzbsksi05p599hrs6-r-minimal-4.2.2/lib/R/lib", "-L/usr/local/lib", "-o", "file3373276d0.so", "file3373276d0.o", "/gnu/store/5rdg6sv1nrg1ikqxcykvdh9g4yd2xjvy-r-rstan-2.21.7/site-library/rstan/lib//libStanServices.a", "-L/gnu/store/y7rvp47mz3hcnpvnqsx42qz5yvs10pnl-r-stanheaders-2.21.0-7/site-library/StanHeaders/lib/", "-lStanHeaders", "-L/gnu/store/01lhjrrkvrnsjd8xh4ssdn3bgxc422jl-r-rcppparallel-5.1.5/site-library/RcppParallel/lib/", "-ltbb", "-L/gnu/store/145dmr8drw3yzrdhzbsksi05p599hrs6-r-minimal-4.2.2/lib/R/lib", "-lR"] So it links against libStanServices.a, libStanHeaders(.a), libtbb(.so) and libR(.so) of which only libR has a reference to gfortran: $ ldd /gnu/store/145dmr8drw3yzrdhzbsksi05p599hrs6-r-minimal-4.2.2/lib/R/lib/libR.so | grep -i fortran libgfortran.so.5 => /gnu/store/vqhamsanmlm8v6f90a635zc6gmhwlphp-gfortran-10.3.0-lib/lib/libgfortran.so.5 (0x00007f5be49db000) That means every software linking against R is also incompatible with the current default gcc-toolchain (when using the command line or specifications; different story when writing package recipes). Possible solutions: - Make gcc-toolchain@10 the default and rename gcc-toolchain@12 to gcc-toolchain-next@12, like we do for Haskell and (sometimes) Python. - Update, both, the default GCC and GFortran to version 12. - Explicitly depend on the correct gcc-toolchain in packages that need a compiler. Cheers, Lars