From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Third Newsgroups: gmane.emacs.bugs Subject: bug#47558: 28.0.50; dlopen 'image not found' gccemacs native-lisp macos Date: Wed, 7 Apr 2021 13:31:51 +0100 Message-ID: References: <877dlefkm9.fsf@igel.home> <83zgya9uvo.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18208"; mail-complaints-to="usenet@ciao.gmane.io" Cc: bryan.m.obrien@gmail.com, akrl@sdf.org, schwab@linux-m68k.org, 47558@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 07 14:33:34 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 1lU7NG-0004Uh-1V for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 07 Apr 2021 14:33:34 +0200 Original-Received: from localhost ([::1]:42236 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lU7NF-0004nh-0D for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 07 Apr 2021 08:33:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56866) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lU7Mk-0004mv-To for bug-gnu-emacs@gnu.org; Wed, 07 Apr 2021 08:33:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59980) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lU7Mk-0004Fh-Lc for bug-gnu-emacs@gnu.org; Wed, 07 Apr 2021 08:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lU7Mk-0001Hs-H9 for bug-gnu-emacs@gnu.org; Wed, 07 Apr 2021 08:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Apr 2021 12:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47558 X-GNU-PR-Package: emacs Original-Received: via spool by 47558-submit@debbugs.gnu.org id=B47558.16177987304880 (code B ref 47558); Wed, 07 Apr 2021 12:33:02 +0000 Original-Received: (at 47558) by debbugs.gnu.org; 7 Apr 2021 12:32:10 +0000 Original-Received: from localhost ([127.0.0.1]:43291 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lU7Lq-0001Ga-Sr for submit@debbugs.gnu.org; Wed, 07 Apr 2021 08:32:10 -0400 Original-Received: from outbound.soverin.net ([116.202.65.218]:37591) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lU7Lo-0001G5-Cm for 47558@debbugs.gnu.org; Wed, 07 Apr 2021 08:32:05 -0400 Original-Received: from smtp.soverin.net (unknown [10.10.3.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id 6840660191; Wed, 7 Apr 2021 12:31:56 +0000 (UTC) Original-Received: from smtp.soverin.net (smtp.soverin.net [159.69.232.138]) by soverin.net DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1617798715; bh=P/oy/aVrlae1Q6c1DG1FZUwZgzyAKha1Gh6Zs6p+VWI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=R6gIg8SrIG1hQgohm9gHQ60U7gerrZU0pcd8PKmWzbyLA4l//qmRskWDheZY5ozUU QitF4m5J4kRd14hhhBuPiTpiGs2vTgeYthKK2Kkdl8iNgyCAJbQydCPhX/jT8ZbHOb XvhvBxV5m6qKvAULn0Vec+g/FzuPM/jUmnQSlLcDATm6zwvwOcn2vm2Ec+75oEw9O3 lPzgOUt9ktUJoRqkzn1S8zuASOTX8pg+HOetNjIsVpH7tt9siu4chAdy2xcg5QKR0s LmHS2OFgXbYN5Lmzj+grq117rpFYs1xM6psvtcb1zZrbk9x4jj7VjMM7+aV+ygiY88 ntvjGQ7NSTMOQ== Original-Received: by breton.holly.idiocy.org (Postfix, from userid 501) id 558DD202BADAC2; Wed, 7 Apr 2021 13:31:52 +0100 (BST) Mail-Followup-To: Alan Third , Eli Zaretskii , schwab@linux-m68k.org, akrl@sdf.org, bryan.m.obrien@gmail.com, 47558@debbugs.gnu.org Content-Disposition: inline In-Reply-To: <83zgya9uvo.fsf@gnu.org> 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:203684 Archived-At: On Wed, Apr 07, 2021 at 02:50:03PM +0300, Eli Zaretskii wrote: > > Date: Wed, 7 Apr 2021 11:48:23 +0100 > > From: Alan Third > > Cc: Andrea Corallo , Eli Zaretskii , > > bryan.m.obrien@gmail.com, 47558@debbugs.gnu.org > > > > > Why do you need that in the first place? The compiler should be looking > > > there by default. > > > > It may be because we have to build with clang, or it may be because of > > how homebrew installs things. Or both. I'm not sure. > > That alone is worth a bug report against clang, I think. I think it's more likely to be Homebrew that's at fault, and I think they view this kind of thing as a feature rather than a bug. I believe the idea is for homebrew to interfere with the system as little as possible. Neither clang, nor (homebrew installed) gcc can find the libraries on their own. gcc: breton:/Users/alan>gcc-10 -v -print-file-name=libgccjit.so Using built-in specs. COLLECT_GCC=gcc-10 COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/10.2.0_4/libexec/gcc/x86_64-apple-darwin18/10.2.0/lto-wrapper libgccjit.so clang: breton:/Users/alan>clang -v -print-file-name=libgccjit.so Apple clang version 11.0.0 (clang-1100.0.33.17) Target: x86_64-apple-darwin18.7.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin libgccjit.so > > breton:/Users/alan>gcc -print-file-name=libgccjit.so > > libgccjit.so > > > > which isn't helpful, but again may be because gcc is actually clang. > > The above means the compiler cannot find the file. Does the file's > name actually end in .so, or is it some .dynlib or some such? Definitely .so: breton:/Users/alan>ls `brew --prefix libgccjit`/lib/gcc/10/ libgccjit.so libgccjit.so.0 libgccjit.so.0.0.1 > Does clang support the -v switch, whereby it emits details about the > directories it searches and libraries it scans? If so, can you run > the link command with that switch and show the entire output? Shown above, but there's also breton:/Users/alan>clang -print-search-dirs programs: =/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin libraries: =/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.0 This is relatively common with Homebrew. If you look in configure.ac there are a few places where we have to modify PKG_CONFIG_PATH because homebrew doesn't link in all the libraries it installs. I'm also unsure how portable we need to be with this code since homebrew is macOS specific and to my knowledge this problem only arises with homebrew. -- Alan Third