Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 706234

Summary: =media-libs/mesa-19.3.2 fails to build with -fno-common or gcc-10
Product: Gentoo Linux Reporter: David Seifert <soap>
Component: Current packagesAssignee: Gentoo X packagers <x11>
Status: RESOLVED FIXED    
Severity: normal CC: candrews, grknight, tschweikle
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 705764    
Attachments: build.log.bz2
mesa-gcc10.patch
19.2.8-build.log.xz

Description David Seifert gentoo-dev 2020-01-24 10:32:18 UTC
Simple reproducer on older gcc is to add -fno-common:

# MAKEOPTS=-j1 LANG=C FEATURES='-strict -stricter -fail-clean -test' CFLAGS="$(portageq envvar CFLAGS) -fno-common" USE=-test emerge -v1 cpio

/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/gallium/auxiliary/pipe-loader/libpipe_loader_static.a(pipe_loader_drm.c.o):(.bss+0x4): multiple definition of `v3d_driconf_xml'; src/gallium/targets/dri/8381c20@@gallium_dri@sha/target.c.o:(.bss+0x4): first defined here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/gallium/auxiliary/pipe-loader/libpipe_loader_static.a(pipe_loader_drm.c.o):(.bss+0xc): multiple definition of `iris_driconf_xml'; src/gallium/targets/dri/8381c20@@gallium_dri@sha/target.c.o:(.bss+0xc): first defined here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/gallium/auxiliary/pipe-loader/libpipe_loader_static.a(pipe_loader_drm.c.o):(.bss+0x8): multiple definition of `radeonsi_driconf_xml'; src/gallium/targets/dri/8381c20@@gallium_dri@sha/target.c.o:(.bss+0x8): first defined here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: src/gallium/auxiliary/pipe-loader/libpipe_loader_static.a(pipe_loader_drm.c.o):(.bss+0x0): multiple definition of `virgl_driconf_xml'; src/gallium/targets/dri/8381c20@@gallium_dri@sha/target.c.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status

More details are at https://wiki.gentoo.org/wiki/Gcc_10_porting_notes/fno_common

Reproducible: Always
Comment 1 David Seifert gentoo-dev 2020-01-24 10:35:40 UTC
Created attachment 604126 [details]
build.log.bz2
Comment 2 David Seifert gentoo-dev 2020-01-24 10:43:41 UTC
Created attachment 604128 [details, diff]
mesa-gcc10.patch

This patch fixes it for me.
Comment 3 Brian Evans (RETIRED) gentoo-dev 2020-01-29 03:46:58 UTC
Created attachment 607306 [details]
19.2.8-build.log.xz

This also fails with amdgpu and vulkan on 19.2.8:

ld: src/amd/vulkan/9198681@@vulkan_radeon@sha/meson-generated_.._radv_extensions.c.o:(.bss+0x0): multiple definition of `syncobj_handle'; src/amd/vulkan/9198681@@vulkan_radeon@sha/meson-generated_.._radv_entrypoints.c.o:(.bss+0x0): first defined here
ld: src/amd/vulkan/9198681@@vulkan_radeon@sha/winsys_amdgpu_radv_amdgpu_bo.c.o:(.bss+0x0): multiple definition of `syncobj_handle'; src/amd/vulkan/9198681@@vulkan_radeon@sha/meson-generated_.._radv_entrypoints.c.o:(.bss+0x0): first defined here
Comment 4 Matt Turner gentoo-dev 2020-03-19 21:50:17 UTC
Can you confirm that this is fixed in 20.0.2?
Comment 5 Craig Andrews gentoo-dev 2020-03-20 00:03:59 UTC
I can confirm that this is fixed.
-fno-common works for media-libs/mesa-20.0.2
Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2020-06-03 10:15:18 UTC
*** Bug 726884 has been marked as a duplicate of this bug. ***