Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.rc > #283632 > unrolled thread

Bug#966813: e2fsprogs: FTBFS with GCC 10: multiple definition of ... due to -fno-common

Started byAndreas Beckmann <anbe@debian.org>
First post2020-08-02 19:30 +0200
Last post2020-08-02 23:00 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.debian.bugs.rc


Contents

  Bug#966813: e2fsprogs: FTBFS with GCC 10: multiple definition of ... due to -fno-common Andreas Beckmann <anbe@debian.org> - 2020-08-02 19:30 +0200
    Bug#966813: e2fsprogs: FTBFS with GCC 10: multiple definition of ... due to -fno-common tytso@mit.edu - 2020-08-02 23:00 +0200

#283632 — Bug#966813: e2fsprogs: FTBFS with GCC 10: multiple definition of ... due to -fno-common

FromAndreas Beckmann <anbe@debian.org>
Date2020-08-02 19:30 +0200
SubjectBug#966813: e2fsprogs: FTBFS with GCC 10: multiple definition of ... due to -fno-common
Message-ID<AzpY6-lf-1@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

Source: e2fsprogs
Version: 1.46~WIP.2019.10.03-1
Severity: serious
Tags: ftbfs
Justification: fails to build from source (but built successfully in the past)
User: debian-gcc@lists.debian.org
Usertags: ftbfs-gcc-10

Hi,

e2fsprogs/experimental started to FTBFS when GCC 10 was made the default compiler:

gcc -o tst_libext2fs  -Wl,-z,relro -Wl,-z,now -Wl,-rpath-link,../../lib -DDEBUG debug_cmds.o extent_cmds.o tst_cmds.o debugfs.o util.o ncheck.o icheck.o ls.o lsdel.o dump.o set_fields.o logdump.o htree.o unused.o e2freefrag.o filefrag.o extent_inode.o zap.o xattrs.o quota.o tst_libext2fs.o create_inode.o journal.o revoke.o recovery.o do_journal.o \
        ../../lib/libss.a -ldl ../../lib/libe2p.a  ../../lib/libsupport.a \
        ../../lib/libext2fs.a -lblkid  -luuid  -ldl \
        ../../lib/libcom_err.a -lpthread  -I ../../../../debugfs
/usr/bin/ld: tst_libext2fs.o:./debian/BUILD-STD/lib/ext2fs/../../../../lib/ext2fs/tst_libext2fs.c:33: multiple definition of `extra_cmds'; debugfs.o:./debian/BUILD-STD/lib/ext2fs/../../../../debugfs/debugfs.c:51: first defined here
/usr/bin/ld: tst_libext2fs.o:./debian/BUILD-STD/lib/ext2fs/../../../../lib/ext2fs/tst_libext2fs.c:31: multiple definition of `debug_prog_name'; debugfs.o:./debian/BUILD-STD/lib/ext2fs/../../../../debugfs/debugfs.c:52: first defined here
collect2: error: ld returned 1 exit status

More information about the corresponding GCC change can be found here:
https://gcc.gnu.org/gcc-10/porting_to.html
"Default to -fno-common"


Andreas

[toc] | [next] | [standalone]


#283647

Fromtytso@mit.edu
Date2020-08-02 23:00 +0200
Message-ID<Aztfj-2cm-1@gated-at.bofh.it>
In reply to#283632
On Sun, Aug 02, 2020 at 07:23:35PM +0200, Andreas Beckmann wrote:
> 
> e2fsprogs/experimental started to FTBFS when GCC 10 was made the default compiler:
>

Thanks for the bug report.  This is fixed in e2fsprogs 1.45.6-1 by:

commit 336c440ccea8f94b0728f881cddee84f730e7cc7
Author: Lukas Czerner <lczerner@redhat.com>
Date:   Mon Feb 10 16:24:59 2020 +0100

    tst_libext2fs: Avoid multiple definition of global variables
    
    gcc version 10 changed the default from -fcommon to -fno-common and as a
    result e2fsprogs make check tests fail because tst_libext2fs.c end up
    with a build error.
    
    This is because it defines two global variables debug_prog_name and
    extra_cmds that are already defined in debugfs/debugfs.c. With -fcommon
    linker was able to resolve those into the same object, however with
    -fno-common it's no longer able to do it and we end up with multiple
    definition errors.
    
    Fix the problem by using SKIP_GLOBDEFS macro to skip the variables
    definition in debugfs.c. Note that debug_prog_name is also defined in
    lib/ext2fs/extent.c when DEBUG macro is used, but this does not work even
    with older gcc versions and is never used regardless so I am not going to
    bother with it.
    
    Signed-off-by: Lukas Czerner <lczerner@redhat.com>
    Reviewed-by: Eric Sandeen <sandeen@redhat.com>
    Signed-off-by: Theodore Ts'o <tytso@mit.edu>

It's just that the e2fsprogs/experimental hasn't been updated in a while.

The next time the e2fsprogs/experimental gets updated with a new test
version, this will no longer be a problem.

Cheers,

							- Ted

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.bugs.rc


csiph-web