Menu

#171 dump fails with -fno-common

None
accepted
None
5
2021-01-01
2020-01-16
No

Hello,

Starting from the upcoming GCC release 10, the default of -fcommon option will change to -fno-common:

In C, global variables with multiple tentative definitions will result in linker errors. Global variable accesses are also more efficient on various targets.

The latest dump fails to build with -fno-common option. I'm attaching a build log.

Thanks for fixing it.

Best regards,
Kristyna Streitova

Discussion

  • Mike Frysinger

    Mike Frysinger - 2021-01-01

    looks like you forgot to actually attach the log ;). it seems this came from:
    https://bugzilla.opensuse.org/1160263

    but the log there also shows the build passing.

    forcing a local build with -fno-common shows many linktime errors like:
    ld: ../common/.libs/libcommon.a(transformation_bzlib.o):.../dump/common/../compat/include/protocols/dumprestore.h:84: multiple definition of 'u_data'; itime.o:.../dump/../compat/include/protocols/dumprestore.h:84: first defined here

     
  • Mike Frysinger

    Mike Frysinger - 2021-01-01

    the codebase is a mess and not worth my time to untangle, so i just added -fcommon to the configure script's CFLAGS

    i'll leave this open in case someone someday feels like cleaning up this pile

     
  • Mike Frysinger

    Mike Frysinger - 2021-01-01
    • status: open --> accepted
    • Group: -->
     

Log in to post a comment.