unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* master doesn't build on Win10
@ 2021-10-29 18:12 Arash Esbati
  2021-10-29 18:27 ` Stefan Kangas
  0 siblings, 1 reply; 4+ messages in thread
From: Arash Esbati @ 2021-10-29 18:12 UTC (permalink / raw)
  To: emacs-devel

Hi all,

current master (commit 4dd8b2c086) doesn't build with Msys2.  The message
is (with manual line breaks added for better legibility):

--8<---------------cut here---------------start------------->8---
  CC       json.o
  CC       tparam.o
  CC       lastfile.o
  CCLD     temacs.exe
z:/pathto/x86_64-w64-mingw32/bin/ld.exe: image.o:image.c:(.text+0xbea2):
                undefined reference to `DGifSavedExtensionToGCB'
z:/pathto/x86_64-w64-mingw32/bin/ld.exe: image.o:image.c:(.text+0xc05e):
                undefined reference to `DGifSavedExtensionToGCB'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [Makefile:647: temacs.exe] Error 1
--8<---------------cut here---------------end--------------->8---

I suspect it is due to change f9282e1d72[1].  My installed giflib
version is 5.2.1 (with GCC 11.2).  Is this a Windows only issue?

Best, Arash

Footnotes:
[1]  http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=f9282e1d724f1cb2e239f946957fdf02aa15dcc5



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

* Re: master doesn't build on Win10
  2021-10-29 18:12 master doesn't build on Win10 Arash Esbati
@ 2021-10-29 18:27 ` Stefan Kangas
  2021-10-29 18:36   ` Stefan Kangas
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Kangas @ 2021-10-29 18:27 UTC (permalink / raw)
  To: Arash Esbati, emacs-devel

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

Arash Esbati <arash@gnu.org> writes:

> I suspect it is due to change f9282e1d72[1].  My installed giflib
> version is 5.2.1 (with GCC 11.2).

Thanks.  Yes, that's the commit that caused this.

> Is this a Windows only issue?

Yes.  Could you please check if the attached patch fixes it?

[-- Attachment #2: 0001-src-image.c-Fix-building-with-giflib-on-MS-Windows.patch --]
[-- Type: text/x-diff, Size: 1621 bytes --]

From d9abc45ab53dbed31a5853087a7be21e804d9668 Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefan@marxist.se>
Date: Fri, 29 Oct 2021 20:20:46 +0200
Subject: [PATCH] * src/image.c: Fix building with giflib on MS-Windows.

---
 src/image.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/image.c b/src/image.c
index 376a53e967..6ab9670e4b 100644
--- a/src/image.c
+++ b/src/image.c
@@ -8277,6 +8277,8 @@ DEF_DLL_FN (GifFileType *, DGifOpenFileName, (const char *));
 #  else
 DEF_DLL_FN (GifFileType *, DGifOpen, (void *, InputFunc, int *));
 DEF_DLL_FN (GifFileType *, DGifOpenFileName, (const char *, int *));
+DEF_DLL_FN (int, DGifSavedExtensionToGCB, (GifFileType *, int,
+					   GraphicsControlBlock *));
 #  endif
 #  if HAVE_GIFERRORSTRING
 DEF_DLL_FN (char const *, GifErrorString, (int));
@@ -8294,6 +8296,9 @@ init_gif_functions (void)
   LOAD_DLL_FN (library, DGifSlurp);
   LOAD_DLL_FN (library, DGifOpen);
   LOAD_DLL_FN (library, DGifOpenFileName);
+#  if GIFLIB_MAJOR >= 5
+  LOAD_DLL_FN (library, DGifSavedExtensionToGCB);
+#  endif
 #  if HAVE_GIFERRORSTRING
   LOAD_DLL_FN (library, GifErrorString);
 #  endif
@@ -8304,12 +8309,14 @@ init_gif_functions (void)
 #  undef DGifOpen
 #  undef DGifOpenFileName
 #  undef DGifSlurp
+#  undef DGifSavedExtensionToGCB
 #  undef GifErrorString
 
 #  define DGifCloseFile fn_DGifCloseFile
 #  define DGifOpen fn_DGifOpen
 #  define DGifOpenFileName fn_DGifOpenFileName
 #  define DGifSlurp fn_DGifSlurp
+#  define DGifSavedExtensionToGCB fn_DGifSavedExtensionToGCB
 #  define GifErrorString fn_GifErrorString
 
 # endif /* WINDOWSNT */
-- 
2.30.2


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

* Re: master doesn't build on Win10
  2021-10-29 18:27 ` Stefan Kangas
@ 2021-10-29 18:36   ` Stefan Kangas
  2021-10-29 19:05     ` Arash Esbati
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Kangas @ 2021-10-29 18:36 UTC (permalink / raw)
  To: Arash Esbati, emacs-devel

Stefan Kangas <stefankangas@gmail.com> writes:

> Yes.  Could you please check if the attached patch fixes it?

Seeing as the build was already broken, I pushed that fix to master for
your convenience.  It looks correct to me, but I don't have access to an
MS-Windows machine for testing, so please check that it works.

Thanks in advance.



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

* Re: master doesn't build on Win10
  2021-10-29 18:36   ` Stefan Kangas
@ 2021-10-29 19:05     ` Arash Esbati
  0 siblings, 0 replies; 4+ messages in thread
From: Arash Esbati @ 2021-10-29 19:05 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: emacs-devel

Stefan Kangas <stefankangas@gmail.com> writes:

> Stefan Kangas <stefankangas@gmail.com> writes:
>
>> Yes.  Could you please check if the attached patch fixes it?
>
> Seeing as the build was already broken, I pushed that fix to master for
> your convenience.  It looks correct to me, but I don't have access to an
> MS-Windows machine for testing, so please check that it works.

Yupp, back in business again.  Thanks for the quick fix.

Best, Arash



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

end of thread, other threads:[~2021-10-29 19:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-29 18:12 master doesn't build on Win10 Arash Esbati
2021-10-29 18:27 ` Stefan Kangas
2021-10-29 18:36   ` Stefan Kangas
2021-10-29 19:05     ` Arash Esbati

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