unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Branch scratch/correct-warning-pos now bootstraps with or without native compilation.
@ 2021-12-30 10:38 Alan Mackenzie
  2021-12-30 21:09 ` Brahimi Saifullah
  0 siblings, 1 reply; 5+ messages in thread
From: Alan Mackenzie @ 2021-12-30 10:38 UTC (permalink / raw)
  To: emacs-devel; +Cc: Stefan Monnier, Andrea Corallo

Hello, Emacs.

The branch scratch/correct-warning-pos, which gives the correct source
position on warning messages for byte compilation, now bootstraps with
and without native compilation.

It is still a work in progress; for example, work still needs to be done
on the stripping of positions from symbols.

Also, warning messages currently display two source positions - the first
from the old method of determining them, the second the new method.

Please try out this branch, and report any problems you encounter.

Thanks!

-- 
Alan Mackenzie (Nuremberg, Germany).



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Branch scratch/correct-warning-pos now bootstraps with or without native compilation.
  2021-12-30 10:38 Branch scratch/correct-warning-pos now bootstraps with or without native compilation Alan Mackenzie
@ 2021-12-30 21:09 ` Brahimi Saifullah
  2021-12-31  7:39   ` Eli Zaretskii
  2021-12-31 23:28   ` Alan Mackenzie
  0 siblings, 2 replies; 5+ messages in thread
From: Brahimi Saifullah @ 2021-12-30 21:09 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: Andrea Corallo, Stefan Monnier, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 921 bytes --]

I can't seem to build this on Windows.

  CCLD     temacs.exe
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: comp.o: in function `emit_SYMBOL_WITH_POS_SYM':
C:\emacs\2912\src/comp.c:1487: undefined reference to `gcc_jit_context_new_location'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: comp.o: in function `emit_EQ':
C:\emacs\2912\src/comp.c:1499: undefined reference to `gcc_jit_context_new_location'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\emacs\2912\src/comp.c:1499: undefined reference to `gcc_jit_context_new_location'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [Makefile:691: temacs.exe] Error 1
make[1]: Leaving directory '/c/emacs/2912/src'
make: *** [Makefile:452: src] Error 2

Attached is the full output of Make.


[-- Attachment #2: Make log --]
[-- Type: text/plain, Size: 8563 bytes --]

make -C nt all
make -C lib all
make -C doc/lispref info
make -C doc/lispintro info
make[1]: Entering directory '/c/emacs/3012/nt'
make[1]: Entering directory '/c/emacs/3012/doc/lispintro'
make[1]: Nothing to be done for 'info'.
make[1]: Leaving directory '/c/emacs/3012/doc/lispintro'
make[1]: Entering directory '/c/emacs/3012/doc/lispref'
make[1]: Nothing to be done for 'info'.
make[1]: Leaving directory '/c/emacs/3012/doc/lispref'
make -C doc/emacs info
  RC       emacs.res
make[1]: Entering directory '/c/emacs/3012/doc/emacs'
make[1]: Nothing to be done for 'info'.
make[1]: Leaving directory '/c/emacs/3012/doc/emacs'
  CCLD     addpm.exe
  CCLD     cmdproxy.exe
make[1]: Entering directory '/c/emacs/3012/lib'
  CC       fingerprint.o
  CCLD     ddeclient.exe
  CC       acl_entries.o
  CC       execinfo.o
  CC       fpending.o
  CC       getopt.o
  CCLD     runemacs.exe
  CC       getopt1.o
  CC       getrandom.o
  CC       gettimeofday.o
  CC       memmem.o
  CC       memrchr.o
  CC       mkostemp.o
  CC       mktime.o
  CC       regex.o
  CC       sig2str.o
  CC       sigdescr_np.o
make[1]: Leaving directory '/c/emacs/3012/nt'
  CC       stpcpy.o
  CC       time_r.o
  CC       time_rz.o
  CC       timegm.o
  CC       binary-io.o
  CC       c-ctype.o
  CC       c-strcasecmp.o
  CC       c-strncasecmp.o
  CC       close-stream.o
  CC       count-leading-zeros.o
  CC       count-one-bits.o
  CC       count-trailing-zeros.o
  CC       md5-stream.o
  CC       md5.o
  CC       sha1.o
  CC       sha256.o
  CC       sha512.o
  CC       dtoastr.o
  CC       dtotimespec.o
  CC       malloc/dynarray_at_failure.o
  CC       malloc/dynarray_emplace_enlarge.o
  CC       malloc/dynarray_finalize.o
  CC       malloc/dynarray_resize.o
  CC       malloc/dynarray_resize_clear.o
  CC       filemode.o
  CC       filevercmp.o
  CC       gettime.o
  CC       nstrftime.o
  CC       qcopy-acl.o
  CC       stat-time.o
  CC       tempname.o
  CC       timespec.o
  CC       timespec-add.o
  CC       timespec-sub.o
  CC       u64.o
  AR       libgnu.a
make[1]: Leaving directory '/c/emacs/3012/lib'
make -C lib-src all
make[1]: Entering directory '/c/emacs/3012/lib-src'
  CC       ntlib.o
  RC       emacsclient.res
  CC       pop.o
  CCLD     etags.exe
  CCLD     ctags.exe
  CCLD     emacsclient.exe
  CCLD     emacsclientw.exe
  CCLD     ebrowse.exe
  CCLD     hexl.exe
  CCLD     movemail.exe
  CCLD     make-docfile.exe
  CCLD     make-fingerprint.exe
make[1]: Leaving directory '/c/emacs/3012/lib-src'
make -C src VCSWITNESS='$(srcdir)/../.git/logs/HEAD' BIN_DESTDIR=''/mingw64/bin/'' \
	 ELN_DESTDIR='/mingw64/lib/emacs/29.0.50/' all
make[1]: Entering directory '/c/emacs/3012/src'
  GEN      globals.h
make -C ../nt ../src/emacs.res
make -C ../admin/charsets all
  GEN      buildobj.h
make[2]: Entering directory '/c/emacs/3012/nt'
  RC       ../src/emacs.res
make[2]: Leaving directory '/c/emacs/3012/nt'
make -C ../admin/unidata charscript.el
make[2]: Entering directory '/c/emacs/3012/admin/unidata'
make[2]: Entering directory '/c/emacs/3012/admin/charsets'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/c/emacs/3012/admin/charsets'
make -C ../admin/unidata emoji-zwj.el
make[2]: Entering directory '/c/emacs/3012/admin/unidata'
make[2]: Nothing to be done for 'charscript.el'.
make[2]: Leaving directory '/c/emacs/3012/admin/unidata'
make -C ../admin/charsets cp51932.el
make[2]: Entering directory '/c/emacs/3012/admin/charsets'
make[2]: Nothing to be done for 'cp51932.el'.
make[2]: Leaving directory '/c/emacs/3012/admin/charsets'
make -C ../admin/charsets eucjp-ms.el
make[2]: Nothing to be done for 'emoji-zwj.el'.
make[2]: Leaving directory '/c/emacs/3012/admin/unidata'
make[2]: Entering directory '/c/emacs/3012/admin/charsets'
make[2]: Nothing to be done for 'eucjp-ms.el'.
make[2]: Leaving directory '/c/emacs/3012/admin/charsets'
  CC       firstfile.o
  CC       dispnew.o
  CC       frame.o
  CC       scroll.o
  CC       xdisp.o
  CC       menu.o
  CC       window.o
  CC       charset.o
  CC       coding.o
  CC       category.o
  CC       ccl.o
  CC       character.o
  CC       chartab.o
  CC       bidi.o
  CC       term.o
  CC       terminal.o
  CC       xfaces.o
  CC       dbusbind.o
  CC       emacs.o
  CC       keyboard.o
  CC       macros.o
  CC       keymap.o
  CC       sysdep.o
  CC       bignum.o
  CC       buffer.o
  CC       filelock.o
  CC       insdel.o
  CC       marker.o
  CC       minibuf.o
  CC       fileio.o
  CC       dired.o
  CC       cmds.o
  CC       casetab.o
  CC       casefiddle.o
  CC       indent.o
  CC       search.o
  CC       regex-emacs.o
  CC       undo.o
  CC       alloc.o
  CC       pdumper.o
  CC       data.o
  CC       doc.o
  CC       editfns.o
  CC       callint.o
  CC       eval.o
  CC       floatfns.o
  CC       fns.o
  CC       font.o
  CC       print.o
  CC       lread.o
  CC       emacs-module.o
  CC       syntax.o
  CC       bytecode.o
  CC       comp.o
  CC       dynlib.o
  CC       process.o
  CC       gnutls.o
  CC       callproc.o
  CC       region-cache.o
In file included from process.c:33:
process.c: In function 'Fmake_process':
lisp.h:1651:31: warning: null pointer dereference [-Wnull-dereference]
 1651 |   return XSTRING (string)->u.s.data;
      |          ~~~~~~~~~~~~~~~~~~~~~^~~~~
  CC       sound.o
  CC       timefns.o
  CC       atimer.o
  CC       doprnt.o
  CC       intervals.o
  CC       textprop.o
  CC       composite.o
  CC       xml.o
  CC       lcms.o
  CC       w32notify.o
  CC       profiler.o
  CC       decompress.o
  CC       thread.o
  CC       systhread.o
  CC       hbfont.o
  CC       w32fns.o
  CC       w32menu.o
  CC       w32reg.o
  CC       w32font.o
  CC       w32term.o
w32menu.c: In function 'set_frame_menubar':
w32menu.c:324:9: warning: 'memcpy' offset [3, 10] from the object at '<unknown>' is out of the bounds of referenced subobject 'contents' with type 'struct Lisp_X *[]' at offset 3 [-Warray-bounds]
  324 |         memcpy (previous_items, XVECTOR (f->menu_bar_vector)->contents,
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  325 |                 previous_menu_items_used * word_size);
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from w32menu.c:26:
lisp.h:1720:17: note: subobject 'contents' declared here
 1720 |     Lisp_Object contents[FLEXIBLE_ARRAY_MEMBER];
      |                 ^~~~~~~~
  CC       w32xfns.o
  CC       w32select.o
  CC       w32uniscribe.o
  CC       w32cygwinx.o
  CC       w32.o
  CC       w32console.o
  CC       w32heap.o
  CC       w32inevt.o
w32heap.c: In function 'getrlimit':
w32heap.c:853:14: warning: 'm' may be used uninitialized [-Wmaybe-uninitialized]
  853 |         if (!VirtualQuery ((LPCVOID) &m, &m, sizeof m))
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:/msys64/mingw64/x86_64-w64-mingw32/include/winbase.h:25,
                 from C:/msys64/mingw64/x86_64-w64-mingw32/include/windows.h:70,
                 from w32common.h:24,
                 from w32heap.c:54:
C:/msys64/mingw64/x86_64-w64-mingw32/include/memoryapi.h:45:28: note: by argument 1 of type 'LPCVOID' {aka 'const void *'} to 'VirtualQuery' declared here
   45 |   WINBASEAPI SIZE_T WINAPI VirtualQuery (LPCVOID lpAddress, PMEMORY_BASIC_INFORMATION lpBuffer, SIZE_T dwLength);
      |                            ^~~~~~~~~~~~
w32heap.c:844:34: note: 'm' declared here
  844 |         MEMORY_BASIC_INFORMATION m;
      |                                  ^
  CC       w32proc.o
  CC       w32image.o
  CC       fontset.o
  CC       fringe.o
  CC       image.o
  CC       json.o
  CC       tparam.o
  CC       lastfile.o
  CCLD     temacs.exe
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: comp.o: in function `emit_SYMBOL_WITH_POS_SYM':
C:\emacs\3012\src/comp.c:1487: undefined reference to `gcc_jit_context_new_location'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: comp.o: in function `emit_EQ':
C:\emacs\3012\src/comp.c:1499: undefined reference to `gcc_jit_context_new_location'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\emacs\3012\src/comp.c:1499: undefined reference to `gcc_jit_context_new_location'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [Makefile:691: temacs.exe] Error 1
make[1]: Leaving directory '/c/emacs/3012/src'
make: *** [Makefile:452: src] Error 2

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Branch scratch/correct-warning-pos now bootstraps with or without native compilation.
  2021-12-30 21:09 ` Brahimi Saifullah
@ 2021-12-31  7:39   ` Eli Zaretskii
  2021-12-31 23:28   ` Alan Mackenzie
  1 sibling, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2021-12-31  7:39 UTC (permalink / raw)
  To: Brahimi Saifullah; +Cc: acm, emacs-devel, monnier, akrl

> From: Brahimi Saifullah <brahimi.saifullah@gmail.com>
> Date: Thu, 30 Dec 2021 18:09:07 -0300
> Cc: Andrea Corallo <akrl@sdf.org>, Stefan Monnier <monnier@iro.umontreal.ca>,
>  emacs-devel@gnu.org
> 
>   CCLD     temacs.exe
> C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: comp.o: in function `emit_SYMBOL_WITH_POS_SYM':
> C:\emacs\2912\src/comp.c:1487: undefined reference to `gcc_jit_context_new_location'
> C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: comp.o: in function `emit_EQ':
> C:\emacs\2912\src/comp.c:1499: undefined reference to `gcc_jit_context_new_location'
> C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\emacs\2912\src/comp.c:1499: undefined reference to `gcc_jit_context_new_location'
> collect2.exe: error: ld returned 1 exit status
> make[1]: *** [Makefile:691: temacs.exe] Error 1
> make[1]: Leaving directory '/c/emacs/2912/src'
> make: *** [Makefile:452: src] Error 2

This function was not used previously in Emacs, so it should be added
to the boilerplate code under WINDOWSNT at the beginning of comp.c,
because the Windows build will load the function dynamically at run
time.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Branch scratch/correct-warning-pos now bootstraps with or without native compilation.
  2021-12-30 21:09 ` Brahimi Saifullah
  2021-12-31  7:39   ` Eli Zaretskii
@ 2021-12-31 23:28   ` Alan Mackenzie
  2022-01-01 23:28     ` Brahimi Saifullah
  1 sibling, 1 reply; 5+ messages in thread
From: Alan Mackenzie @ 2021-12-31 23:28 UTC (permalink / raw)
  To: Brahimi Saifullah; +Cc: Andrea Corallo, Stefan Monnier, emacs-devel

Hello Brahimi.

On Thu, Dec 30, 2021 at 18:09:07 -0300, Brahimi Saifullah wrote:
> I can't seem to build this on Windows.

>   CCLD     temacs.exe
> C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: comp.o: in function `emit_SYMBOL_WITH_POS_SYM':
> C:\emacs\2912\src/comp.c:1487: undefined reference to `gcc_jit_context_new_location'
> C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: comp.o: in function `emit_EQ':
> C:\emacs\2912\src/comp.c:1499: undefined reference to `gcc_jit_context_new_location'
> C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\emacs\2912\src/comp.c:1499: undefined reference to `gcc_jit_context_new_location'
> collect2.exe: error: ld returned 1 exit status
> make[1]: *** [Makefile:691: temacs.exe] Error 1
> make[1]: Leaving directory '/c/emacs/2912/src'
> make: *** [Makefile:452: src] Error 2

Yes, these calls to gcc_jit_context_new_location were just there to
produce diagnostic information.  I'd forgotten I'd put them in, and I
wasn't aware they hadn't been made available in Windows.  (I don't have
a Windows box I can test on.)

Anyway, I've taken them out.  So, if you haven't implemented Eli's
solution, please feel free to download this year's version, and try
again.

Thank you indeed for trying this out and spotting a mistake.  :-)

Happy New Year!

-- 
Alan Mackenzie (Nuremberg, Germany).



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Branch scratch/correct-warning-pos now bootstraps with or without native compilation.
  2021-12-31 23:28   ` Alan Mackenzie
@ 2022-01-01 23:28     ` Brahimi Saifullah
  0 siblings, 0 replies; 5+ messages in thread
From: Brahimi Saifullah @ 2022-01-01 23:28 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: Andrea Corallo, Stefan Monnier, emacs-devel

Indeed, it now builds successfully, and so far I haven't encountered any
other issues.
Thank you for your work, and a happy New Year to you too :)



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-01-01 23:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-30 10:38 Branch scratch/correct-warning-pos now bootstraps with or without native compilation Alan Mackenzie
2021-12-30 21:09 ` Brahimi Saifullah
2021-12-31  7:39   ` Eli Zaretskii
2021-12-31 23:28   ` Alan Mackenzie
2022-01-01 23:28     ` Brahimi Saifullah

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).