all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: Warnings during building the current master on Win10 with MSYS2/MinGW64
@ 2024-07-25  8:25 Angelo Graziosi
  2024-07-25 16:42 ` Pip Cet
  0 siblings, 1 reply; 8+ messages in thread
From: Angelo Graziosi @ 2024-07-25  8:25 UTC (permalink / raw)
  To: emacs-devel; +Cc: arash

> after a long time, I built Emacs (baf9f1210a) from master on my Win10
> box and it occurred to me that I get more warnings than I used to.  This
> is with

My MSYS2/UCRT64 build of master (20240724_192011) dose not show warnings:

$ grep -i warn emacs-master-u64-x86_64-20240724_192011-release-build.log
ac-wrapper: autoreconf: warning: auto-detected versions not found ( ); 
falling back to latest available
checking whether C compiler handles -Werror -Wunknown-warning-option... no
checking for C compiler option to allow warnings... -Wno-error
   ELC      emacs-lisp/warnings.elc
   ELC      progmodes/cwarn.elc
org.texi:16157: warning: @anchor should not appear on @item line
org.texi:16170: warning: @anchor should not appear on @item line
./emacs-lisp/warnings.el
./emacs-lisp/warnings.elc
./progmodes/cwarn.el
./progmodes/cwarn.elc

Emacs is built with

gcc version 14.1.0 (Rev3, Built by MSYS2 project)


and configured something like this

--------------------------------------
./configure --prefix="/${PREFIXNAME}" \
                 --host=x86_64-w64-mingw32 \
                 --build=x86_64-w64-mingw32 \
                 --without-dbus \
                 --without-pop \
                 --with-modules \
                 --without-native-compilation \
                 --enable-checking=no \
                 CFLAGS=-O2 -static
--------------------------------------

with the result:

--------------------------------------
Configured for 'x86_64-w64-mingw32'.

   Where should the build process find the source code?    .
   What compiler should emacs be built with? 
x86_64-w64-mingw32-gcc  -O2 -static
   Should Emacs use the GNU version of malloc?             no
     (The GNU allocators don't work with this system configuration.)
   Should Emacs use a relocating allocator for buffers?    no
   Should Emacs use mmap(2) for buffer allocation?         yes
   What window system should Emacs use?                    w32
   What toolkit should Emacs use?                          none
   Where do we find X Windows header files?                NONE
   Where do we find X Windows libraries?                   NONE
   Does Emacs use -lXaw3d?                                 no
   Is Emacs being built for Android?                       no
   Does Emacs use the X Double Buffer Extension?           no
   Does Emacs use -lXpm?                                   yes
   Does Emacs use -ljpeg?                                  yes
   Does Emacs use -ltiff?                                  yes
   Does Emacs use a gif library?                           yes
   Does Emacs use a png library?                           yes
   Does Emacs use -lrsvg-2?                                yes
   Does Emacs use -lwebp?                                  yes
   Does Emacs use -lsqlite3?                               yes
   Does Emacs use cairo?                                   no
   Does Emacs use -llcms2?                                 yes
   Does Emacs use imagemagick?                             no
   Does Emacs use native APIs for images?                  yes (w32)
   Does Emacs support sound?                               yes
   Does Emacs use -lgpm?                                   no
   Does Emacs use -ldbus?                                  no
   Does Emacs use -lgconf?                                 no
   Does Emacs use GSettings?                               no
   Does Emacs use a file notification library?             yes (w32)
   Does Emacs use access control lists?                    yes
   Does Emacs use -lselinux?                               no
   Does Emacs use -lgnutls?                                yes
   Does Emacs use -lxml2?                                  yes
   Does Emacs use -lfreetype?                              no
   Does Emacs use HarfBuzz?                                yes
   Does Emacs use -lm17n-flt?                              no
   Does Emacs use -lotf?                                   no
   Does Emacs use -lxft?                                   no
   Does Emacs use -lsystemd?                               no
   Does Emacs use -ltree-sitter?                           yes
   Does Emacs use the GMP library?                         yes
   Does Emacs directly use zlib?                           yes
   Does Emacs have dynamic modules support?                yes
   Does Emacs use toolkit scroll bars?                     yes
   Does Emacs support Xwidgets?                            no
   Does Emacs have threading support in lisp?              yes
   Does Emacs support the portable dumper?                 yes
   Does Emacs support legacy unexec dumping?               no
   Which dumping strategy does Emacs use?                  pdumper
   Does Emacs have native lisp compiler?                   no
   Does Emacs use version 2 of the X Input Extension?      no
   Does Emacs generate a smaller-size Japanese dictionary? no
--------------------------------------

Also the build of IGC branch produces the same results: no warnings.


Ciao,
  Angelo.




^ permalink raw reply	[flat|nested] 8+ messages in thread
* Warnings during building the current master on Win10 with MSYS2/MinGW64
@ 2024-07-24 20:16 Arash Esbati
  2024-07-25  5:56 ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Arash Esbati @ 2024-07-24 20:16 UTC (permalink / raw)
  To: emacs-devel

Hi all,

after a long time, I built Emacs (baf9f1210a) from master on my Win10
box and it occurred to me that I get more warnings than I used to.  This
is with

$ gcc --version
gcc.exe (Rev3, Built by MSYS2 project) 14.1.0

It starts with (linebreaks added manually):

--8<---------------cut here---------------start------------->8---
boot-time-aux.h: In function 'get_windows_boot_time_fallback':
boot-time-aux.h:395:26: warning: the comparison will always evaluate as
                'true' for the address of 'GetTickCount64' will never be
                NULL [-Waddress]
  395 |   if (GetTickCount64Func != NULL)
      |                          ^~
In file included from C:/msys64/mingw64/include/winbase.h:36,
                 from C:/msys64/mingw64/include/windows.h:70,
                 from boot-time.c:48:
C:/msys64/mingw64/include/sysinfoapi.h:42:31: note: 'GetTickCount64' declared here
   42 |   WINBASEAPI ULONGLONG WINAPI GetTickCount64 (VOID);
      |                               ^~~~~~~~~~~~~~
--8<---------------cut here---------------end--------------->8---

and goes on with:

--8<---------------cut here---------------start------------->8---
In file included from regex.c:69:
regex_internal.c: In function 'create_ci_newstate':
regex_internal.c:1599:48: warning: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Wcalloc-transposed-args]
 1599 |   newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1);
      |                                                ^~~~~~~~~~~~~
regex_internal.c:1599:48: note: earlier argument should specify number of elements, later size of each element
regex_internal.c: In function 'create_cd_newstate':
regex_internal.c:1647:48: warning: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Wcalloc-transposed-args]
 1647 |   newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1);
      |                                                ^~~~~~~~~~~~~
regex_internal.c:1647:48: note: earlier argument should specify number of elements, later size of each element
In file included from regex.c:70:
regcomp.c: In function 'init_dfa':
regcomp.c:834:38: warning: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Wcalloc-transposed-args]
  834 |   dfa->state_table = calloc (sizeof (struct re_state_table_entry), table_size);
      |                                      ^~~~~~
regcomp.c:834:38: note: earlier argument should specify number of elements, later size of each element
regcomp.c:865:60: warning: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Wcalloc-transposed-args]
  865 |           dfa->sb_char = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1);
      |                                                            ^~~~~~~~
regcomp.c:865:60: note: earlier argument should specify number of elements, later size of each element
regcomp.c: In function 'parse_bracket_exp':
regcomp.c:3058:46: warning: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Wcalloc-transposed-args]
 3058 |   sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1);
      |                                              ^~~~~~~~
regcomp.c:3058:46: note: earlier argument should specify number of elements, later size of each element
regcomp.c:3059:45: warning: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Wcalloc-transposed-args]
 3059 |   mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1);
      |                                             ^~~~~~~~~~~~
regcomp.c:3059:45: note: earlier argument should specify number of elements, later size of each element
regcomp.c: In function 'build_charclass_op':
regcomp.c:3551:46: warning: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Wcalloc-transposed-args]
 3551 |   sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1);
      |                                              ^~~~~~~~
regcomp.c:3551:46: note: earlier argument should specify number of elements, later size of each element
regcomp.c:3557:45: warning: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Wcalloc-transposed-args]
 3557 |   mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1);
      |                                             ^~~~~~~~~~~~
regcomp.c:3557:45: note: earlier argument should specify number of elements, later size of each element
In file included from regex.c:71:
regexec.c: In function 'get_subexp':
regexec.c:2724:47: warning: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Wcalloc-transposed-args]
 2724 |               sub_top->path = calloc (sizeof (state_array_t),
      |                                               ^~~~~~~~~~~~~
regexec.c:2724:47: note: earlier argument should specify number of elements, later size of each element
regexec.c: In function 'build_trtable':
regexec.c:3269:29: warning: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Wcalloc-transposed-args]
 3269 |             calloc (sizeof (re_dfastate_t *), SBC_MAX);
      |                             ^~~~~~~~~~~~~
regexec.c:3269:29: note: earlier argument should specify number of elements, later size of each element
regexec.c:3341:44: warning: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Wcalloc-transposed-args]
 3341 |         (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), SBC_MAX);
      |                                            ^~~~~~~~~~~~~
regexec.c:3341:44: note: earlier argument should specify number of elements, later size of each element
regexec.c:3372:44: warning: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Wcalloc-transposed-args]
 3372 |         (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), 2 * SBC_MAX);
      |                                            ^~~~~~~~~~~~~
regexec.c:3372:44: note: earlier argument should specify number of elements, later size of each element
--8<---------------cut here---------------end--------------->8---

And others.  Is there an interest to see them all, should I post them
here or to the bug tracker?

I build Emacs with a small script like this:

--8<---------------cut here---------------start------------->8---
git clean -fdx --exclude=ChangeLog
./autogen.sh &&              \
CPPFLAGS='-DNDEBUG'          \
CFLAGS='-O2 -g0 -pipe'       \
LDFLAGS='-s -Wl,-s'          \
./configure                  \
--host=x86_64-w64-mingw32    \
--target=x86_64-w64-mingw32  \
--build=x86_64-w64-mingw32   \
--with-jpeg                  \
--with-gif                   \
--with-xpm                   \
--with-png                   \
--with-tiff                  \
--with-rsvg                  \
--with-webp                  \
--with-sqlite3               \
--with-xml2                  \
--with-gnutls                \
--with-lcms2                 \
--with-modules               \
--with-threads               \
--with-native-compilation    \
--with-native-image-api      \
--with-tree-sitter           \
--with-xdbe                  \
--without-imagemagick        \
--without-dbus               \
--without-gconf              \
--without-gsettings          \
--without-compress-install   \
--without-mailutils          \
--without-pop  &&            \
make  ...
--8<---------------cut here---------------end--------------->8---

Best, Arash



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

end of thread, other threads:[~2024-07-25 18:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-25  8:25 Warnings during building the current master on Win10 with MSYS2/MinGW64 Angelo Graziosi
2024-07-25 16:42 ` Pip Cet
2024-07-25 17:46   ` Angelo Graziosi
2024-07-25 18:48   ` Angelo Graziosi
  -- strict thread matches above, loose matches on Subject: below --
2024-07-24 20:16 Arash Esbati
2024-07-25  5:56 ` Eli Zaretskii
2024-07-25  6:49   ` Collin Funk
2024-07-25 11:11   ` Arash Esbati

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.