* Master branch broken for MinGW by recent Gnulib update
@ 2024-05-20 12:28 Eli Zaretskii
2024-05-20 15:30 ` Paul Eggert
0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2024-05-20 12:28 UTC (permalink / raw)
To: Paul Eggert; +Cc: emacs-devel
Paul,
The current master is broken for me, it fails to link:
d:/usr/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: ../lib/libgnu.a(sha512.o): in function `sha512_process_block':
d:\gnu\git\emacs\trunk\lib/sha512.c:378:(.text+0x81b): undefined reference to `u64rol'
d:/usr/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: d:\gnu\git\emacs\trunk\lib/sha512.c:378:(.text+0x841): undefined reference to `u64rol'
d:/usr/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: d:\gnu\git\emacs\trunk\lib/sha512.c:378:(.text+0x85f): undefined reference to `u64rol'
d:/usr/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: d:\gnu\git\emacs\trunk\lib/sha512.c:378:(.text+0x953): undefined reference to `u64rol'
d:/usr/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: d:\gnu\git\emacs\trunk\lib/sha512.c:378:(.text+0x979): undefined reference to `u64rol'
d:/usr/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: ../lib/libgnu.a(sha512.o):d:\gnu\git\emacs\trunk\lib/sha512.c:378: more undefined references to `u64rol' follow
collect2.exe: error: ld returned 1 exit status
I don't understand these linker errors, because u64rol is definitely
defined in u64.h, which is included by sha512.c. The preprocessed
source of u64rol looks like this:
typedef uint64_t u64;
inline u64
u64rol (u64 x, int n)
{
return ((((x) << (n))) | (((x) >> (64 - n))));
}
Which looks fine to me.
I've succeeded to build by removing the "inline" qualifier:
/* Return X rotated left by N bits, where 0 < N < 64. */
u64
u64rol (u64 x, int n)
{
return u64or (u64shl (x, n), u64shr (x, 64 - n));
}
Can you please fix this ASAP?
Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Master branch broken for MinGW by recent Gnulib update
2024-05-20 12:28 Master branch broken for MinGW by recent Gnulib update Eli Zaretskii
@ 2024-05-20 15:30 ` Paul Eggert
2024-05-20 15:56 ` Eli Zaretskii
0 siblings, 1 reply; 3+ messages in thread
From: Paul Eggert @ 2024-05-20 15:30 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
On 2024-05-20 05:28, Eli Zaretskii wrote:
> I don't understand these linker errors
u64rol should be declared 'inline' when compiling sha512.c, and 'extern
inline' when compiling u64.c.
My guess is that a 'make bootstrap' will fix the problem.
If not, what is the output of 'nm -o u64.o sha512.o | grep u64rol'? It
should be something like this (with more 0s on a 64-bit build):
u64.o:00000000 T u64rol
sha512.o: U u64rol
and the definition in u64.o should satisfy the use in sha512.o. If not,
please look at the preprocessed output when compiling u64.c. That output
should contain something like this:
# 200 "u64.h"
extern inline u64
u64rol (u64 x, int n)
{
return ((((x) << (n))) | (((x) >> (64 - n))));
}
and if it doesn't, that's the problem.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Master branch broken for MinGW by recent Gnulib update
2024-05-20 15:30 ` Paul Eggert
@ 2024-05-20 15:56 ` Eli Zaretskii
0 siblings, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2024-05-20 15:56 UTC (permalink / raw)
To: Paul Eggert; +Cc: emacs-devel
> Date: Mon, 20 May 2024 08:30:09 -0700
> Cc: emacs-devel@gnu.org
> From: Paul Eggert <eggert@cs.ucla.edu>
>
> On 2024-05-20 05:28, Eli Zaretskii wrote:
> > I don't understand these linker errors
>
> u64rol should be declared 'inline' when compiling sha512.c, and 'extern
> inline' when compiling u64.c.
>
> My guess is that a 'make bootstrap' will fix the problem.
I'd like to avoid "make bootstrap", since it deletes all old
executables, and I keep them for easier bisecting of problems.
But removing all the *.o files in lib/ and rebuilding solved the
problem. Thanks, and sorry for the noise.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-05-20 15:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-20 12:28 Master branch broken for MinGW by recent Gnulib update Eli Zaretskii
2024-05-20 15:30 ` Paul Eggert
2024-05-20 15:56 ` Eli Zaretskii
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).