From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gernot Kieseritzky Newsgroups: gmane.emacs.devel Subject: Re: Treesit says grammar is unavailable when it Date: Mon, 4 Dec 2023 13:43:22 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25983"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Dec 04 14:22:29 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rA8u4-0006Wd-LE for ged-emacs-devel@m.gmane-mx.org; Mon, 04 Dec 2023 14:22:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rA8th-0004L6-Fq; Mon, 04 Dec 2023 08:22:05 -0500 Original-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 1rA8IU-00011n-Cd for emacs-devel@gnu.org; Mon, 04 Dec 2023 07:43:38 -0500 Original-Received: from mail-oa1-x30.google.com ([2001:4860:4864:20::30]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rA8IR-0008QC-DB for emacs-devel@gnu.org; Mon, 04 Dec 2023 07:43:36 -0500 Original-Received: by mail-oa1-x30.google.com with SMTP id 586e51a60fabf-1fafbefe710so1781976fac.2 for ; Mon, 04 Dec 2023 04:43:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701693813; x=1702298613; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=872pQBIlopiu1kZxv7mhnuSp1iBdNX+5cQapdvTfy/w=; b=PyRRTSPC+2/MQuyA/02JqqXkc/PPVJESd1dbowW9duPmlqCTFGP4ERIXlm4B2w3rTR cRKdsdC2Hy8FjD4bdSr/cg4iFt8EqXgaC7B5Osny9isfUU2cRrGiEagXruDplwNGHuWW jtn8Fm4Gq5cgf0/ZwdeWgkqeFnyKvLttjMK3wAzhYQqW/XX842Mqk4n0yi3WqZTbGqwe uMNw6+BTFryE8AiDmLu9dB9mv7LVGt4UI1ALWGq5upQM1a6lvaB9YzW6a/imAvraYhMR mw4Mtz356famCF0bpZ/TmUZ1a0Sie4kKkXS3eWR6bN0Py8DsP2VrhZSNfDhk7sdI8HX2 wJMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701693813; x=1702298613; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=872pQBIlopiu1kZxv7mhnuSp1iBdNX+5cQapdvTfy/w=; b=KxsAwrenuQYYZNtUr7IPAUJ2MyDm4w9kW2Ouh1BMLfi+6ROLHsmd6ZMzMF1qXrNlBF GAEI+RQfTnDVTpy7p2lY98C0hxb3DacU/bBHy1PGpqJi8/B+4+4JXGUiaqOiAUf9qpRD 7dhQIIucPh+SUqa0BaJ9b/Elys1Jf9Y0FrI/R8sIKSoAMCl1YbG0NoHnHjmWXR2co4XL dyVmMuXxUAWmpPsyD4lZ7F9O0WxJri2kF7B6GPzwXb/+lHb4U++fSB4BNylAcUMBCN/j HO3OjYllas3876V4ztYWkOzUU85BssdIOfv1rI0I2gfzrk6VlLJsWQHa7yH8UKwF1yWR KAyQ== X-Gm-Message-State: AOJu0YzaqjbmBJNnxxzYWFNqP4W4vnBFOTgARsv3wXCM9RvZckruSyH6 UZBV0jAORT+rvBmlzQeCmpFTpXKhi2grEA3i1NN/I/+eM2EH9Q== X-Google-Smtp-Source: AGHT+IEPrg9Exmr40bBNVawOsj47XaMo6/hP+JbPcxi+A3Sh2C5xc4n8jq98/NXQMKAmdK6U2rtrNQGPW2w43TAYAnM= X-Received: by 2002:a05:6870:fb88:b0:1fb:75b:99a4 with SMTP id kv8-20020a056870fb8800b001fb075b99a4mr6148270oab.83.1701693813487; Mon, 04 Dec 2023 04:43:33 -0800 (PST) Received-SPF: pass client-ip=2001:4860:4864:20::30; envelope-from=gernotk@gmail.com; helo=mail-oa1-x30.google.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 04 Dec 2023 08:22:04 -0500 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:313520 Archived-At: Hello! > Warning (treesit): Cannot activate tree-sitter, because language grammar > for python is unavailable (not-found): (libtree-sitter-python libtree-sitter-python.so) > No such file or directory I had the same error when using "libtree-sitter-yaml.so" and, finally, had some time for a deeper investigation. I tried the Emacs built-in debugger (M-x debug-on-entry treesit_load_language) but I found the error only occurs inside the C function "treesit-available-p". Since this error occurred directly when Emacs loads the shared library resting inside of my ".emacs.d/tree-sitter/" directory I resorted to debugging the dynamic linker by starting Emacs with $ LD_DEBUG=1; emacs 2> linker.log and then just proceeded to activate "yaml-ts-mode". Then I hit this: listdc++.so.6: error: version lookup error: version 'GLIBCXX_3.4.29' not found (required by ~/.emacs.d/tree-sitter/libtree-sitter-yaml.so) Turns out the yaml module is using C++ for its scanner component (see https://github.com/ikatyang/tree-sitter-yaml) unlike all the other plugins I am using (C, C++, JS and TS). But I compiled this module on my own -- on the same machine -- so how can my system's C++ standard library suddenly turn incompatible?? Well, it turns out I am using Alex Murray's Emacs snap package on my Ubuntu 22.04 system being based on the "core20" snap base package (i.e. it is based on Ubuntu 20). So this Emacs snap provides an older set of build essentials including an incompatible C++ standard library. So as a workaround I would need to cross-compile this module using an Ubuntu 20 compatible environment. But the best solution is probably to ask Alex Murray to add all available tree sitter parsers in his snap. Best regards, Gernot Kieseritzky