[MinGW-Users] Build error with mingw-8.0.0 and gcc-11: multiple definition of `__DTOR_LIST__' / `__CTOR_LIST__'

Back to archive index
Sandro Mani manis****@gmail*****
Sat Jan 16 22:06:06 JST 2021


Hi

I'm working on updating the mingw toolchain for Fedora, and am building 
mingw-gcc-11 with mingw-crt-8.0.0. I'm stuck at this error when linking 
libgcc [1]:

/usr/i686-w64-mingw32/bin/ld: _ctors_s.o:libgcc2.c:(.bss+0x0): multiple 
definition of `__DTOR_LIST__'; 
/usr/i686-w64-mingw32/sys-root/mingw/lib/../lib/dllcrt2.o:crtdll.c:(.dtors+0x0): 
first defined here
/usr/i686-w64-mingw32/bin/ld: _ctors_s.o:libgcc2.c:(.bss+0x8): multiple 
definition of `__CTOR_LIST__'; 
/usr/i686-w64-mingw32/sys-root/mingw/lib/../lib/dllcrt2.o:crtdll.c:(.ctors+0x0): 
first defined here

Indeed, I see

mingw-w64-crt/crt/crtdll.c:__attribute__ (( __section__ (".dtors"), 
__used__ , aligned(sizeof(void *)))) const void * __DTOR_LIST__ = (void 
*) -1;
mingw-w64-crt/crt/crtdll.c:__attribute__ (( __section__ (".ctors"), 
__used__ , aligned(sizeof(void *)))) const void * __CTOR_LIST__ = (void 
*) -1;

and

libgcc/libgcc2.c:func_ptr __DTOR_LIST__[2] = {0, 0};
libgcc/libgcc2.c:func_ptr __CTOR_LIST__[2] = {0, 0};

Any hints are appreciated!

Many thanks
Sandro

[1] 
https://download.copr.fedorainfracloud.org/results/smani/F34-mingw-toolchain-update/fedora-rawhide-x86_64/01881672-mingw-gcc/builder-live.log.gz



More information about the MinGW-Users mailing list
Back to archive index