• Bug#1066115: mpg123: FTBFS: error: implicit declaration of function =?U

    From Sebastian Ramacher@21:1/5 to All on Tue Mar 12 21:30:01 2024
    Source: mpg321
    Version: 0.3.2-3.1
    Severity: serious
    Tags: ftbfs
    Justification: fails to build from source (but built successfully in the past) X-Debbugs-Cc: sramacher@debian.org

    https://buildd.debian.org/status/fetch.php?pkg=mpg321&arch=armel&ver=0.3.2-3.1%2Bb1&stamp=1710256758&raw=0

    gcc -DHAVE_CONFIG_H -I. -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -Wall -Wunused -Wno-error=format-security -fcommon -I/usr/
    include -DHAVE_ALSA -MT mpg321.o -MD -MP -MF .deps/mpg321.Tpo -c -o mpg321.o mpg321.c
    mpg321.c:102:8: warning: type defaults to ‘int’ in declaration of ‘http_file_length’ [-Wimplicit-int]
    102 | extern http_file_length;
    | ^~~~~~~~~~~~~~~~
    mpg321.c: In function ‘read_keyb’:
    mpg321.c:132:27: error: implicit declaration of function ‘mpg321_alsa_get_volume’ [-Werror=implicit-function-declaration]
    132 | bvolume = mpg321_alsa_get_volume();
    | ^~~~~~~~~~~~~~~~~~~~~~
    mpg321.c:173:33: error: implicit declaration of function ‘mpg321_alsa_set_volume’ [-Werror=implicit-function-declaration]
    173 | mpg321_alsa_set_volume(bvolume);
    | ^~~~~~~~~~~~~~~~~~~~~~
    mpg321.c:186:75: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘int’ [-Wformat=]
    186 | fprintf(stderr,"Volume: %ld%% \r",volume);
    | ~~^ ~~~~~~
    | | |
    | long int int
    | %d
    mpg321.c:236:75: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘int’ [-Wformat=]
    236 | fprintf(stderr,"Volume: %ld%% \r",volume);
    | ~~^ ~~~~~~
    | | |
    | long int int
    | %d
    mpg321.c: In function ‘show_id3’:
    mpg321.c:450:24: warning: format not a string literal and no format arguments [-Wformat-security]
    450 | printf(emptystring);
    | ^~~~~~~~~~~
    mpg321.c:468:34: warning: format not a string literal and no format arguments [-Wformat-security]
    468 | fprintf (stderr, emptystring);
    | ^~~~~~~~~~~
    mpg321.c: In function ‘main’:
    mpg321.c:688:17: error: implicit declaration of function ‘init_alsa_volume_control’ [-Werror=implicit-function-declaration]
    688 | init_alsa_volume_control("default"); /* For the moment use "default", it works on most of the systems. Tested in Debian,Fedora,Ubuntu,RedHat,CentOS,Gentoo */
    | ^~~~~~~~~~~~~~~~~~~~~~~~
    mpg321.c:882:13: error: implicit declaration of function ‘calc_http_length’; did you mean ‘calc_length’? [-Werror=implicit-function-declaration]
    882 | calc_http_length(&playbuf);
    | ^~~~~~~~~~~~~~~~
    | calc_length
    mpg321.c: In function ‘id3_get_tag’:
    mpg321.c:1237:31: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
    1237 | if (!latin1 || strlen(latin1) == 0) return (NULL);
    | ^~~~~~
    | |
    | id3_latin1_t * {aka unsigned char *}
    In file included from mpg321.c:35:
    /usr/include/string.h:407:35: note: expected ‘const char *’ but argument is of type ‘id3_latin1_t *’ {aka ‘unsigned char *’}
    407 | extern size_t strlen (const char *__s)
    | ~~~~~~~~~~~~^~~
    mpg321.c:1238:22: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
    1238 | len = strlen(latin1);
    | ^~~~~~
    | |
    | id3_latin1_t * {aka unsigned char *} /usr/include/string.h:407:35: note: expected ‘const char *’ but argument is of type ‘id3_latin1_t *’ {aka ‘unsigned char *’}
    407 | extern size_t strlen (const char *__s)
    | ~~~~~~~~~~~~^~~
    mpg321.c:1245:29: warning: pointer targets in passing argument 2 of ‘strncat’ differ in signedness [-Wpointer-sign]
    1245 | strncat (printable, latin1, tocopy);
    | ^~~~~~
    | |
    | id3_latin1_t * {aka unsigned char *} /usr/include/string.h:152:71: note: expected ‘const char * restrict’ but argument is of type ‘id3_latin1_t *’ {aka ‘unsigned char *’}
    152 | extern char *strncat (char *__restrict __dest, const char *__restrict __src,
    | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
    mpg321.c:1263:26: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
    1263 | len = strlen(latin1);
    | ^~~~~~
    | |
    | id3_latin1_t * {aka unsigned char *} /usr/include/string.h:407:35: note: expected ‘const char *’ but argument is of type ‘id3_latin1_t *’ {aka ‘unsigned char *’}
    407 | extern size_t strlen (const char *__s)
    | ~~~~~~~~~~~~^~~
    mpg321.c:1270:33: warning: pointer targets in passing argument 2 of ‘strncat’ differ in signedness [-Wpointer-sign]
    1270 | strncat (printable, latin1, tocopy);
    | ^~~~~~
    | |
    | id3_latin1_t * {aka unsigned char *} /usr/include/string.h:152:71: note: expected ‘const char * restrict’ but argument is of type ‘id3_latin1_t *’ {aka ‘unsigned char *’}
    152 | extern char *strncat (char *__restrict __dest, const char *__restrict __src,
    | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
    mpg321.c:1270:13: warning: ‘strncat’ specified bound depends on the length of the source argument [-Wstringop-overflow=]
    1270 | strncat (printable, latin1, tocopy);
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    mpg321.c:1263:19: note: length computed here
    1263 | len = strlen(latin1);
    | ^~~~~~~~~~~~~~
    mpg321.c:1245:9: warning: ‘strncat’ specified bound depends on the length of the source argument [-Wstringop-overflow=]
    1245 | strncat (printable, latin1, tocopy);
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    mpg321.c:1238:15: note: length computed here
    1238 | len = strlen(latin1);
    | ^~~~~~~~~~~~~~
    mpg321.c: In function ‘main’:
    mpg321.c:1192:16: warning: ‘shm_id’ may be used uninitialized [-Wmaybe-uninitialized]
    1192 | if(shmctl(shm_id,IPC_RMID,NULL))
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    mpg321.c:521:9: note: ‘shm_id’ was declared here
    521 | int shm_id;
    | ^~~~~~
    mpg321.c:1194:16: warning: ‘frames_id’ may be used uninitialized [-Wmaybe-uninitialized]
    1194 | if(shmctl(frames_id,IPC_RMID,NULL))
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    mpg321.c:522:9: note: ‘frames_id’ was declared here
    522 | int frames_id;
    | ^~~~~~~~~
    cc1: some warnings being treated as errors
    make[2]: *** [Makefile:369: mpg321.o] Error 1

    Cheers
    --
    Sebastian Ramacher

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andreas Metzler@21:1/5 to joachim.reichel@posteo.de on Tue Mar 26 13:30:01 2024
    On 2024-03-22 Joachim Reichel <joachim.reichel@posteo.de> wrote:
    tag 1066115 + patch
    thanks

    Hi,

    attached is the debdiff for the NMU, uploaded to delayed/10. Similar to the previous NMU it adds -Wno-error=implicit-function-declaration to downgrade these errors back into warnings again.
    [...]

    That seems to be suboptimal. How about adding the missing declarations
    instead?

    cu Andreas


    --- mpg321-0.3.2.orig/mpg321.h
    +++ mpg321-0.3.2/mpg321.h
    @@ -242,7 +242,7 @@ typedef struct {
    } fft_state;

    typedef short int sound_sample;
    -//void fft_perform(const sound_sample *input, double *output, fft_state *state);
    +void fft_perform(const sound_sample *input, double *output, fft_state *state);

    fft_state *fft_init(void);

    @@ -290,6 +290,14 @@ output_frame *Output_Queue;
    /* Shared total decoded frames */
    decoded_frames *Decoded_Frames;

    +int init_alsa_volume_control(char *name);
    +int calc_http_length(buffer *buf);
    +long mpg321_alsa_get_volume();
    +void mpg321_alsa_set_volume(long value);
    +void do_basicauth();
    +ao_device *open_ao_playdevice_buffer(struct mad_header const *header);
    +int check_default_play_device_buffer();
    +
    #if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)
    /* */
    #else

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Debian Bug Tracking System@21:1/5 to All on Wed Mar 27 16:10:03 2024
    Processing control commands:

    tags 1066115 + pending
    Bug #1066115 [src:mpg321] mpg321: FTBFS: error: implicit declaration of function ‘mpg321_alsa_get_volume’ [-Werror=implicit-function-declaration]
    Added tag(s) pending.

    --
    1066115: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1066115
    Debian Bug Tracking System
    Contact owner@bugs.debian.org with problems

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Debian Bug Tracking System@21:1/5 to All on Thu Mar 28 06:40:01 2024
    This is a multi-part message in MIME format...

    Your message dated Thu, 28 Mar 2024 05:34:37 +0000
    with message-id <E1rpiPN-009UmE-JM@fasolo.debian.org>
    and subject line Bug#1066115: fixed in mpg321 0.3.2-3.3
    has caused the Debian Bug report #1066115,
    regarding mpg321: FTBFS: error: implicit declaration of function ‘mpg321_alsa_get_volume’ [-Werror=implicit-function-declaration]
    to be marked as done.

    This means that you claim that the problem has been dealt with.
    If this is not the case it is now your responsibility to reopen the
    Bug report if necessary, and/or fix the problem forthwith.

    (NB: If you are a system administrator and have no idea what this
    message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@bugs.debian.org
    immediately.)


    --
    1066115: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1066115
    Debian Bug Tracking System
    Contact owner@bugs.debian.org with problems

    Received: (at submit) by bugs.debian.org; 12 Mar 2024 20:25:49 +0000 X-Spam-Checker-Version: SpamAssassin 3.4.6-bugs.debian.org_2005_01_02
    (2021-04-09) on buxtehude.debian.org
    X-Spam-Level:
    X-Spam-Status: No, score=-104.8 required=4.0 tests=BAYES_00,DKIMWL_WL_HIGH,
    DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FOURLA,
    FROMDEVELOPER,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,
    UNPARSEABLE_RELAY,USER_IN_DKIM_WELCOMELIST,USER_IN_DKIM_WHITELIST,
    WORD_WITHOUT_VOWELS autolearn=ham autolearn_force=no
    version=3.4.6-bugs.debian.org_2005_01_02
    X-Spam-Bayes: score:0.0000 Tokens: new, 48; hammy, 150; neutral, 150; spammy,
    0. spammytokens:
    hammytokens:0.000-+--Hx-spam-relays-external:sk:stravin,
    0.000-+--H*RT:sk:stravin, 0.000-+--Hx-spam-relays-external:311,
    0.000-+--H*RT:311, 0.000-+--H*RT:108
    Return-path: <sramacher@debian.org>
    Received: from s