Skip to contentSkip to conversation

package/minidlna: Fix FTBFS with gcc10

PATCH New Bernd Kuhls 3 participants 4 messages Jun 27, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/minidlna: Fix FTBFS with gcc10

Bug was reported upstream:
https://sourceforge.net/p/minidlna/patches/182/

---
 package/minidlna/0001-fix-gcc10-ftbfs.patch | 35 +++++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 package/minidlna/0001-fix-gcc10-ftbfs.patch
package/minidlna/0001-fix-gcc10-ftbfs.patch new file +35 -0
new file mode 100644
index 0000000000..02397890c9
@@ -0,0 +1,35 @@
+Fix FTBFS with gcc10
+
+Downloaded from
+https://sources.debian.org/src/minidlna/1.2.1+dfsg-2/debian/patches/14-fix-gcc10-ftbfs.patch/
+
+Fixes https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=957541
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+
+--- a/metadata.c
++++ b/metadata.c
+@@ -484,12 +484,12 @@
+ }
+ 
+ /* For libjpeg error handling */
+-jmp_buf setjmp_buffer;
++jmp_buf metadata_setjmp_buffer;
+ static void
+ libjpeg_error_handler(j_common_ptr cinfo)
+ {
+ 	cinfo->err->output_message (cinfo);
+-	longjmp(setjmp_buffer, 1);
++	longjmp(metadata_setjmp_buffer, 1);
+ 	return;
+ }
+ 
+@@ -613,7 +613,7 @@
+ 			cinfo.err = jpeg_std_error(&jerr);
+ 			jerr.error_exit = libjpeg_error_handler;
+ 			jpeg_create_decompress(&cinfo);
+-			if( setjmp(setjmp_buffer) )
++			if( setjmp(metadata_setjmp_buffer) )
+ 				goto error;
+ 			jpeg_stdio_src(&cinfo, infile);
+ 			jpeg_read_header(&cinfo, TRUE);
Signature · 1 line
2.26.2
#1 lore raw

PATCH 1/1 package/minidlna: Fix FTBFS with gcc10

Quoted 2 lines · On Sat, 27 Jun 2020 13:43:14 +0200 Bernd Kuhls <[email protected]> wrote:

Bug was reported upstream:
https://sourceforge.net/p/minidlna/patches/182/

This bug doesn't seem at all to match this gcc10 build issue. Am I missing something?

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

PATCH 1/1 package/minidlna: Fix FTBFS with gcc10

Am Sat, 27 Jun 2020 17:12:27 +0200 schrieb Thomas Petazzoni:

Quoted 10 lines
Quoted 2 lines · On Sat, 27 Jun 2020 13:43:14 +0200 Bernd Kuhls <[email protected]> wrote:

Bug was reported upstream:
https://sourceforge.net/p/minidlna/patches/182/

This bug doesn't seem at all to match this gcc10 build issue. Am I missing something?

Thomas

Hi Thomas,

oops, added the wrong link, this is the right one:
https://sourceforge.net/p/minidlna/support-requests/70/

Regards, Bernd

#3 lore raw

PATCH 1/1 package/minidlna: Fix FTBFS with gcc10

On 2020-06-27 17:15 +0200, Bernd Kuhls spake thusly:

Quoted 7 lines

Am Sat, 27 Jun 2020 17:12:27 +0200 schrieb Thomas Petazzoni:

Quoted 6 lines
Quoted 2 lines · On Sat, 27 Jun 2020 13:43:14 +0200 Bernd Kuhls <[email protected]> wrote:

Bug was reported upstream:
https://sourceforge.net/p/minidlna/patches/182/

This bug doesn't seem at all to match this gcc10 build issue. Am I missing something?

That's because setjmp_buffer is also declared in image_utils.c, and this triggers the infamous gcc-10 -fno-common error.

Quoted 2 lines

oops, added the wrong link, this is the right one:
https://sourceforge.net/p/minidlna/support-requests/70/

Ah, but as I see it, both the proposal in that bug repot (addign extern in front of one of them), or renaming the variable in metadata.c or in mage_utils.c, are wrong.

The real fix is to turn both variables as static, so their scope is limited to the file they are defined and use in.

Care to take that with upstream (and debian), please?

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'