Bug 90310 - Fails to build gallium_dri.so at linking stage with clang because of multiple redefinitions
Summary: Fails to build gallium_dri.so at linking stage with clang because of multiple...
Status: RESOLVED DUPLICATE of bug 90905
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-05 08:01 UTC by Julien Isorce
Modified: 2015-06-12 07:05 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
gallium/dri: fix duplicated symbols build error (1.57 KB, patch)
2015-05-19 07:42 UTC, Julien Isorce
Details | Splinter Review

Description Julien Isorce 2015-05-05 08:01:07 UTC
In src/gallium/targets/dri/Makefile.am:

# XXX: Temporary allow duplicated symbols, as the loader pulls in xmlconfig.c
# which already provides driParse* and driQuery* amongst others.
# Remove this hack as we come up with a cleaner solution.
gallium_dri_la_LDFLAGS += \
        -Wl,--allow-multiple-definition

But "--allow-multiple-definition" is not available with clang:

Making all in targets/dri
 cd ../../../.. && /bin/sh /Users/patch/dev/mesa/bin/missing automake-1.15 --foreign src/gallium/targets/dri/Makefile
 cd ../../../.. && /bin/sh ./config.status src/gallium/targets/dri/Makefile depfiles
config.status: creating src/gallium/targets/dri/Makefile
config.status: executing depfiles commands
/bin/sh ../../../../libtool  --tag=CXX   --mode=link g++  -g -O2 -Wall -fno-strict-aliasing -fno-builtin-memcmp -Qunused-arguments  -shared -shrext .so -module -avoid-version    -Wl,--allow-multiple-definition,-v   -o gallium_dri.la -rpath /usr/local/lib/dri gallium_dri_la-target.lo ../../../../src/mesa/libmesagallium.la ../../../../src/mesa/drivers/dri/common/libdricommon.la ../../../../src/mesa/drivers/dri/common/libmegadriver_stub.la ../../../../src/gallium/state_trackers/dri/libdri.la ../../../../src/gallium/auxiliary/libgalliumvl.la ../../../../src/gallium/auxiliary/libgallium.la ../../../../src/gallium/drivers/noop/libnoop.la ../../../../src/gallium/drivers/rbug/librbug.la ../../../../src/gallium/drivers/trace/libtrace.la  -L/opt/local/lib -lexpat   -lm  -lpthread  ../../../../src/loader/libloader.la          ../../../../src/gallium/winsys/sw/dri/libswdri.la ../../../../src/gallium/drivers/softpipe/libsoftpipe.la       
libtool: link: g++ -Wl,-undefined -Wl,dynamic_lookup -o .libs/gallium_dri.so -bundle  .libs/gallium_dri_la-target.o   -Wl,-force_load,../../../../src/mesa/.libs/libmesagallium.a -Wl,-force_load,../../../../src/mesa/drivers/dri/common/.libs/libdricommon.a -Wl,-force_load,../../../../src/mesa/drivers/dri/common/.libs/libmegadriver_stub.a -Wl,-force_load,../../../../src/gallium/state_trackers/dri/.libs/libdri.a -Wl,-force_load,../../../../src/gallium/auxiliary/.libs/libgalliumvl.a -Wl,-force_load,../../../../src/gallium/auxiliary/.libs/libgallium.a -Wl,-force_load,../../../../src/gallium/drivers/noop/.libs/libnoop.a -Wl,-force_load,../../../../src/gallium/drivers/rbug/.libs/librbug.a -Wl,-force_load,../../../../src/gallium/drivers/trace/.libs/libtrace.a -Wl,-force_load,../../../../src/loader/.libs/libloader.a -Wl,-force_load,../../../../src/gallium/winsys/sw/dri/.libs/libswdri.a -Wl,-force_load,../../../../src/gallium/drivers/softpipe/.libs/libsoftpipe.a  -L/opt/local/lib -lpthread -lm -lexpat  -g -O2 -Wl,--allow-multiple-definition -Wl,-v  
@(#)PROGRAM:ld  PROJECT:ld64-241.9
configured to support archs: armv6 armv7 armv7s arm64 i386 x86_64 x86_64h armv6m armv7m armv7em
Library search paths:
	/opt/local/lib
	/usr/lib
	/usr/local/lib
Framework search paths:
	/Library/Frameworks/
	/System/Library/Frameworks/
ld: unknown option: --allow-multiple-definition
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [gallium_dri.la] Error 1
Comment 1 Julien Isorce 2015-05-19 07:42:20 UTC
Created attachment 115891 [details] [review]
gallium/dri: fix duplicated symbols build error
Comment 2 Julien Isorce 2015-06-12 07:05:48 UTC

*** This bug has been marked as a duplicate of bug 90905 ***


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.