[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ax25mail-utils is marked for autoremoval from testing




Hello Christoph,

I got the below feedback from Marin who is of my main Linpac contributors.  I was guessing and he confirmed that this might be a GCC issue giving a false error here.  What can be done to disable this issue from the packaging system?

--David



-------- Forwarded Message --------
Subject: Re: Bug#957029: ax25mail-utils: ftbfs with GCC-10
Date: Sun, 3 Jan 2021 15:01:29 -0800
From: Martin Cooper <kd6yam@amsat.org>
To: David Ranch <dranch@trinnet.net>


Hi David,

This looks like a compiler bug to me. These are *not* shared variables, but the compiler is complaining because it thinks they are intended to be. It should not be thinking that, because they are *not* defined in any header file, so there is no missing 'extern', which is what the compiler thinks is happening.

What is really happening is that each of these .c files includes *its own* global (to that file) variable named 'mycall' (or 'bbscall') for use *within that file*. There is no intent for these variables to be shared across files, and in fact all hell would break loose if they were. The "problem", which should not be a problem, is that several files happen to have declared global variables with the same name.

There is nothing wrong with the code. These global variables should not be visible outside of their individual compilation units. Nobody said they are supposed to be shared, they don't show up in any header files, and they are not intended to be externed from one file and reused in others. The compiler should not even be looking into another compilation unit unless a common declaration was made, which it was not.

Martin.

On Sun, Jan 3, 2021 at 9:50 AM David Ranch <dranch@trinnet.net> wrote:

Hey Martin,

Happy New year!  I hope that the holidays have been good for you and your family.

For my holiday break, I've been working on replacing my old Centos6 based laptop and moving over to a Ubuntu 20.04 OS install.  As part of that huge change, I've been working on packaging everything for deb packages.  As part of this exercise, I've been finding various gaps in the Debian packaging universe first around ax25spyd (should be resolved) and now it seems ax25-mail-utils.  One of the Debian packagers forwarded this notification on to me about a new GCC-10 change coming in Debian experimental (aka SID)  that makes new errors show up.  If you look at the packaging log URL below, the log says:

--
gcc -g -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security  -Wl,-z,relro -o axgetlist axgetlist.o auth.o calls.o common.o conbbs.o  
/usr/bin/ld: conbbs.o:./axgetlist/conbbs.c:37: multiple definition of `mycall'; axgetlist.o:./axgetlist/axgetlist.c:45: first defined here
/usr/bin/ld: conbbs.o:./axgetlist/conbbs.c:38: multiple definition of `bbscall'; axgetlist.o:./axgetlist/axgetlist.c:46: first defined here
--

Looking at the develop branch, it seems these variables *ARE* created in multiple places.  I'm also note sure what's up with the difference sizes.  Do you know what might be the best approach to resolve this?  Maybe this variable needs to move into a global .h file and various includes added in each of this five .c files?


ax25mail-utils$ grep -r "char mycall" *
axgetlist/axgetlist.c:char mycall[32];
axgetlist/conbbs.c:char mycall[20];            /* my callsign */
axgetmail/axgetmsg.c:char mycall[20];            /* my callsign */
axgetmail/conbbs.c:char mycall[20];            /* my callsign */
ulistd/ulistd.c:char mycall[20];             /* my callsign */


$ grep -r "char bbscall" *
axgetlist/axgetlist.c:char bbscall[32];
axgetlist/conbbs.c:char bbscall[20];           /* BBS callsign */
axgetmail/axgetmsg.c:char bbscall[20];           /* BBS callsign */
axgetmail/axgetmail.c:char bbscall[256];          /* BBS callsign (from cmdline) */
axgetmail/conbbs.c:char bbscall[20];           /* BBS callsign */


Thoughts?

--David



-------- Forwarded Message --------
Subject: Bug#957029: ax25mail-utils: ftbfs with GCC-10
Resent-Date: Fri, 17 Apr 2020 10:59:30 +0000
Resent-From: Matthias Klose <doko@debian.org>
Resent-To: Debian Hamradio Maintainers <debian-hams@lists.debian.org>
Date: Fri, 17 Apr 2020 10:56:55 +0000
From: Matthias Klose <doko@debian.org>
Reply-To: Matthias Klose <doko@debian.org>, 957029-maintonly@bugs.debian.org
To: maintonly@bugs.debian.org


Package: src:ax25mail-utils
Version: 0.13-1
Severity: normal
Tags: sid bullseye
User: debian-gcc@lists.debian.org
Usertags: ftbfs-gcc-10

Please keep this issue open in the bug tracker for the package it
was filed for.  If a fix in another package is required, please
file a bug for the other package (or clone), and add a block in this
package. Please keep the issue open until the package can be built in
a follow-up test rebuild.

The package fails to build in a test rebuild on at least amd64 with
gcc-10/g++-10, but succeeds to build with gcc-9/g++-9. The
severity of this report will be raised before the bullseye release,
so nothing has to be done for the buster release.

The full build log can be found at:
http://people.debian.org/~doko/logs/gcc10-20200225/ax25mail-utils_0.13-1_unstable_gcc10.log
The last lines of the build log are at the end of this report.

To build with GCC 10, either set CC=gcc-10 CXX=g++-10 explicitly,
or install the gcc, g++, gfortran, ... packages from experimental.

  apt-get -t=experimental install g++ 

Common build failures are new warnings resulting in build failures with
-Werror turned on, or new/dropped symbols in Debian symbols files.
For other C/C++ related build failures see the porting guide at
http://gcc.gnu.org/gcc-10/porting_to.html

[...]
make[3]: Entering directory '/<<PKGBUILDDIR>>/agent'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/<<PKGBUILDDIR>>/agent'
Making all in axgetlist
make[3]: Entering directory '/<<PKGBUILDDIR>>/axgetlist'
gcc -DHAVE_CONFIG_H -I. -I..   -Wdate-time -D_FORTIFY_SOURCE=2 -g -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -c axgetlist.c
In file included from /usr/include/string.h:495,
                 from axgetlist.c:19:
In function ‘strncat’,
    inlined from ‘load_config’ at axgetlist.c:127:42:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:136:10: warning: ‘__builtin___strncat_chk’ output may be truncated copying 1 byte from a string of length 255 [-Wstringop-truncation]
  136 |   return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
    inlined from ‘load_config’ at axgetlist.c:130:47:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ output may be truncated copying 31 bytes from a string of length 255 [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
    inlined from ‘load_config’ at axgetlist.c:131:48:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ output may be truncated copying 31 bytes from a string of length 255 [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
    inlined from ‘load_config’ at axgetlist.c:132:48:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ output may be truncated copying 31 bytes from a string of length 255 [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
    inlined from ‘load_config’ at axgetlist.c:133:49:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ output may be truncated copying 255 bytes from a string of length 255 [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
    inlined from ‘load_config’ at axgetlist.c:134:54:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ output may be truncated copying 255 bytes from a string of length 255 [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
    inlined from ‘load_config’ at axgetlist.c:135:49:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ output may be truncated copying 255 bytes from a string of length 255 [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
    inlined from ‘load_config’ at axgetlist.c:142:47:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ output may be truncated copying 255 bytes from a string of length 255 [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
    inlined from ‘load_config’ at axgetlist.c:143:48:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ output may be truncated copying 15 bytes from a string of length 255 [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc -DHAVE_CONFIG_H -I. -I..   -Wdate-time -D_FORTIFY_SOURCE=2 -g -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -c auth.c
gcc -DHAVE_CONFIG_H -I. -I..   -Wdate-time -D_FORTIFY_SOURCE=2 -g -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -c calls.c
gcc -DHAVE_CONFIG_H -I. -I..   -Wdate-time -D_FORTIFY_SOURCE=2 -g -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -c common.c
gcc -DHAVE_CONFIG_H -I. -I..   -Wdate-time -D_FORTIFY_SOURCE=2 -g -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -c conbbs.c
gcc -g -Wall -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security  -Wl,-z,relro -o axgetlist axgetlist.o auth.o calls.o common.o conbbs.o  
/usr/bin/ld: conbbs.o:./axgetlist/conbbs.c:37: multiple definition of `mycall'; axgetlist.o:./axgetlist/axgetlist.c:45: first defined here
/usr/bin/ld: conbbs.o:./axgetlist/conbbs.c:38: multiple definition of `bbscall'; axgetlist.o:./axgetlist/axgetlist.c:46: first defined here
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:233: axgetlist] Error 1
make[3]: Leaving directory '/<<PKGBUILDDIR>>/axgetlist'
make[2]: *** [Makefile:260: all-recursive] Error 1
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[1]: *** [Makefile:198: all] Error 2
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
dh_auto_build: error: make -j1 returned exit code 2
make: *** [debian/rules:18: build] Error 25
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2



On 01/03/2021 09:53 AM, David Ranch wrote:
Hello Christoph,

I somehow had missed this but indeed, I see the duplicate variables:

ax25mail-utils$ grep -r "char mycall" *
axgetlist/axgetlist.c:char mycall[32];
axgetlist/conbbs.c:char mycall[20];            /* my callsign */
axgetmail/axgetmsg.c:char mycall[20];            /* my callsign */
axgetmail/conbbs.c:char mycall[20];            /* my callsign */
ulistd/ulistd.c:char mycall[20];             /* my callsign */


$ grep -r "char bbscall" *
axgetlist/axgetlist.c:char bbscall[32];
axgetlist/conbbs.c:char bbscall[20];           /* BBS callsign */
axgetmail/axgetmsg.c:char bbscall[20];           /* BBS callsign */
axgetmail/axgetmail.c:char bbscall[256];          /* BBS callsign (from cmdline) */
axgetmail/conbbs.c:char bbscall[20];           /* BBS callsign */


I'll start researching this now.  Do you know when is the Bullseye freeze due?


Ps.  I don't have a system with GCC-10 on it but is LInpac ok or is it also having issues with GCC-10?

--David



On 01/03/2021 05:10 AM, Christoph Berg wrote:
Re: David Ranch
I have built up a working Debian Sid image with GCC 10 and have reproduced
the issue with the "develop" branch of ax25mail-utils. I am working on
getting these issues resolved but how long do I have to get them addressed?
The bullseye freeze is getting closer and ax25mail-utils is currently
out.

Did you manage to find a fix?

Christoph



Reply to: