[Bug 53109] New: egl_gallium fails to link if both r600 and radeonsi are enabled

2012-08-03 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=53109

 Bug #: 53109
   Summary: egl_gallium fails to link if both r600 and radeonsi
are enabled
Classification: Unclassified
   Product: Mesa
   Version: git
  Platform: Other
OS/Version: All
Status: NEW
  Severity: normal
  Priority: medium
 Component: Drivers/DRI/Radeon
AssignedTo: dri-devel at lists.freedesktop.org
ReportedBy: freedesktop at blino.org


When both r600 and radeonsi gallium drivers are enabled, egl_gallium fails to
link because of duplicate symbols in r600 and radeonsi.
See my configure command line and build errors below.

  $ ./configure --build=x86_64-mageia-linux-gnu --prefix=/usr
--exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc
--datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64
--libexecdir=/usr/lib64 --localstatedir=/var --sharedstatedir=/usr/com
--mandir=/usr/share/man --infodir=/usr/share/info --x-includes=/usr/include
--x-libraries=/usr/lib64 --enable-dri --enable-glx
--with-dri-driverdir=/usr/lib64/dri
--with-dri-drivers=i915,i965,nouveau,r200,radeon,swrast --enable-shared-dricore
--enable-egl --with-egl-platforms=x11,wayland,drm --enable-gbm
--enable-shared-glapi --enable-gles1 --enable-gles2 --enable-openvg
--enable-gallium-egl --enable-gallium-g3dvl --enable-osmesa --disable-xvmc
--enable-vdpau --disable-va
--with-gallium-drivers=r300,r600,radeonsi,nouveau,swrast --enable-gallium-llvm


gmake[3]: Entering directory
`/home/iurt/rpm/BUILD/mesa-20120802/src/gallium/targets/egl-static'
/bin/sh ../../../../bin/mklib -o egl_gallium.so -noprefix -linker 'g++' \
-ldflags '-L../../../../lib64 -Wl,--no-undefined -L/usr/lib64/llvm
-Wl,--as-needed -Wl,-z,relro -Wl,-O1 -Wl,--build-id -Wl,--enable-new-dtags
-L/usr/lib -lpthread -lffi -ldl -lm ' \
-cplusplus -install ../../../../lib64/egl \
egl.o egl_pipe.o egl_st.o -Wl,--start-group
../../../../src/egl/wayland/wayland-drm/.libs/libwayland-drm.a
../../../../src/gallium/auxiliary/libgallium.a
../../../../src/gallium/drivers/identity/libidentity.a
../../../../src/gallium/drivers/llvmpipe/libllvmpipe.a
../../../../src/gallium/drivers/nouveau/libnouveau.a
../../../../src/gallium/drivers/nv30/libnv30.a
../../../../src/gallium/drivers/nv50/libnv50.a
../../../../src/gallium/drivers/nvc0/libnvc0.a
../../../../src/gallium/drivers/r300/libr300.a
../../../../src/gallium/drivers/r600/libr600.a
../../../../src/gallium/drivers/radeonsi/libradeonsi.a
../../../../src/gallium/drivers/rbug/librbug.a
../../../../src/gallium/drivers/softpipe/libsoftpipe.a
../../../../src/gallium/drivers/trace/libtrace.a
../../../../src/gallium/state_trackers/egl/libegl.a
../../../../src/gallium/state_trackers/vega/libvega.a
../../../../src/gallium/winsys/nouveau/drm/libnouveaudrm.a
../../../../src/gallium/winsys/radeon/drm/libradeonwinsys.a
../../../../src/gallium/winsys/sw/wayland/libws_wayland.a
../../../../src/gallium/winsys/sw/xlib/libws_xlib.a
../../../../src/mesa/libmesagallium.a -Wl,--end-group \
-lEGL -lOpenVG -lX11 -lXext -lXfixes -ldl -ldrm -ldrm_nouveau -ldrm_radeon
-lgbm -lglapi -lm -lpthread -lrt -ludev -lwayland-client -lwayland-server
-lLLVMMCJIT -lLLVMBitWriter -lLLVMX86AsmParser -lLLVMX86Disassembler
-lLLVMX86CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMMCParser
-lLLVMX86Desc -lLLVMX86Info -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMJIT
-lLLVMRuntimeDyld -lLLVMExecutionEngine -lLLVMCodeGen -lLLVMScalarOpts
-lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget
-lLLVMMC -lLLVMObject -lLLVMCore -lLLVMSupport
mklib: Making Linux shared library: egl_gallium.so
/bin/ld: skipping incompatible /usr/lib/libpthread.so when searching for
-lpthread
/bin/ld: skipping incompatible /usr/lib/libdl.so when searching for -ldl
../../../../src/gallium/drivers/radeonsi/libradeonsi.a(evergreen_hw_context.o):
In function `evergreen_flush_vgt_streamout':
/home/iurt/rpm/BUILD/mesa-20120802/src/gallium/drivers/radeonsi/evergreen_hw_context.c:117:
multiple definition of `evergreen_flush_vgt_streamout'
../../../../src/gallium/drivers/r600/libr600.a(evergreen_hw_context.o):/home/iurt/rpm/BUILD/mesa-20120802/src/gallium/drivers/r600/evergreen_hw_context.c:753:
first defined here
../../../../src/gallium/drivers/radeonsi/libradeonsi.a(evergreen_hw_context.o):
In function `evergreen_set_streamout_enable':
/home/iurt/rpm/BUILD/mesa-20120802/src/gallium/drivers/radeonsi/evergreen_hw_context.c:137:
multiple definition of `evergreen_set_streamout_enable'
../../../../src/gallium/drivers/r600/libr600.a(evergreen_hw_context.o):/home/iurt/rpm/BUILD/mesa-20120802/src/gallium/drivers/r600/evergreen_hw_context.c:773:
first defined here
../../../../src/gallium/drivers/radeonsi/libradeonsi.a(r600_buffer.o): In
function `r600_init_resource':
/home/iurt/rpm/BUILD/mesa-20120802/src/gallium/drivers/radeonsi/r600_buffer.c:121:
multiple definition of `r600_init_resource'
../

[Bug 53109] New: egl_gallium fails to link if both r600 and radeonsi are enabled

2012-08-03 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=53109

 Bug #: 53109
   Summary: egl_gallium fails to link if both r600 and radeonsi
are enabled
Classification: Unclassified
   Product: Mesa
   Version: git
  Platform: Other
OS/Version: All
Status: NEW
  Severity: normal
  Priority: medium
 Component: Drivers/DRI/Radeon
AssignedTo: dri-devel@lists.freedesktop.org
ReportedBy: freedesk...@blino.org


When both r600 and radeonsi gallium drivers are enabled, egl_gallium fails to
link because of duplicate symbols in r600 and radeonsi.
See my configure command line and build errors below.

  $ ./configure --build=x86_64-mageia-linux-gnu --prefix=/usr
--exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc
--datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64
--libexecdir=/usr/lib64 --localstatedir=/var --sharedstatedir=/usr/com
--mandir=/usr/share/man --infodir=/usr/share/info --x-includes=/usr/include
--x-libraries=/usr/lib64 --enable-dri --enable-glx
--with-dri-driverdir=/usr/lib64/dri
--with-dri-drivers=i915,i965,nouveau,r200,radeon,swrast --enable-shared-dricore
--enable-egl --with-egl-platforms=x11,wayland,drm --enable-gbm
--enable-shared-glapi --enable-gles1 --enable-gles2 --enable-openvg
--enable-gallium-egl --enable-gallium-g3dvl --enable-osmesa --disable-xvmc
--enable-vdpau --disable-va
--with-gallium-drivers=r300,r600,radeonsi,nouveau,swrast --enable-gallium-llvm


gmake[3]: Entering directory
`/home/iurt/rpm/BUILD/mesa-20120802/src/gallium/targets/egl-static'
/bin/sh ../../../../bin/mklib -o egl_gallium.so -noprefix -linker 'g++' \
-ldflags '-L../../../../lib64 -Wl,--no-undefined -L/usr/lib64/llvm
-Wl,--as-needed -Wl,-z,relro -Wl,-O1 -Wl,--build-id -Wl,--enable-new-dtags
-L/usr/lib -lpthread -lffi -ldl -lm ' \
-cplusplus -install ../../../../lib64/egl \
egl.o egl_pipe.o egl_st.o -Wl,--start-group
../../../../src/egl/wayland/wayland-drm/.libs/libwayland-drm.a
../../../../src/gallium/auxiliary/libgallium.a
../../../../src/gallium/drivers/identity/libidentity.a
../../../../src/gallium/drivers/llvmpipe/libllvmpipe.a
../../../../src/gallium/drivers/nouveau/libnouveau.a
../../../../src/gallium/drivers/nv30/libnv30.a
../../../../src/gallium/drivers/nv50/libnv50.a
../../../../src/gallium/drivers/nvc0/libnvc0.a
../../../../src/gallium/drivers/r300/libr300.a
../../../../src/gallium/drivers/r600/libr600.a
../../../../src/gallium/drivers/radeonsi/libradeonsi.a
../../../../src/gallium/drivers/rbug/librbug.a
../../../../src/gallium/drivers/softpipe/libsoftpipe.a
../../../../src/gallium/drivers/trace/libtrace.a
../../../../src/gallium/state_trackers/egl/libegl.a
../../../../src/gallium/state_trackers/vega/libvega.a
../../../../src/gallium/winsys/nouveau/drm/libnouveaudrm.a
../../../../src/gallium/winsys/radeon/drm/libradeonwinsys.a
../../../../src/gallium/winsys/sw/wayland/libws_wayland.a
../../../../src/gallium/winsys/sw/xlib/libws_xlib.a
../../../../src/mesa/libmesagallium.a -Wl,--end-group \
-lEGL -lOpenVG -lX11 -lXext -lXfixes -ldl -ldrm -ldrm_nouveau -ldrm_radeon
-lgbm -lglapi -lm -lpthread -lrt -ludev -lwayland-client -lwayland-server
-lLLVMMCJIT -lLLVMBitWriter -lLLVMX86AsmParser -lLLVMX86Disassembler
-lLLVMX86CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMMCParser
-lLLVMX86Desc -lLLVMX86Info -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMJIT
-lLLVMRuntimeDyld -lLLVMExecutionEngine -lLLVMCodeGen -lLLVMScalarOpts
-lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget
-lLLVMMC -lLLVMObject -lLLVMCore -lLLVMSupport
mklib: Making Linux shared library: egl_gallium.so
/bin/ld: skipping incompatible /usr/lib/libpthread.so when searching for
-lpthread
/bin/ld: skipping incompatible /usr/lib/libdl.so when searching for -ldl
../../../../src/gallium/drivers/radeonsi/libradeonsi.a(evergreen_hw_context.o):
In function `evergreen_flush_vgt_streamout':
/home/iurt/rpm/BUILD/mesa-20120802/src/gallium/drivers/radeonsi/evergreen_hw_context.c:117:
multiple definition of `evergreen_flush_vgt_streamout'
../../../../src/gallium/drivers/r600/libr600.a(evergreen_hw_context.o):/home/iurt/rpm/BUILD/mesa-20120802/src/gallium/drivers/r600/evergreen_hw_context.c:753:
first defined here
../../../../src/gallium/drivers/radeonsi/libradeonsi.a(evergreen_hw_context.o):
In function `evergreen_set_streamout_enable':
/home/iurt/rpm/BUILD/mesa-20120802/src/gallium/drivers/radeonsi/evergreen_hw_context.c:137:
multiple definition of `evergreen_set_streamout_enable'
../../../../src/gallium/drivers/r600/libr600.a(evergreen_hw_context.o):/home/iurt/rpm/BUILD/mesa-20120802/src/gallium/drivers/r600/evergreen_hw_context.c:773:
first defined here
../../../../src/gallium/drivers/radeonsi/libradeonsi.a(r600_buffer.o): In
function `r600_init_resource':
/home/iurt/rpm/BUILD/mesa-20120802/src/gallium/drivers/radeonsi/r600_buffer.c:121:
multiple definition of `r600_init_resource'
../../../