GNU bug report logs - #41726
vala-mitx2 test fails with gcc10

Previous Next

Package: automake;

Reported by: Andreas Radke <andyrtr <at> archlinux.org>

Date: Fri, 5 Jun 2020 19:48:01 UTC

Severity: normal

Done: Karl Berry <karl <at> freefriends.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 41726 in the body.
You can then email your comments to 41726 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-automake <at> gnu.org:
bug#41726; Package automake. (Fri, 05 Jun 2020 19:48:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Radke <andyrtr <at> archlinux.org>:
New bug report received and forwarded. Copy sent to bug-automake <at> gnu.org. (Fri, 05 Jun 2020 19:48:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andreas Radke <andyrtr <at> archlinux.org>
To: bug-automake <at> gnu.org
Subject: vala-mitx2 test fails with gcc10
Date: Fri, 5 Jun 2020 21:18:14 +0200
[Message part 1 (text/plain, inline)]
Building automake 1.16.2/autoconf 2.69 I'm seeing this test failure
here compiling using gcc 10.1.0 for Arch Linux:

This is due to gcc 10 defaults to -fno-common now. See
https://gcc.gnu.org/gcc-10/changes.html

To pass that test one can export CFLAGS="$CFLAGS -fcommon". Test also passes
using clang 10.0.0

FAIL: /vala-mitx2
=================

vala-mix2: running valac --version
Vala 0.48.6
vala-mix2: running pkg-config --version
1.7.3
vala-mix2: determine whether make is GNU make
GNU Make 4.3
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
pkg-config version: 1.7.3
# pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
# serial 11 (pkg-config-0.29.1)

dnl Copyright © 2004 Scott James Remnant <scott <at> netsplit.com>.
dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists <at> gmail.com>
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2 of the License, or
dnl (at your option) any later version.
dnl
dnl This program is distributed in the hope that it will be useful, but
dnl WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
dnl 02111-1307, USA.
Running from installcheck: no
Test Protocol: none
PATH = /build/automake/src/automake-1.16.2/bin:/build/automake/src/automake-1.16.2/t/ax:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
++ pwd
/build/automake/src/automake-1.16.2/t/vala-mix2.dir
+ cat
+ cat
+ cat
+ cat
+ cat
+ cat
+ cat
+ cat
+ aclocal-1.16 -Werror
+ automake-1.16 --foreign -Werror -Wall -a
+ autoconf
+ ./configure --enable-dependency-tracking
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking whether cc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of cc... gcc3
checking whether we are using the GNU C++ compiler... yes
checking whether c++ accepts -g... yes
checking dependency style of c++... gcc3
checking for valac... /usr/bin/valac
checking whether /usr/bin/valac is at least version 0.7.3... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for GOBJECT... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: executing depfiles commands
+ make all
rm -f zardoz_vala.stamp && echo stamp > zardoz_vala.stamp-t
CDPATH="${ZSH_VERSION+.}:" && cd . && /usr/bin/valac   -C zardoz.vala
mv -f zardoz_vala.stamp-t zardoz_vala.stamp
cc -DPACKAGE_NAME=\"vala-mix2\" -DPACKAGE_TARNAME=\"vala-mix2\" -DPACKAGE_VERSION=\"1.0\" -DPACKAGE_STRING=\"vala-mix2\ 1.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"vala-mix2\" -DVERSION=\"1.0\" -I.   -D_FORTIFY_SOURCE=2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -MT zardoz.o -MD -MP -MF .deps/zardoz.Tpo -c -o zardoz.o zardoz.c
mv -f .deps/zardoz.Tpo .deps/zardoz.Po
cc -DPACKAGE_NAME=\"vala-mix2\" -DPACKAGE_TARNAME=\"vala-mix2\" -DPACKAGE_VERSION=\"1.0\" -DPACKAGE_STRING=\"vala-mix2\ 1.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"vala-mix2\" -DVERSION=\"1.0\" -I.   -D_FORTIFY_SOURCE=2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -MT bar.o -MD -MP -MF .deps/bar.Tpo -c -o bar.o bar.c
mv -f .deps/bar.Tpo .deps/bar.Po
cc -DPACKAGE_NAME=\"vala-mix2\" -DPACKAGE_TARNAME=\"vala-mix2\" -DPACKAGE_VERSION=\"1.0\" -DPACKAGE_STRING=\"vala-mix2\ 1.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"vala-mix2\" -DVERSION=\"1.0\" -I.   -D_FORTIFY_SOURCE=2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -MT baz.o -MD -MP -MF .deps/baz.Tpo -c -o baz.o baz.c
baz.c:2:12: warning: ‘foo’ initialized and declared ‘extern’
    2 | extern int foo = 0;
      |            ^~~
mv -f .deps/baz.Tpo .deps/baz.Po
c++ -DPACKAGE_NAME=\"vala-mix2\" -DPACKAGE_TARNAME=\"vala-mix2\" -DPACKAGE_VERSION=\"1.0\" -DPACKAGE_STRING=\"vala-mix2\ 1.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"vala-mix2\" -DVERSION=\"1.0\" -I.   -D_FORTIFY_SOURCE=2  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -MT master.o -MD -MP -MF .deps/master.Tpo -c -o master.o master.cxx
mv -f .deps/master.Tpo .deps/master.Po
c++  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt  -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -o zardoz zardoz.o bar.o baz.o master.o -lgobject-2.0 -lglib-2.0  
/usr/bin/ld: baz.o:(.bss+0x0): multiple definition of `foo'; bar.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:383: zardoz] Error 1
+ am_exit_trap 2
+ exit_status=2
+ set +e
+ cd /build/automake/src/automake-1.16.2
+ test none = tap
+ case $am_explicit_skips in
+ test 2 -eq 0
+ keep_testdirs=yes
+ am_keeping_testdirs
+ case $keep_testdirs in
+ return 0
+ set +x
FAIL t/vala-mix2.sh (exit status: 2)


- Andy
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to bug-automake <at> gnu.org:
bug#41726; Package automake. (Sat, 06 Jun 2020 15:53:02 GMT) Full text and rfc822 format available.

Message #8 received at 41726 <at> debbugs.gnu.org (full text, mbox):

From: Karl Berry <karl <at> freefriends.org>
To: andyrtr <at> archlinux.org
Cc: 41726 <at> debbugs.gnu.org
Subject: Re: bug#41726: vala-mitx2 test fails with gcc10
Date: Sat, 6 Jun 2020 09:52:02 -0600
Hi Andy - thanks for the report.

    /usr/bin/ld: baz.o:(.bss+0x0): multiple definition of `foo';
    bar.o:(.bss+0x0): first defined here

Looking at the sources in that test, it seems that the extern and the
initialization were mixed up. I don't have either vala or gcc10 readily
at hand. Would you be able to try this change, please?

To run just this one test, I think this incantation should do it (from
the top-level automake source directory, where you unpacked the tarball):
  make check TESTS=t/vala-mix2.sh

Thanks again,
Karl


diff --git a/t/vala-mix2.sh b/t/vala-mix2.sh
index 8e6a214..933a3ff 100644
--- a/t/vala-mix2.sh
+++ b/t/vala-mix2.sh
@@ -44,7 +44,7 @@ int main ()
 END
 
 cat > foo.h <<'END'
-int foo;
+extern int foo;
 int bar (void);
 int baz (void);
 END
@@ -56,7 +56,7 @@ END
 
 cat > baz.c <<'END'
 #include "foo.h"
-extern int foo = 0;
+int foo = 0;
 int baz (void) { return 0; }
 END
 




Information forwarded to bug-automake <at> gnu.org:
bug#41726; Package automake. (Sat, 06 Jun 2020 20:12:02 GMT) Full text and rfc822 format available.

Message #11 received at 41726 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Radke <andyrtr <at> archlinux.org>
To: Karl Berry <karl <at> freefriends.org>
Cc: 41726 <at> debbugs.gnu.org
Subject: Re: bug#41726: vala-mitx2 test fails with gcc10
Date: Sat, 6 Jun 2020 22:11:10 +0200
[Message part 1 (text/plain, inline)]
Am Sat, 6 Jun 2020 09:52:02 -0600
schrieb Karl Berry <karl <at> freefriends.org>:

> Hi Andy - thanks for the report.
> 
>     /usr/bin/ld: baz.o:(.bss+0x0): multiple definition of `foo';
>     bar.o:(.bss+0x0): first defined here
> 
> Looking at the sources in that test, it seems that the extern and the
> initialization were mixed up. I don't have either vala or gcc10
> readily at hand. Would you be able to try this change, please?
> 
> To run just this one test, I think this incantation should do it (from
> the top-level automake source directory, where you unpacked the
> tarball): make check TESTS=t/vala-mix2.sh
> 
> Thanks again,
> Karl
> 
> 
> diff --git a/t/vala-mix2.sh b/t/vala-mix2.sh
> index 8e6a214..933a3ff 100644
> --- a/t/vala-mix2.sh
> +++ b/t/vala-mix2.sh
> @@ -44,7 +44,7 @@ int main ()
>  END
>  
>  cat > foo.h <<'END'
> -int foo;
> +extern int foo;
>  int bar (void);
>  int baz (void);
>  END
> @@ -56,7 +56,7 @@ END
>  
>  cat > baz.c <<'END'
>  #include "foo.h"
> -extern int foo = 0;
> +int foo = 0;
>  int baz (void) { return 0; }
>  END
>  

Thanks, with your patch applied I can remove the gcc workaround and the
test is still passing. Thank you for the quick fix.

-Andy
Arch Linux
[Message part 2 (application/pgp-signature, inline)]

Reply sent to Karl Berry <karl <at> freefriends.org>:
You have taken responsibility. (Sat, 06 Jun 2020 22:49:03 GMT) Full text and rfc822 format available.

Notification sent to Andreas Radke <andyrtr <at> archlinux.org>:
bug acknowledged by developer. (Sat, 06 Jun 2020 22:49:03 GMT) Full text and rfc822 format available.

Message #16 received at 41726-done <at> debbugs.gnu.org (full text, mbox):

From: Karl Berry <karl <at> freefriends.org>
To: 41726-done <at> debbugs.gnu.org
Date: Sat, 6 Jun 2020 16:48:39 -0600



bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 05 Jul 2020 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 296 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.