Summary: | editors/emacs-devel: Build fails at configure phase with non-clean environment and NATIVECOMP option enabled | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Yasuhiro Kimura <yasu> | ||||||
Component: | Individual Port(s) | Assignee: | emacs (Nobody) <emacs> | ||||||
Status: | Closed FIXED | ||||||||
Severity: | Affects Only Me | CC: | ashish, jrm | ||||||
Priority: | --- | Flags: | ashish:
maintainer-feedback+
|
||||||
Version: | Latest | ||||||||
Hardware: | Any | ||||||||
OS: | Any | ||||||||
Attachments: |
|
Description
Yasuhiro Kimura
2021-08-23 07:25:49 UTC
Thanks for reporting it. I'm able to reproduce it. From my preliminary analysis of the problem, excerpt from the config.log: configure:16368: checking for gcc_jit_context_acquire in -lgccjit configure:16393: cc -o conftest -pipe -g -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -I -isystem /usr/local/include -L/usr/local/lib/gcc11 -Wl,-rpath=/usr/local/lib -fstack-protector-strong -L/usr/local/lib -L conftest.c -lgccjit -lutil >&5 ld: error: cannot open /usr/local/include: Is a directory cc: error: linker command failed with exit code 1 (use -v to see invocation) configure:16393: $? = 1 configure: failed program was: | /* confdefs.h */ It seems like "-I -isystem" is the culprit here, need to figure out where it's coming from. I'll follow up later with. Thanks! Created attachment 227396 [details] Patch file Now I think I know what is happening. ports-mgmt/porttools installs shell script named `port`. But configure script of emacs regards it as utility used to interact with MacPorts[1]. And it sets up CFLAGS, header directories, library directory, etc. assuming that environment is MacOS and GCC is installed by using MacPorts. As a result configure fails to detect libgccjit. Attached patch fixes it by patching configure.ac. [1] https://guide.macports.org/#using.port Created attachment 227397 [details]
Updated patch file
* Improve patch so it can be upstreamed.
Original version only comments out the detection of 'port' command in configure.ac. So it doesn't work as is expected on MacOS and MacPorts environment and therefore can't be upstreamed. Updated version changes configure.ac so it tries to detect 'port' command only if $opsys is 'darwin'. So it can be upstreamed as it can not only fix our problem but also works fine on MacOS and MacPorts environment.
(In reply to Yasuhiro Kimura from comment #3) The attached patch works for me. We've an update scheduled for September 01, 2021, and we'll include this patch then. Could you please submit it upstream, and link us here ? Thank you! (In reply to Ashish SHUKLA from comment #4) > Could you please submit it upstream, and link us here ? I have submitted to upstream as following. https://debbugs.gnu.org/cgi/bugreport.cgi?bug=50259 Great. Looks like it will get pulled from upstream in the 2021-09-01 port update. Thanks. A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=76a124ab0b40e1a20689431f28e70d19a376cc29 commit 76a124ab0b40e1a20689431f28e70d19a376cc29 Author: Joseph Mingrone <jrm@FreeBSD.org> AuthorDate: 2021-09-01 22:56:57 +0000 Commit: Joseph Mingrone <jrm@FreeBSD.org> CommitDate: 2021-09-01 22:59:35 +0000 editors/emacs-devel: Update to 2021-09-21 commit, a15f549 PR: 258001 editors/emacs-devel/Makefile | 4 ++-- editors/emacs-devel/distinfo | 6 +++--- editors/emacs-devel/pkg-plist | 7 ++++--- 3 files changed, 9 insertions(+), 8 deletions(-) Thanks for submitting and upstreaming. Please re-open if the issue isn't resolved. |