Announcement

Collapse
No announcement yet.

GCC 10 wreaking havoc on test compilations

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • GCC 10 wreaking havoc on test compilations

    Hi,

    There's a significant number of tests which don't compile anymore on Linux distros that upgraded to GCC/G++ 10 (Fedora 32 for example). The main culprit is the -fno-common that is now active by default, triggering many "multiple definitions of [something]" errors.
    I managed to work around it by adding various environment variables or changing the test script to specify "-fcommon".

    Unfortunately, I didn't write them down at the time I tested. I'll add them to this thread if I encounter them again (it's likely).
    I think pts/fio and pts/compress-7zip were failing, the first one because of -fno-common, and the second one for another reason, I had to use -w to make it happy.
    But basically try to install the suites of tests on Fedora 32 and it'll be plain as day.

  • #2
    Thanks, been working through some test profile updates. If you encounter a list of any others that are failing it would be helpful.
    Michael Larabel
    http://www.michaellarabel.com/

    Comment


    • #3
      I see that you've updated a bunch of tests. Thanks!
      I'll let you know if I encounter any more.

      Comment


      • #4
        pts/mysqlslap is also suffering from this problem:
        Code:
        mysqlslap-1.0.8/mariadb-10.3.8/extra/mariabackup/xbstream.c:48: multiple definition of `datasink_buffer'; CMakeFiles/mbstream.dir/ds_buffer.c.o:(.data.rel.local+0x0): first defined here
        collect2: error: ld returned 1 exit status
        And I don't know if this is related to GCC 10, but pts/compress-7zip fails with the following output on installation:
        Code:
        In file included from ../../../../CPP/Common/Common.h:8,
        from ../../../../CPP/myWindows/StdAfx.h:17,
        from ../../../../CPP/Windows/ErrorMsg.cpp:3:
        ../../../../CPP/Windows/ErrorMsg.cpp: In function ‘UString NWindows::NError::MyFormatMessage(DWORD)’:
        ../../../../CPP/Common/MyWindows.h:83:40: error: narrowing conversion of ‘-2147467263’ from ‘LONG’ {aka ‘int’} to ‘unsigned int’ [-Wnarrowing]
        83 | #define E_NOTIMPL ((HRESULT)0x80004001L)
        | ^
        ../../../../CPP/Windows/ErrorMsg.cpp:18:10: note: in expansion of macro ‘E_NOTIMPL’
        18 | case E_NOTIMPL : txt = "E_NOTIMPL"; break ;
        | ^~~~~~~~~
        ../../../../CPP/Common/MyWindows.h:84:44: error: narrowing conversion of ‘-2147467262’ from ‘LONG’ {aka ‘int’} to ‘unsigned int’ [-Wnarrowing]
        84 | #define E_NOINTERFACE ((HRESULT)0x80004002L)
        | ^
        ../../../../CPP/Windows/ErrorMsg.cpp:19:10: note: in expansion of macro ‘E_NOINTERFACE’
        19 | case E_NOINTERFACE : txt = "E_NOINTERFACE"; break ;
        | ^~~~~~~~~~~~~
        ../../../../CPP/Common/MyWindows.h:85:38: error: narrowing conversion of ‘-2147467260’ from ‘LONG’ {aka ‘int’} to ‘unsigned int’ [-Wnarrowing]
        85 | #define E_ABORT ((HRESULT)0x80004004L)
        | ^
        ../../../../CPP/Windows/ErrorMsg.cpp:20:10: note: in expansion of macro ‘E_ABORT’
        20 | case E_ABORT : txt = "E_ABORT"; break ;
        | ^~~~~~~
        ../../../../CPP/Common/MyWindows.h:86:37: error: narrowing conversion of ‘-2147467259’ from ‘LONG’ {aka ‘int’} to ‘unsigned int’ [-Wnarrowing]
        86 | #define E_FAIL ((HRESULT)0x80004005L)
        | ^
        ../../../../CPP/Windows/ErrorMsg.cpp:21:10: note: in expansion of macro ‘E_FAIL’
        21 | case E_FAIL : txt = "E_FAIL"; break ;
        | ^~~~~~
        ../../../../CPP/Common/MyWindows.h:87:52: error: narrowing conversion of ‘-2147287039’ from ‘LONG’ {aka ‘int’} to ‘unsigned int’ [-Wnarrowing]
        87 | #define STG_E_INVALIDFUNCTION ((HRESULT)0x80030001L)
        | ^
        ../../../../CPP/Windows/ErrorMsg.cpp:22:10: note: in expansion of macro ‘STG_E_INVALIDFUNCTION’
        22 | case STG_E_INVALIDFUNCTION : txt = "STG_E_INVALIDFUNCTION"; break ;
        | ^~~~~~~~~~~~~~~~~~~~~
        ../../../../CPP/Common/MyWindows.h:88:44: error: narrowing conversion of ‘-2147024882’ from ‘LONG’ {aka ‘int’} to ‘unsigned int’ [-Wnarrowing]
        88 | #define E_OUTOFMEMORY ((HRESULT)0x8007000EL)
        | ^
        ../../../../CPP/Windows/ErrorMsg.cpp:23:10: note: in expansion of macro ‘E_OUTOFMEMORY’
        23 | case E_OUTOFMEMORY : txt = "E_OUTOFMEMORY"; break ;
        | ^~~~~~~~~~~~~
        ../../../../CPP/Common/MyWindows.h:89:43: error: narrowing conversion of ‘-2147024809’ from ‘LONG’ {aka ‘int’} to ‘unsigned int’ [-Wnarrowing]
        89 | #define E_INVALIDARG ((HRESULT)0x80070057L)
        | ^
        ../../../../CPP/Windows/ErrorMsg.cpp:24:10: note: in expansion of macro ‘E_INVALIDARG’
        24 | case E_INVALIDARG : txt = "E_INVALIDARG"; break ;
        | ^~~~~~~~~~~~
        make[1]: *** [makefile.list:652: ErrorMsg.o] Error 1
        A quick & dirty workaround (but with no downside afaik) is to set the environment variable CC_EXE to -w:
        Code:
        export CC_EXE=-w
        Last edited by dismuter; 04-27-2020, 07:25 PM.

        Comment


        • #5
          I'm transposing all the ongoing issues I found to GitHub issues
          Edit: done, you may delete this thread
          Last edited by dismuter; 05-02-2020, 02:33 PM.

          Comment

          Working...
          X