GNU bug report logs -
#57849
29.0.50; MacOS ld warning from native compilation
Previous Next
Reported by: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Date: Fri, 16 Sep 2022 05:49:02 UTC
Severity: minor
Found in version 29.0.50
Fixed in version 30.1
Done: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Eli Zaretskii <eliz <at> gnu.org> writes:
> Is this somehow an Emacs-specific problem, or is this a general
> problem with libgccjit on those versions of macOS?
I think it's a general problem with macOS 12.6/Xcode 14, but I'm not sure.
The link Gregory and/or Lars posted concerned Ruvy, IIRC.
> If the latter, I
> think this should be taken up with the libgccjit developers first, and
> we should then do as they say, if that makes sense.
Maybe Andrea can say more. I don't know libgccjit and the native
compiler well enough.
>> Otherwise my proposal is to
>> either add something to etc/PROBLEMS describing how to add "-Wl,-w", or
>> add that option by default on Darwin.
>
> If what the libgccjit developers say doesn't fit our needs, or if this
> is an Emacs-specific problem, thgen yes, using -Wl,-w is probably the
> way to go.
>
>> I didn't check if emacs-28 has the same problem, but I don't see why it
>> wouldn't.
>
> It's okay to make that change on the emacs-28 branch, if someone can
> verify that it works on that branch.
I've tried this in emacs-28, which seems to work, with a caveat
@@ -178,14 +178,15 @@ native-comp-compiler-options
:type '(repeat string)
:version "28.1")
-(defcustom native-comp-driver-options nil
+(defcustom native-comp-driver-options (when (eq system-type 'darwin)
+ '("-Wl,-w"))
"Options passed verbatim to the native compiler's back-end driver.
Note that not all options are meaningful; typically only the options
affecting the assembler and linker are likely to be useful.
Passing these options is only available in libgccjit version 9
and above."
- :type '(repeat string) ; FIXME is this right?
+ :type '(repeat string)
:version "28.1")
(defcustom comp-libgccjit-reproducer nil
The caveat being that I see, after starting that Emacs, in the log
buffer
uncompressing time-date.el.gz...done
ld: library not found for -lemutls_w
libgccjit.so: error: error invoking gcc driver
/Users/gerd/emacs/emacs-28/nextstep/Emacs.app/Contents/Resources/lisp/emacs-lisp/comp.el.gz: Error: Internal native compiler error failed to compile
The build was from git clean -xdf. Don't know what's going on there.
Maybe it's not related to my change. I'll try without the change later
today.
>
>> If we add -Wl by default, an open question is if -w is supported on all
>> all versions of MacOS that Emacs supports, which I can't find a definite
>> answer to.
>
> I think -w is such an old option that it'd be unthinkable for it not
> to be supported.
That's likely, yes.
This bug report was last modified 1 year and 96 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.