From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id yCShK8NveWMGWQEAbAwnHQ (envelope-from ) for ; Sun, 20 Nov 2022 01:07:31 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id gNGbK8NveWMHcQAA9RJhRA (envelope-from ) for ; Sun, 20 Nov 2022 01:07:31 +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 494B8121AC for ; Sun, 20 Nov 2022 01:07:31 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1owXrV-0007wu-BH; Sat, 19 Nov 2022 19:07:05 -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 1owXrT-0007wf-6L for bug-guix@gnu.org; Sat, 19 Nov 2022 19:07: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 1owXrS-00053p-Tw for bug-guix@gnu.org; Sat, 19 Nov 2022 19:07:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1owXrR-0007BN-Vf for bug-guix@gnu.org; Sat, 19 Nov 2022 19:07:01 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#59393: [node] node-gyp dependent packages may not work correctly due to node-lts ld.so.cache Resent-From: Abhishek Cherath Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 20 Nov 2022 00:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 59393 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 59393@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166890280527585 (code B ref -1); Sun, 20 Nov 2022 00:07:01 +0000 Received: (at submit) by debbugs.gnu.org; 20 Nov 2022 00:06:45 +0000 Received: from localhost ([127.0.0.1]:41748 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1owXrA-0007Ar-T4 for submit@debbugs.gnu.org; Sat, 19 Nov 2022 19:06:45 -0500 Received: from lists.gnu.org ([209.51.188.17]:37572) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1owXr6-0007Ad-53 for submit@debbugs.gnu.org; Sat, 19 Nov 2022 19:06:43 -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 1owXr5-0007up-FC for bug-guix@gnu.org; Sat, 19 Nov 2022 19:06:40 -0500 Received: from mta-06-3.privateemail.com ([198.54.127.59]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1owXr3-0004w7-9Y for bug-guix@gnu.org; Sat, 19 Nov 2022 19:06:39 -0500 Received: from mta-06.privateemail.com (localhost [127.0.0.1]) by mta-06.privateemail.com (Postfix) with ESMTP id D728018000B8 for ; Sat, 19 Nov 2022 19:06:26 -0500 (EST) Received: from [192.168.1.8] (pool-71-105-205-179.nycmny.fios.verizon.net [71.105.205.179]) by mta-06.privateemail.com (Postfix) with ESMTPA id 0DBEF18000A0 for ; Sat, 19 Nov 2022 19:06:25 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=quic.us; s=default; t=1668902786; bh=Io81OxQoG8I+icrXLNlz5RLr3acBZQUEh+dOy20VU2I=; h=Date:To:From:Subject:From; b=JREUqNC0hljN6/t8j2mvLG94rgG8orkhp3MaRgtyMur6+SHcMbOjIKKhpydFGpt3B oF934yqtwUorkrsXJJBzDD086SJZmJ9XhWcwRWXTA2lx6NovdZlmzrbzzWPgA8b0SE wFiZvFva2vXsz/q72Q0KAF2p3r1omOjL3/0m12KdiedMhlWj4WZbUDM7DcYZlJ4mbD GPerq5MUzmP3qnip3suNRlMUiwt/5LDYnb3j8jy8M7PGG5AcpHewL8QSP+sYDes3eM 2gl/rfqlOBvmSphSiGVGxg93IACTRc3v7mm/P08UlCrCTj5Xmz0lj2gKbv5qYHeuCg AIsYlme/iLhfA== Message-ID: <381e762e-5a44-a746-b3c9-1a680d7ec260@quic.us> Date: Sat, 19 Nov 2022 19:06:24 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Content-Language: en-US From: Abhishek Cherath Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP Received-SPF: pass client-ip=198.54.127.59; envelope-from=abhi@quic.us; helo=MTA-06-3.privateemail.com 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-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-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1668902851; 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: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=UwHNH7cHIIHMPSLd6sN3po8nw1U4XxBAT5qOvQxy0WE=; b=lrZxtElSVv22Vq+x/j41Zx4H1nVGyg1P0Zh0MEfbd5XRapPhH5Fx3MVwkzoeuppOuHlp0J c2pqOGXAkJelAFq44+4KcCKKFWYLg7PFf0ff9PFmXtiMeX/n9zyp2M9qL9HyQFyOuOsyrb kiec21VTe2FYtJu6aGEMu8uvP1g8W6yN5ZB3gaj7CSOLwgV5squq9ffSYDjjrmlbqTqoqN uC53X/MQtkVZSX9hyTj1I+TJXHGd92gWy4YZtHmtcuIcuB4eQIMAiSSI5G+AXGO09UwroD vOT6galWP7U4LBv3IqQOFQ8BFfbuhA1TJWxMaMdCo+UVm1pXFdFxJRLt9X4K7A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1668902851; a=rsa-sha256; cv=none; b=furCPMKfIBvVg0F92InzbgTnubQcqnrJ4xTK1Iua2aublySEE+s6DWbH6y4nSrgSsWkUdW pp9BbTBGp/Symv2yduvFVH9PEvPj5tL+AkRhNB9rS6ObOgYO05lfhAtBPsPubTrdXWstTc 9kb9oQZ1HzpmEzoxmaPAdHs6/Mc6oYewNNvNKqukCHkuj4KZtDRZxYsDO+dQgG/EHTYysF ZR65HCVNx+OPm8u6R8dPYKfSybuasaZFJXan79TyQloIAH58K40zNtlx2OlyMZzOy28FFn /TvaA7c7JkrzFA/tK44uKbcB7jlaD/IZnObWB5dzyLiZdKXpHzw1/QH63aDYSQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=quic.us header.s=default header.b=JREUqNC0; dmarc=none; 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" X-Migadu-Spam-Score: 1.29 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=quic.us header.s=default header.b=JREUqNC0; dmarc=none; 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" X-Migadu-Queue-Id: 494B8121AC X-Spam-Score: 1.29 X-Migadu-Scanner: scn0.migadu.com X-TUID: beEZqQkMhe/P Hello, This is a fairly involved bug report, the basic idea is that several npm packages depend on [node-gyp](https://www.npmjs.com/package/node-gyp), which is a build tool (written in python) that compiles native plugins for nodejs (so generally C/C++ code). This tool uses the *system* C/C++ compiler, so on a guix system with gcc-toolchain, that would be gcc-12. this allows for the compilation and installation of these packages in node_modules fine. However, at runtime (which happens as `node program.js`) since the dynamic linker looks in the node-lts package's ld.so.cache, it tries to link against gcc-10's libstdc++.so.6, and errors out because of missing symbols. To Reproduce, attempt the following (this isn't a particularly minimal example) 1. guix shell --pure gcc-toolchain libuv mesa make python2 pkg-config libx11 libxext libxi node 2. cd <> 3. CC=gcc npm i gl 4. guix shell gcc-toolchain libuv mesa make python2 pkg-config libx11 libxext libxi node 5. echo "var gl = require('gl')(64, 64, { preserveDrawingBuffer: true })" > test.js 6. node test.js observe "ERR_DLOPEN_FAILED", with Error: /gnu/store/094bbaq6glba86h1d4cj16xhdi6fk2jl-gcc-10.3.0-lib/lib/libstdc++.so.6: version `GLIBCXX_3.4.29' not found running with LD_DEBUG=all, shows that node-14.19.3's linked gcc's libstdc++ is used: 3608: find library=libstdc++.so.6 [0]; searching 3608: search cache=/gnu/store/mgxvqphymkf1xfz4zryppr1jwnd5xcyw-node-14.19.3/etc/ld.so.cache 3608: trying file=/gnu/store/094bbaq6glba86h1d4cj16xhdi6fk2jl-gcc-10.3.0-lib/lib/libstdc++.so.6 I'm not really certain how one would go about solving this tbh, I'm planning to look a little deeper into how node-gyp decides what C++ compiler to use, might be a matter of setting some env vars or something? any ideas are appreciated. Thank you, Abhishek.