Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 706234 - =media-libs/mesa-19.3.2 fails to build with -fno-common or gcc-10
Summary: =media-libs/mesa-19.3.2 fails to build with -fno-common or gcc-10
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
: 726884 (view as bug list)
Depends on:
Blocks: -fno-common
  Show dependency tree
Reported: 2020-01-24 10:32 UTC by David Seifert
Modified: 2020-06-03 10:15 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---

build.log.bz2 (build.log.bz2,43.82 KB, application/x-bzip)
2020-01-24 10:35 UTC, David Seifert
mesa-gcc10.patch (mesa-gcc10.patch,578 bytes, patch)
2020-01-24 10:43 UTC, David Seifert
Details | Diff
19.2.8-build.log.xz (build.log.xz,30.84 KB, application/x-xz)
2020-01-29 03:46 UTC, Brian Evans

Note You need to log in before you can comment on or make changes to this bug.
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

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

This patch fixes it for me.
Comment 3 Brian Evans Gentoo Infrastructure gentoo-dev 2020-01-29 03:46:58 UTC
Created attachment 607306 [details]

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. ***