all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Phillip Lord <phillip.lord@russet.org.uk>
Cc: emacs-devel@gnu.org, akrl@sdf.org
Subject: Re: [feature/native-comp] breakage on build
Date: Sat, 06 Feb 2021 09:45:31 +0200	[thread overview]
Message-ID: <83wnvlod0k.fsf@gnu.org> (raw)
In-Reply-To: <87wnvm2nhb.fsf@russet.org.uk> (message from Phillip Lord on Fri,  05 Feb 2021 21:50:24 +0000)

> From: Phillip Lord <phillip.lord@russet.org.uk>
> Cc: akrl@sdf.org,  emacs-devel@gnu.org
> Date: Fri, 05 Feb 2021 21:50:24 +0000
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> From: Phillip Lord <phillip.lord@russet.org.uk>
> >> Cc: akrl@sdf.org,  emacs-devel@gnu.org
> >> Date: Fri, 05 Feb 2021 20:37:31 +0000
> >> 
> >> I have checked the library paths as well as I know how (gcc
> >> --print-search-dirs). I have reformatted the output with some new lines
> >> to make it readable.
> >
> > I'm not sure I understand: do these directories really exist, and do
> > they hold the libraries gcc is looking for?  I mean these directories:
> 
> No. The lib/gcc didn't exist at first. If they did hold the libraries
> GCC was looking for, I presume it would work. I have no idea where all
> that strangeness with relative paths which look to me like they resolve
> to the same places repeatedly comes from.

I believe this is just the standard GCC search path on MS-Windows.

> > If they do exist, does it mean you duplicated the entire MinGW GCC
> > installation under the same directory that is the parent of the
> > Emacs's bin/ directory?
> 
> I have tried copying /msys64/mingw64/lib/gcc into the Emacs installation
> at /lib, yes.

/msys64/mingw64/lib/gcc is not enough, you also need some of the
/msys64/mingw64/libexec/gcc (assuming MinGW64 has it -- I don't use
MinGW64, so I cannot check).

> > What does the following command produce?
> >
> >   gcc -print-file-name=crtbegin.o
> 
> gcc -print-file-name=crtbegin.o
> c:/Users/Administrator/Desktop/emacs-28.0.50-snapshot-feature_native-comp-windows-2021-02-04/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/crtbegin.o
> 
> This file does exist.

Then I admit I don't understand this part of the error messages:

> compiling to c:/Users/Administrator/AppData/Roaming/.emacs.d/eln-cache/28.0.50-14889799/cl-lib-8b938900-d1df28b7.eln
> x86_64-w64-mingw32-gcc-10.2.0: fatal error: cannot execute 'as': CreateProcess: No such file or directory
> compilation terminated.
> ld: cannot find dllcrt2.o: No such file or directory
> ld: cannot find crtbegin.o: No such file or directory
> ld: cannot find -lmingw32
> ld: cannot find -lgcc_s
> ld: cannot find -lgcc
> ld: cannot find -lmoldname
> ld: cannot find -lmingwex
> ld: cannot find -lmsvcrt
> ld: cannot find -lkernel32
> ld: cannot find -lpthread
> ld: cannot find -ladvapi32
> ld: cannot find -lshell32
> ld: cannot find -luser32
> ld: cannot find -lkernel32
> ld: cannot find -lmingw32
> ld: cannot find -lgcc_s
> ld: cannot find -lgcc
> ld: cannot find -lmoldname
> ld: cannot find -lmingwex
> ld: cannot find -lmsvcrt
> ld: cannot find -lkernel32
> ld: cannot find crtend.o: No such file or directory

GCC should have instructed ld.exe where to look for the libraries
mentioned in this error message.  If crtbegin.o exists at the location
where GCC expects it to be (and I presume the rest of the libraries
mentioned in the above message also exist there -- do they?), then why
didn't ld.exe find them?

Is there a way to invoke JIT compiler so that the -v switch is passed
to ld.exe as well?  On the command line, "gcc -v" accomplishes that.
This will show you which directories ld.exe searches for its
libraries.

Also note that in that invocation GCC didn't find as.exe, so it could
be that these error messages are triggered by that and not by actually
missing the libraries.

> > Alternatively, could it be that under the mingw64 shell Emacs invokes
> > a different copy of gcc/libgccjit, the one that is in its "normal"
> > installation tree and not in the Emacs tree?
> 
> Yes. I do not know how much or how little of the mingw64 install that
> Emacs is using; it could be a missing DLL, config file anything at
> all. But, the -no-deps version of Emacs happily does native-comp when
> launched from inside a mingw64 shell.

Then maybe you should start by duplicating the full installation of
GCC, Binutils, and MinGW runtime under the same directory where you
have bin/emacs.exe.  Once you install that, see if native-comp works
outside of the mingw64 shell.  If it does, then you can start removing
files and directories that are not needed, which will hopefully leave
you with the minimum subset of the mingw64 installation required for
native-comp.



  reply	other threads:[~2021-02-06  7:45 UTC|newest]

Thread overview: 99+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-30 10:37 [feature/native-comp] breakage on build Phillip Lord
2021-01-30 13:26 ` akrl--- via Emacs development discussions.
2021-01-30 14:40   ` phillip.lord
2021-01-30 15:01     ` phillip.lord
2021-01-30 16:21       ` Eli Zaretskii
2021-01-30 16:38         ` Eli Zaretskii
2021-01-30 17:06           ` Eli Zaretskii
2021-01-30 17:19             ` phillip.lord
2021-01-30 19:44             ` akrl--- via Emacs development discussions.
2021-01-30 19:58               ` Eli Zaretskii
2021-01-30 20:17                 ` akrl--- via Emacs development discussions.
2021-01-31 15:29                   ` Eli Zaretskii
2021-02-01 11:01                     ` akrl--- via Emacs development discussions.
2021-02-01 15:25                       ` Eli Zaretskii
2021-02-01 16:20                         ` akrl--- via Emacs development discussions.
     [not found]                           ` <831rdz7mf5.fsf@gnu.org>
2021-02-01 19:01                             ` akrl--- via Emacs development discussions.
2021-02-01 19:06                             ` Phillip Lord
2021-02-01 19:36                               ` Eli Zaretskii
2021-02-01 19:37                           ` Stefan Monnier
2021-02-01 20:33                             ` akrl--- via Emacs development discussions.
2021-02-02 20:26                         ` akrl--- via Emacs development discussions.
2021-02-02 20:29                           ` Eli Zaretskii
2021-02-03 12:37                             ` akrl--- via Emacs development discussions.
2021-02-03 16:36                             ` Phillip Lord
2021-02-03 20:27                               ` akrl--- via Emacs development discussions.
2021-02-04  3:31                                 ` Eli Zaretskii
2021-02-04 14:39                                 ` Phillip Lord
2021-02-04 15:31                                   ` Eli Zaretskii
2021-02-04 15:52                                     ` Phillip Lord
2021-02-04 16:24                                       ` Eli Zaretskii
2021-02-04 20:24                                         ` Óscar Fuentes
2021-02-04 20:44                                           ` Eli Zaretskii
2021-02-04 22:08                                             ` Óscar Fuentes
2021-02-05 11:50                                               ` Eli Zaretskii
2021-02-05 14:47                                                 ` Óscar Fuentes
2021-02-05 21:29                                                   ` Phillip Lord
2021-02-05 22:56                                                     ` Óscar Fuentes
2021-02-06 13:15                                                       ` Phillip Lord
2021-02-07  2:52                                                         ` Óscar Fuentes
2021-02-07 18:56                                                           ` Phillip Lord
2021-02-07 19:38                                                             ` Óscar Fuentes
2021-02-07 19:49                                                               ` Eli Zaretskii
2021-02-07 20:33                                                                 ` Stefan Monnier
2021-02-07 21:23                                                                   ` Óscar Fuentes
2021-02-07 22:23                                                                   ` Phillip Lord
2021-02-07 22:21                                                               ` Phillip Lord
2021-02-07 23:38                                                                 ` Óscar Fuentes
2021-02-08 12:03                                                                   ` Phillip Lord
2021-02-06  7:32                                                     ` Eli Zaretskii
2021-02-04 16:22                                   ` Andrea Corallo via Emacs development discussions.
2021-02-04 21:07                                     ` Phillip Lord
2021-02-04 23:32                                       ` Andrea Corallo via Emacs development discussions.
2021-02-05 10:05                                         ` Phillip Lord
2021-02-05 11:35                                           ` Eli Zaretskii
2021-02-05 20:37                                             ` Phillip Lord
2021-02-05 21:04                                               ` Eli Zaretskii
2021-02-05 21:50                                                 ` Phillip Lord
2021-02-06  7:45                                                   ` Eli Zaretskii [this message]
2021-02-06 12:58                                                     ` Phillip Lord
2021-02-06 13:45                                                       ` Eli Zaretskii
2021-02-07 19:11                                                         ` Phillip Lord
2021-02-08  9:32                                                           ` Andrea Corallo via Emacs development discussions.
2021-02-08 12:08                                                             ` Phillip Lord
2021-02-08 14:28                                                               ` Andrea Corallo via Emacs development discussions.
2021-02-08 14:47                                                                 ` Phillip Lord
2021-02-08 15:14                                                                   ` Andrea Corallo via Emacs development discussions.
2021-02-08 21:38                                                                     ` Stefan Monnier
2021-02-09  8:25                                                                       ` Andrea Corallo via Emacs development discussions.
2021-02-09 22:38                                                                         ` Phillip Lord
2021-02-10  8:44                                                                           ` Andrea Corallo via Emacs development discussions.
2021-02-10 14:04                                                                             ` Stefan Monnier
2021-02-10 14:23                                                                               ` Andrea Corallo via Emacs development discussions.
2021-02-15 19:17                                                                                 ` Phillip Lord
2021-02-10 15:16                                                                             ` Eli Zaretskii
2021-02-10 20:41                                                                               ` Andrea Corallo via Emacs development discussions.
2021-02-11 14:11                                                                                 ` Eli Zaretskii
2021-02-11 14:51                                                                                   ` Andrea Corallo via Emacs development discussions.
2021-02-11 15:24                                                                                     ` Eli Zaretskii
2021-02-11 15:53                                                                                       ` Andrea Corallo via Emacs development discussions.
2021-02-11 16:11                                                                                         ` Stefan Monnier
2021-02-11 16:20                                                                                           ` Andrea Corallo via Emacs development discussions.
2021-02-11 20:52                                                                                             ` Andrea Corallo via Emacs development discussions.
2021-02-12  6:46                                                                                               ` Eli Zaretskii
2021-02-10 21:23                                                                             ` Phillip Lord
2021-02-11  8:39                                                                               ` Andrea Corallo via Emacs development discussions.
2021-02-08 15:25                                                                 ` Eli Zaretskii
2021-02-08 15:23                                                               ` Eli Zaretskii
2021-02-07  2:15                                                       ` Óscar Fuentes
2021-02-07  4:14                                                         ` Óscar Fuentes
2021-02-05 11:35                                           ` Andrea Corallo via Emacs development discussions.
2021-02-05 20:44                                             ` Phillip Lord
2021-02-05  7:28                                       ` Eli Zaretskii
2021-01-30 20:21               ` Óscar Fuentes
2021-01-30 22:06                 ` Stefan Monnier
2021-01-30 22:23                   ` Óscar Fuentes
2021-01-30 22:53                     ` Stefan Monnier
2021-02-02  0:27               ` Andy Moreton
2021-02-02  9:11                 ` akrl--- via Emacs development discussions.
  -- strict thread matches above, loose matches on Subject: below --
2021-02-01 18:39 Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83wnvlod0k.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=akrl@sdf.org \
    --cc=emacs-devel@gnu.org \
    --cc=phillip.lord@russet.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.