Skip to content

GCC 10 incompatibility (missing extern for global variables in headers) #136

Closed
@robert-scheck

Description

@robert-scheck

Since Fedora is using GCC 10, building Partclone fails like this:

/usr/bin/ld: partclone.o:/builddir/build/BUILD/partclone-0.3.12/src/partclone.h:83: multiple definition of `rescue_write_size'; info.o:/builddir/build/BUILD/partclone-0.3.12/src/partclone.h:83: first defined here
/usr/bin/ld: partclone.o:/builddir/build/BUILD/partclone-0.3.12/src/partclone.h:82: multiple definition of `EXECNAME'; info.o:/builddir/build/BUILD/partclone-0.3.12/src/partclone.h:82: first defined here
/usr/bin/ld: checksum.o:/builddir/build/BUILD/partclone-0.3.12/src/partclone.h:83: multiple definition of `rescue_write_size'; info.o:/builddir/build/BUILD/partclone-0.3.12/src/partclone.h:83: first defined here
/usr/bin/ld: checksum.o:/builddir/build/BUILD/partclone-0.3.12/src/partclone.h:82: multiple definition of `EXECNAME'; info.o:/builddir/build/BUILD/partclone-0.3.12/src/partclone.h:82: first defined here

and

/usr/bin/ld: partclone_xfs-xfsclone.o:/builddir/build/BUILD/partclone-0.3.12/src/xfsclone.c:27: multiple definition of `prog'; partclone_xfs-main.o:/builddir/build/BUILD/partclone-0.3.12/src/main.c:42: first defined here

https://gcc.gnu.org/gcc-10/porting_to.html describes how these mistakes in C code can be fixed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions