Path: csiph.com!aioe.org!bofh.it!news.nic.it!robomod From: Joachim Reichel Newsgroups: linux.debian.bugs.dist Subject: Bug#957563: mpg321: ftbfs with GCC-10 Date: Fri, 24 Jul 2020 17:30:02 +0200 Message-ID: References: X-Original-To: 957563@bugs.debian.org, control@bugs.debian.org X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Fri Jul 24 15:27:13 2020 Old-Return-Path: X-Spam-Flag: NO X-Spam-Score: -0.25 Reply-To: Joachim Reichel , 957563@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: Nanakos Chrysostomos X-Debian-Pr-Message: followup 957563 X-Debian-Pr-Package: src:mpg321 X-Debian-Pr-Keywords: bullseye sid X-Debian-Pr-Source: mpg321 X-Spam-Bayes: score:0.0000 Tokens: new, 65; hammy, 150; neutral, 268; spammy, 0. spammytokens: hammytokens:0.000-+--H*u:68.0, 0.000-+--bug-debian, 0.000-+--bugdebian, 0.000-+--BugDebian, 0.000-+--Bug-Debian Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1595604370; bh=m4lAdIoKXchN/lxzvy+DIGwBrAYWebX2lQlfQ3s9NxE=; h=To:From:Subject:Date:From; b=Zj9mPsPhZ+DdPh0lsQp6B2KRbXTKwzzRFk8V6I3huJhr2GqLbPNfuv0VX+tojpZG1 wgeJXkZDYWIZgEtPZD3bjmtcxm9DGC22ah3iKuJxeYuflks5IXL0mnNPsjIA0yO30D xjus667rjeiipXvqxutklX41UXHahnI1Yp4+X3sTsmdUUQodKyOX6v/fxuxk9Pzl0L wEFt4fTht7HVpP53gguSMj95V5/plqPlLPr1u59DWxBJ7H0m+OmN+Sq50b7RI5ph22 YuX5k5GmhfeLeLDZKBXOpl0NZizMqSjVS/OnWowPgoBRzjs6WwtQwR59KhO7YgfiMc jx4EewlQvr7lg== User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------6F80CD813FD85C0D17E6CC87" Content-Language: en-US X-Crossassassin-Score: 2 X-Debian-Message: from BTS X-Mailing-List: archive/latest/1615302 List-ID: List-URL: Approved: robomod@news.nic.it Lines: 158 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Fri, 24 Jul 2020 17:26:10 +0200 X-Original-Message-ID: X-Original-References: Xref: csiph.com linux.debian.bugs.dist:1019147 This is a multi-part message in MIME format. --------------6F80CD813FD85C0D17E6CC87 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit tag 957563 + patch thanks Attached is the patch mpg321_common.diff that adds -fcommon to CFLAGS (see http://gcc.gnu.org/gcc-10/porting_to.html), plus adding "export" to make them take effect, and demoting one error to warning again. I've also attached the patch mpg321_extern.diff which fixes the actual cause for the problem (builds fine, but didn't really test the resulting binary). You might want to forward it to upstream. Best regards, Joachim --------------6F80CD813FD85C0D17E6CC87 Content-Type: text/x-patch; charset=UTF-8; name="mpg321_common.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="mpg321_common.diff" diff -Nru mpg321-0.3.2/debian/changelog mpg321-0.3.2/debian/changelog --- mpg321-0.3.2/debian/changelog 2019-03-13 15:59:02.000000000 +0100 +++ mpg321-0.3.2/debian/changelog 2020-07-23 17:22:42.000000000 +0200 @@ -1,3 +1,13 @@ +mpg321 (0.3.2-3.1) unstable; urgency=medium + + * Non-maintainer upload. + * Export CFLAGS to make them take effect. + * Add -Wno-error=format-security to CFLAGS to disable the default from + dpkg-buildflags as workaround for some build error. + * Add -fcommon to CFLAGS (Closes: #957563). + + -- Joachim Reichel Thu, 23 Jul 2020 17:22:42 +0200 + mpg321 (0.3.2-3) unstable; urgency=medium * Fix compilation error diff -Nru mpg321-0.3.2/debian/rules mpg321-0.3.2/debian/rules --- mpg321-0.3.2/debian/rules 2012-05-01 08:53:43.000000000 +0200 +++ mpg321-0.3.2/debian/rules 2020-07-23 17:22:42.000000000 +0200 @@ -4,7 +4,7 @@ #export DH_VERBOSE=1 -CFLAGS = $(shell dpkg-buildflags --get CFLAGS) -Wall -Wunused +export CFLAGS = $(shell dpkg-buildflags --get CFLAGS) -Wall -Wunused -Wno-error=format-security -fcommon MPG321_ARCH = $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS) --------------6F80CD813FD85C0D17E6CC87 Content-Type: text/x-patch; charset=UTF-8; name="mpg321_extern.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="mpg321_extern.diff" Description: TODO: Put a short summary on the line above and replace this paragraph with a longer explanation of this change. Complete the meta-information with other relevant fields (see below for details). --- The information above should follow the Patch Tagging Guidelines, please checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here are templates for supplementary fields that you might want to add: Origin: , Bug: Bug-Debian: https://bugs.debian.org/ Bug-Ubuntu: https://launchpad.net/bugs/ Forwarded: Reviewed-By: Last-Update: 2020-07-23 --- mpg321-0.3.2.orig/mpg321.h +++ mpg321-0.3.2/mpg321.h @@ -116,7 +116,7 @@ extern char *playlist_file; extern int quit_now; extern char remote_input_buf[PATH_MAX + 5]; extern int file_change; -int loop_remaining; +extern int loop_remaining; extern int status; extern int scrobbler_time; @@ -233,8 +233,8 @@ RETSIGTYPE handle_sigchld(int sig); #define FFT_BUFFER_SIZE_LOG 9 #define FFT_BUFFER_SIZE (1 << FFT_BUFFER_SIZE_LOG) /* 512 */ /*Temporary data stores to perform FFT in */ -double real[FFT_BUFFER_SIZE]; -double imag[FFT_BUFFER_SIZE]; +extern double real[FFT_BUFFER_SIZE]; +extern double imag[FFT_BUFFER_SIZE]; typedef struct { double real[FFT_BUFFER_SIZE]; @@ -258,10 +258,10 @@ fft_state *fft_init(void); /* Output buffer process */ void frame_buffer_p(); /* Semaphore array */ -int semarray; +extern int semarray; /* Input/Output buffer position */ -int mad_decoder_position; -int output_buffer_position; +extern int mad_decoder_position; +extern int output_buffer_position; /* Output Frame including needed information */ typedef struct { unsigned char data[4*1152]; @@ -285,10 +285,10 @@ typedef struct { } decoded_frames; /* Output frame queue pointer */ -output_frame *Output_Queue; +extern output_frame *Output_Queue; /* Shared total decoded frames */ -decoded_frames *Decoded_Frames; +extern decoded_frames *Decoded_Frames; #if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED) /* */ --- mpg321-0.3.2.orig/mpg321.c +++ mpg321-0.3.2/mpg321.c @@ -90,6 +90,7 @@ mad_timer_t current_time; mpg321_options options = { 0, NULL, NULL, 0 , 0, 0}; int status = MPG321_STOPPED; int file_change = 0; +int loop_remaining = 0; int remote_restart = 0; int muted = 0; char *id3_get_tag (struct id3_tag const *tag, char const *what, unsigned int maxlen); @@ -104,6 +105,15 @@ extern http_file_length; /* ALSA Volume Range */ extern long volume_min,volume_max; #endif + +double real[FFT_BUFFER_SIZE]; +double imag[FFT_BUFFER_SIZE]; +int semarray; +int mad_decoder_position; +int output_buffer_position; +output_frame *Output_Queue; +decoded_frames *Decoded_Frames; + /* Get the next frame in the round buffer */ int getnext_place(int position) { --------------6F80CD813FD85C0D17E6CC87--