From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pankaj Jangid Newsgroups: gmane.emacs.bugs Subject: bug#47783: 28.0.50; [feature/native-comp] libgccjit.so: error: error invoking gcc driver Date: Fri, 16 Apr 2021 13:46:35 +0530 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11144"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin) To: 47783@debbugs.gnu.org Cancel-Lock: sha1:+A505ySXRJKqYaHTdFXJcFxVYKk= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Apr 16 10:43:54 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1lXK4w-0002nQ-30 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 16 Apr 2021 10:43:54 +0200 Original-Received: from localhost ([::1]:42524 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lXK4v-0005hR-32 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 16 Apr 2021 04:43:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59136) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lXJew-0003JZ-HQ for bug-gnu-emacs@gnu.org; Fri, 16 Apr 2021 04:17:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56688) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lXJew-0003kg-8k for bug-gnu-emacs@gnu.org; Fri, 16 Apr 2021 04:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lXJew-0005lM-3P for bug-gnu-emacs@gnu.org; Fri, 16 Apr 2021 04:17:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Pankaj Jangid Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 16 Apr 2021 08:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47783 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.161856101221661 (code B ref -1); Fri, 16 Apr 2021 08:17:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 16 Apr 2021 08:16:52 +0000 Original-Received: from localhost ([127.0.0.1]:40001 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lXJem-0005cz-8g for submit@debbugs.gnu.org; Fri, 16 Apr 2021 04:16:52 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:33474) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lXJei-0005Zf-JN for submit@debbugs.gnu.org; Fri, 16 Apr 2021 04:16:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59120) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lXJei-0002oE-AF for bug-gnu-emacs@gnu.org; Fri, 16 Apr 2021 04:16:48 -0400 Original-Received: from ciao.gmane.io ([116.202.254.214]:42860) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lXJeg-0003af-Go for bug-gnu-emacs@gnu.org; Fri, 16 Apr 2021 04:16:48 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1lXJed-0001av-SZ for bug-gnu-emacs@gnu.org; Fri, 16 Apr 2021 10:16:43 +0200 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=geb-bug-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:204122 Archived-At: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: > I don't know what happened here but I bet has to do with the value of > one of these three env vars [1] and most likely PATH. > > [1] > I am working with pre-built version of ‘gcc’ and ‘libgccjit’ from Homebrew. So I tried to set the following environment variables. Experimented with various permutation combinations of these. #+begin_src elisp (add-to-list 'exec-path "/usr/local/opt/gcc/bin") (setenv "PATH" (mapconcat 'identity exec-path ":")) (setenv "LD_LIBRARY_PATH" "/usr/local/opt/libgccjit/lib/gcc/10:/usr/local/opt/gcc/lib/gcc/10") (setenv "LIBRARY_PATH" "/usr/local/opt/libgccjit/lib/gcc/10:/usr/local/opt/gcc/lib/gcc/10") #end_src The above are standard location of ‘gcc’ and ’libgccjit’ artifacts. The exec-path configuration above crashes my Emacs at startup. So I had to comment that out. Is there a way in Emacs to get all the environment variables in one go? I want to compare the vars from two invocations - GUI and CLI. As I reported earlier that CLI invocation works without any error. More facts: The error comes only at the beginning. As you can see in the following log (*Async-native-compilation-log) that compilation is working fine later on. --8<---------------cut here---------------start------------->8--- Compiling /Users/pankaj/Applications/Emacs.app/Contents/Resources/lisp/emacs-lisp/cl-lib.el.gz... uncompressing cl-lib.el.gz... uncompressing cl-lib.el.gz...done ld: library not found for -lgcc_ext.10.5 libgccjit.so: error: error invoking gcc driver /Users/pankaj/Applications/Emacs.app/Contents/Resources/lisp/emacs-lisp/cl-lib.el.gz: Error: Internal native compiler error failed to compile Compiling /Users/pankaj/Applications/Emacs.app/Contents/Resources/lisp/emacs-lisp/crm.el.gz... uncompressing crm.el.gz... uncompressing crm.el.gz...done Compiling /Users/pankaj/Applications/Emacs.app/Contents/Resources/lisp/progmodes/hideshow.el.gz... uncompressing hideshow.el.gz... uncompressing hideshow.el.gz...done Compiling /Users/pankaj/Applications/Emacs.app/Contents/Resources/lisp/emacs-lisp/advice.el.gz... uncompressing advice.el.gz... uncompressing advice.el.gz...done Compiling /Users/pankaj/Applications/Emacs.app/Contents/Resources/lisp/outline.el.gz... uncompressing outline.el.gz... uncompressing outline.el.gz...done Compiling /Users/pankaj/Applications/Emacs.app/Contents/Resources/lisp/calendar/cal-menu.el.gz... uncompressing cal-menu.el.gz... uncompressing cal-menu.el.gz...done --8<---------------cut here---------------end--------------->8--- And when all the compilation is done the error goes away; it does not appear in further sessions.