Bug#1066486: icom: FTBFS: icom.c:108:24: error: implicit declaration of function ‘getopt’ [-Werror=implicit-function-declaration]
Source: icom
Version: 20120228-4
Severity: serious
Justification: FTBFS
Tags: trixie sid ftbfs
User: lucas@debian.org
Usertags: ftbfs-20240313 ftbfs-trixie ftbfs-impfuncdef
Hi,
During a rebuild of all packages in sid, your package failed to build
on amd64.
This is most likely caused by a change in dpkg 1.22.6, that enabled
-Werror=implicit-function-declaration. For more information, see
https://wiki.debian.org/qa.debian.org/FTBFS#A2024-03-13_-Werror.3Dimplicit-function-declaration
Relevant part (hopefully):
> gcc -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -g -O -I../include -Wdate-time -D_FORTIFY_SOURCE=2 -c -o tables.o tables.c
> packet.c: In function ‘sndoctet’:
> packet.c:339:9: warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
> 339 | write(fd_icom, &x, 1);
> | ^~~~~~~~~~~~~~~~~~~~~
> icom.c: In function ‘main’:
> icom.c:108:24: error: implicit declaration of function ‘getopt’ [-Werror=implicit-function-declaration]
> 108 | while ((temp = getopt(argc, argcv, "c:df:g:km:o:r:")) != -1) {
> | ^~~~~~
> icom.c:314:32: error: implicit declaration of function ‘command’ [-Werror=implicit-function-declaration]
> 314 | temp = command(rptr, key);
> | ^~~~~~~
> icom.c:326:41: error: implicit declaration of function ‘close’; did you mean ‘pclose’? [-Werror=implicit-function-declaration]
> 326 | close(fp_cmd[fp]);
> | ^~~~~
> | pclose
> icom.c:335:37: error: implicit declaration of function ‘gets’; did you mean ‘fgets’? [-Werror=implicit-function-declaration]
> 335 | if (gets(args) == NULL)
> | ^~~~
> | fgets
> icom.c:335:48: warning: comparison between pointer and integer
> 335 | if (gets(args) == NULL)
> | ^~
> icom.c: In function ‘qqsv’:
> icom.c:628:17: error: implicit declaration of function ‘gettimeofday’ [-Werror=implicit-function-declaration]
> 628 | gettimeofday(&tv, NULL);
> | ^~~~~~~~~~~~
> radio.c: In function ‘select_radio’:
> radio.c:168:17: error: implicit declaration of function ‘capkey’ [-Werror=implicit-function-declaration]
> 168 | temp1 = capkey("lsb", rp->modetab);
> | ^~~~~~
> icom.c:637:33: error: implicit declaration of function ‘dtohex’ [-Werror=implicit-function-declaration]
> 637 | dtohex(tm->tm_year + 1900,
> | ^~~~~~
> radio.c: In function ‘readchan’:
> radio.c:329:17: error: implicit declaration of function ‘readvfo’ [-Werror=implicit-function-declaration]
> 329 | return (readvfo(rp));
> | ^~~~~~~
> icom.c:886:25: error: implicit declaration of function ‘emptyvfo’ [-Werror=implicit-function-declaration]
> 886 | emptyvfo(cp);
> | ^~~~~~~~
> icom.c:1002:32: error: implicit declaration of function ‘emptychan’; did you mean ‘empty_chan’? [-Werror=implicit-function-declaration]
> 1002 | rval = emptychan(rp->ident, cp);
> | ^~~~~~~~~
> | empty_chan
> icom.c:1171:33: error: implicit declaration of function ‘readvfo’ [-Werror=implicit-function-declaration]
> 1171 | readvfo(rp);
> | ^~~~~~~
> icom.c:1247:32: error: implicit declaration of function ‘readoffset’; did you mean ‘loadoffset’? [-Werror=implicit-function-declaration]
> 1247 | rval = readoffset(rp->ident, &freq);
> | ^~~~~~~~~~
> | loadoffset
> icom.c:1627:17: error: implicit declaration of function ‘doublefreq’ [-Werror=implicit-function-declaration]
> 1627 | doublefreq(dtemp * 10, s1, 2);
> | ^~~~~~~~~~
> cc1: some warnings being treated as errors
> make[1]: *** [<builtin>: radio.o] Error 1
The full build log is available from:
http://qa-logs.debian.net/2024/03/13/icom_20120228-4_unstable.log
All bugs filed during this archive rebuild are listed at:
https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20240313;users=lucas@debian.org
or:
https://udd.debian.org/bugs/?release=na&merged=ign&fnewerval=7&flastmodval=7&fusertag=only&fusertagtag=ftbfs-20240313&fusertaguser=lucas@debian.org&allbugs=1&cseverity=1&ctags=1&caffected=1#results
A list of current common problems and possible solutions is available at
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!
If you reassign this bug to another package, please mark it as 'affects'-ing
this package. See https://www.debian.org/Bugs/server-control#affects
If you fail to reproduce this, please provide a build log and diff it with mine
so that we can identify if something relevant changed in the meantime.
Reply to: