* Native-comp branch compilation error on Windows
@ 2020-12-17 1:44 Liāu, Kiong-Gē 廖宮毅
2020-12-17 19:51 ` Andrea Corallo via Emacs development discussions.
0 siblings, 1 reply; 6+ messages in thread
From: Liāu, Kiong-Gē 廖宮毅 @ 2020-12-17 1:44 UTC (permalink / raw)
To: emacs-devel
Hi,
I used last updated Msys2 as 2020-12-16 to install mingw64-x86_64
version (10.2) of gcc and libgccjit to compile native-comp branch on
Windows 10.
I configured the build with flag --with-nativecomp, while compile it,
I got the following error message:
comp.c: In function 'Fcomp_el_to_eln_filename':
comp.c:4110:36: error: expected ')' before 'PATH_REL_LOADSEARCH'
4110 | Fregexp_quote (build_string ("/" PATH_REL_LOADSEARCH "/")));
| ^~~~~~~~~~~~~~~~~~~~
| )
comp.c: In function 'Fcomp__compile_ctxt_to_file':
comp.c:4458:12: warning: unused variable 'oldset' [-Wunused-variable]
4458 | sigset_t oldset;
| ^~~~~~
comp.c: In function 'eln_load_path_final_clean_up':
comp.c:4621:29: warning: passing argument 1 of
'internal_condition_case_4' from incompatible pointer type
[-Wincompatible-pointer-types]
4621 | internal_condition_case_4 (Fdirectory_files,
| ^~~~~~~~~~~~~~~~
| |
| struct Lisp_X * (*)(struct Lisp_X
*, struct Lisp_X *, struct Lisp_X *, struct Lisp_X *, struct Lisp_X *)
In file included from comp.c:23:
lisp.h:4160:47: note: expected 'struct Lisp_X * (*)(struct Lisp_X *,
struct Lisp_X *, struct Lisp_X *, struct Lisp_X *)' but argument is of
type 'struct Lisp_X * (*)(struct Lisp_X *, struct Lisp_X *, struct
Lisp_X *, struct Lisp_X *, struct Lisp_X *)'
4160 | extern Lisp_Object internal_condition_case_4 (Lisp_Object (*)
(Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object), Lisp_Object,
Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object (*)
(Lisp_Object));
|
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [Makefile:410: comp.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/VWinUser0/Downloads/emacs/native-comp/src'
make: *** [Makefile:433: src] Error 2
However, with exactly the same emacs source code and configuration,
the compilation on Linux (Debian testing, gcc/gccjit 10.2) went well
without any issue.
Should I pass some special flags in configure or compilers to build
the native-comp branch on Windows?
Thanks,
Kiong-Ge.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Native-comp branch compilation error on Windows
2020-12-17 1:44 Native-comp branch compilation error on Windows Liāu, Kiong-Gē 廖宮毅
@ 2020-12-17 19:51 ` Andrea Corallo via Emacs development discussions.
2020-12-17 20:43 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Andrea Corallo via Emacs development discussions. @ 2020-12-17 19:51 UTC (permalink / raw)
To: Liāu, Kiong-Gē 廖宮毅; +Cc: emacs-devel
"Liāu, Kiong-Gē 廖宮毅" <gongyi.liao@gmail.com> writes:
> Hi,
>
> I used last updated Msys2 as 2020-12-16 to install mingw64-x86_64
> version (10.2) of gcc and libgccjit to compile native-comp branch on
> Windows 10.
>
> I configured the build with flag --with-nativecomp, while compile it,
> I got the following error message:
>
> comp.c: In function 'Fcomp_el_to_eln_filename':
> comp.c:4110:36: error: expected ')' before 'PATH_REL_LOADSEARCH'
> 4110 | Fregexp_quote (build_string ("/" PATH_REL_LOADSEARCH "/")));
> | ^~~~~~~~~~~~~~~~~~~~
> | )
> comp.c: In function 'Fcomp__compile_ctxt_to_file':
> comp.c:4458:12: warning: unused variable 'oldset' [-Wunused-variable]
> 4458 | sigset_t oldset;
> | ^~~~~~
Hi Liāu,
please open a bug with M-x report-emacs-bug adding into the subject
[feature/native-comp].
Also if you could attach to the bug your src/epaths.h this will be
helpful.
Thanks!
Andrea
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Native-comp branch compilation error on Windows
2020-12-17 19:51 ` Andrea Corallo via Emacs development discussions.
@ 2020-12-17 20:43 ` Eli Zaretskii
2020-12-17 20:48 ` Liāu, Kiong-Gē 廖宮毅
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2020-12-17 20:43 UTC (permalink / raw)
To: Andrea Corallo; +Cc: gongyi.liao, emacs-devel
> Date: Thu, 17 Dec 2020 19:51:19 +0000
> Cc: emacs-devel@gnu.org
> From: Andrea Corallo via "Emacs development discussions." <emacs-devel@gnu.org>
>
> > comp.c: In function 'Fcomp_el_to_eln_filename':
> > comp.c:4110:36: error: expected ')' before 'PATH_REL_LOADSEARCH'
> > 4110 | Fregexp_quote (build_string ("/" PATH_REL_LOADSEARCH "/")));
> > | ^~~~~~~~~~~~~~~~~~~~
> > | )
> > comp.c: In function 'Fcomp__compile_ctxt_to_file':
> > comp.c:4458:12: warning: unused variable 'oldset' [-Wunused-variable]
> > 4458 | sigset_t oldset;
> > | ^~~~~~
>
> Hi Liāu,
>
> please open a bug with M-x report-emacs-bug adding into the subject
> [feature/native-comp].
>
> Also if you could attach to the bug your src/epaths.h this will be
> helpful.
I don't see that the branch updated nt/epaths.nt (and in top-level
Makefile.in), without which nothing useful can happen with
PATH_REL_LOADSEARCH.
And if PATH_REL_LOADSEARCH is defined on MS-Windows like I think it
should, you will probably have problems using it in a regex, because
it will include the unexpanded %emacs_dir% part?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Native-comp branch compilation error on Windows
2020-12-17 20:43 ` Eli Zaretskii
@ 2020-12-17 20:48 ` Liāu, Kiong-Gē 廖宮毅
2020-12-17 21:00 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Liāu, Kiong-Gē 廖宮毅 @ 2020-12-17 20:48 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel, Andrea Corallo
It seems the case, here's the partial content of epaths.h:
/* Together with PATH_SITELOADSEARCH, this gives the default value of
load-path, which is the search path for the Lisp function "load".
Configure (using "make epaths-force") sets this to
${standardlisppath}, which typically has a value like:
<datadir>/emacs/VERSION/lisp where datadir is eg /usr/local/share.
*/
#define PATH_LOADSEARCH "%emacs_dir%/share/emacs/28.0.50/lisp"
/* Like PATH_LOADSEARCH, but contains the non-standard pieces.
These are the site-lisp directories. Configure sets this to
${locallisppath}, which typically defaults to something like:
<datadir>/emacs/VERSION/site-lisp:<datadir>/emacs/site-lisp
but can be overridden by the --enable-locallisppath argument.
This is combined with PATH_LOADSEARCH to make the default load-path.
If the --no-site-lisp option is used, this piece is excluded.
*/
#define PATH_SITELOADSEARCH
"%emacs_dir%/share/emacs/28.0.50/site-lisp;%emacs_dir%/share/emacs/site-lisp"
/* Like PATH_LOADSEARCH, but used only during the build process
when Emacs is dumping. Configure (using "make epaths-force-w32") sets
this to $buildlisppath, which normally has the value: <srcdir>/lisp.
*/
#define PATH_DUMPLOADSEARCH
"C:/msys64/home/VWinUser0/Downloads/emacs/native-comp/src/lisp"
It seems the %emacs_dir% part is not expanded
Kiong-Ge.
On Thu, Dec 17, 2020 at 2:43 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > Date: Thu, 17 Dec 2020 19:51:19 +0000
> > Cc: emacs-devel@gnu.org
> > From: Andrea Corallo via "Emacs development discussions." <emacs-devel@gnu.org>
> >
> > > comp.c: In function 'Fcomp_el_to_eln_filename':
> > > comp.c:4110:36: error: expected ')' before 'PATH_REL_LOADSEARCH'
> > > 4110 | Fregexp_quote (build_string ("/" PATH_REL_LOADSEARCH "/")));
> > > | ^~~~~~~~~~~~~~~~~~~~
> > > | )
> > > comp.c: In function 'Fcomp__compile_ctxt_to_file':
> > > comp.c:4458:12: warning: unused variable 'oldset' [-Wunused-variable]
> > > 4458 | sigset_t oldset;
> > > | ^~~~~~
> >
> > Hi Liāu,
> >
> > please open a bug with M-x report-emacs-bug adding into the subject
> > [feature/native-comp].
> >
> > Also if you could attach to the bug your src/epaths.h this will be
> > helpful.
>
> I don't see that the branch updated nt/epaths.nt (and in top-level
> Makefile.in), without which nothing useful can happen with
> PATH_REL_LOADSEARCH.
>
> And if PATH_REL_LOADSEARCH is defined on MS-Windows like I think it
> should, you will probably have problems using it in a regex, because
> it will include the unexpanded %emacs_dir% part?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Native-comp branch compilation error on Windows
2020-12-17 20:48 ` Liāu, Kiong-Gē 廖宮毅
@ 2020-12-17 21:00 ` Eli Zaretskii
2020-12-17 21:06 ` Liāu, Kiong-Gē 廖宮毅
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2020-12-17 21:00 UTC (permalink / raw)
To: Liāu,Kiong-Gē 廖宮毅; +Cc: emacs-devel, akrl
> From: Liāu, Kiong-Gē 廖宮毅 <gongyi.liao@gmail.com>
> Date: Thu, 17 Dec 2020 14:48:30 -0600
> Cc: Andrea Corallo <akrl@sdf.org>, emacs-devel@gnu.org
>
> It seems the %emacs_dir% part is not expanded
Of course it isn't: that happens at run time, not at build time.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Native-comp branch compilation error on Windows
2020-12-17 21:00 ` Eli Zaretskii
@ 2020-12-17 21:06 ` Liāu, Kiong-Gē 廖宮毅
0 siblings, 0 replies; 6+ messages in thread
From: Liāu, Kiong-Gē 廖宮毅 @ 2020-12-17 21:06 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel, Andrea Corallo
I see. On the other hand, the epaths.h generated by configure on Linux:
/* Hey Emacs, this is -*- C -*- code! */
/*
Copyright (C) 1993, 1995, 1997, 1999, 2001-2020 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
GNU Emacs is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
GNU Emacs is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
/* Together with PATH_SITELOADSEARCH, this gives the default value of
load-path, which is the search path for the Lisp function "load".
Configure (using "make epaths-force") sets this to
${standardlisppath}, which typically has a value like:
<datadir>/emacs/VERSION/lisp where datadir is eg /usr/local/share.
*/
#define PATH_LOADSEARCH
"/home/kiong-ge/.local/emacs/native-comp/share/emacs/28.0.50/lisp"
/* Like PATH_LOADSEARCH, but contains the relative path from the
installation directory.
*/
#define PATH_REL_LOADSEARCH "28.0.50/lisp"
/* Like PATH_LOADSEARCH, but contains the non-standard pieces.
These are the site-lisp directories. Configure sets this to
${locallisppath}, which typically defaults to something like:
<datadir>/emacs/VERSION/site-lisp:<datadir>/emacs/site-lisp
but can be overridden by the --enable-locallisppath argument.
This is combined with PATH_LOADSEARCH to make the default load-path.
If the --no-site-lisp option is used, this piece is excluded.
*/
#define PATH_SITELOADSEARCH
"/home/kiong-ge/.local/emacs/native-comp/share/emacs/28.0.50/site-lisp:/home/kiong-ge/.local/emacs/native-comp/share/emacs/site-lisp"
/* Like PATH_LOADSEARCH, but used only during the build process
when Emacs is dumping. Configure (using "make epaths-force") sets
this to $buildlisppath, which normally has the value: <srcdir>/lisp.
*/
#define PATH_DUMPLOADSEARCH
"/home/kiong-ge/Downloads/emacs/native-comp/build/../src/lisp"
/* The extra search path for programs to invoke. This is appended to
whatever the PATH environment variable says to set the Lisp
variable exec-path and the first file name in it sets the Lisp
variable exec-directory. exec-directory is used for finding
executables and other architecture-dependent files. */
#define PATH_EXEC
"/home/kiong-ge/.local/emacs/native-comp/libexec/emacs/28.0.50/x86_64-pc-linux-gnu"
/* Where Emacs should look for its architecture-independent data
files, like the NEWS file. The lisp variable data-directory
is set to this value. */
#define PATH_DATA
"/home/kiong-ge/.local/emacs/native-comp/share/emacs/28.0.50/etc"
/* Where Emacs should look for X bitmap files.
The lisp variable x-bitmap-file-path is set based on this value. */
#define PATH_BITMAPS "/usr/include/X11/bitmaps"
/* Where Emacs should look for its docstring file. The lisp variable
doc-directory is set to this value. */
#define PATH_DOC
"/home/kiong-ge/.local/emacs/native-comp/share/emacs/28.0.50/etc"
/* Where the configuration process believes the info tree lives. The
lisp variable configure-info-directory gets its value from this
macro, and is then used to set the Info-default-directory-list. */
#define PATH_INFO "/home/kiong-ge/.local/emacs/native-comp/share/info"
/* Where Emacs should store game score files. */
#define PATH_GAME ((char const *) 0)
/* Where Emacs should look for the application default file. */
#define PATH_X_DEFAULTS
"/usr/share/X11/%L/%T/%N%C%S:/usr/share/X11/%l/%T/%N%C%S:/usr/share/X11/%T/%N%C%S:/usr/share/X11/%L/%T/%N%S:/usr/share/X11/%l/%T/%N%S:/usr/share/X11/%T/%N%S:/usr/lib/X11/%L/%T/%N%C%S:/usr/lib/X11/%l/%T/%N%C%S:/usr/lib/X11/%T/%N%C%S:/usr/lib/X11/%L/%T/%N%S:/usr/lib/X11/%l/%T/%N%S:/usr/lib/X11/%T/%N%S"
It seems having all the path environment variables generated at build
time, that's why I am a little bit confused
On Thu, Dec 17, 2020 at 3:00 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: Liāu, Kiong-Gē 廖宮毅 <gongyi.liao@gmail.com>
> > Date: Thu, 17 Dec 2020 14:48:30 -0600
> > Cc: Andrea Corallo <akrl@sdf.org>, emacs-devel@gnu.org
> >
> > It seems the %emacs_dir% part is not expanded
>
> Of course it isn't: that happens at run time, not at build time.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-12-17 21:06 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-17 1:44 Native-comp branch compilation error on Windows Liāu, Kiong-Gē 廖宮毅
2020-12-17 19:51 ` Andrea Corallo via Emacs development discussions.
2020-12-17 20:43 ` Eli Zaretskii
2020-12-17 20:48 ` Liāu, Kiong-Gē 廖宮毅
2020-12-17 21:00 ` Eli Zaretskii
2020-12-17 21:06 ` Liāu, Kiong-Gē 廖宮毅
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).