Subject: bug#45303: 28.0.50; [feature/native-comp] comp.c compilation error on Windows 10

From: Liāu, Kiong-Gē 廖宮毅 <[email-masked]>
Date: Thu, 17 Dec 2020 15:27:40 -0600

commit 87f6e93799  lead to successful compilation of comp.c, but lead
to linker errors while generating temacs.exe:

 CCLD     temacs.exe
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
comp.o: in function `md5_gz_stream':
C:\msys64\home\VWinUser0\Downloads\emacs\native-comp\build\src/../../src/src/comp.c:713:
undefined reference to `inflateInit2_'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
C:\msys64\home\VWinUser0\Downloads\emacs\native-comp\build\src/../../src/src/comp.c:730:
undefined reference to `inflate'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
C:\msys64\home\VWinUser0\Downloads\emacs\native-comp\build\src/../../src/src/comp.c:741:
undefined reference to `inflateEnd'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
C:\msys64\home\VWinUser0\Downloads\emacs\native-comp\build\src/../../src/src/comp.c:741:
undefined reference to `inflateEnd'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
comp.o: in function `declare_imported_func':
C:\msys64\home\VWinUser0\Downloads\emacs\native-comp\build\src/../../src/src/comp.c:973:
undefined reference to `gcc_jit_type_get_const'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
process.o: in function `status_message':
C:\msys64\home\VWinUser0\Downloads\emacs\native-comp\build\src/../../src/src/process.c:754:
undefined reference to `strsignal'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
callproc.o: in function `call_process':
C:\msys64\home\VWinUser0\Downloads\emacs\native-comp\build\src/../../src/src/callproc.c:916:
undefined reference to `strsignal'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [Makefile:661: temacs.exe] Error 1
make[1]: Leaving directory
'/home/VWinUser0/Downloads/emacs/native-comp/build/src'
make: *** [Makefile:434: src] Error 2

On Thu, Dec 17, 2020 at 3:10 PM Andrea Corallo <[email-masked]> wrote:
>
> Eli Zaretskii <[email-masked]> writes:
>
> >> Date: Thu, 17 Dec 2020 20:57:29 +0000
> >> Cc: [email-masked]
> >> From: Andrea Corallo via "Bug reports for GNU Emacs,
> >>  the Swiss army knife of text editors" <[email-masked]>
> >>
> >> I've pushed 174f2a92eb, could you please have a try?  I've no windows machine on
> >> to test it myself.
> >
> > Don't you need to update also the epaths-force-w32 target in
> > Makefile.in?
>
> Uops, pushed 87f6e93799 thanks
>
>   Andrea
>