Bug 90905

Summary: mesa: Finish subdir-objects transition
Product: Mesa Reporter: Matt Turner <mattst88>
Component: OtherAssignee: Emil Velikov <emil.l.velikov>
Status: RESOLVED FIXED QA Contact: mesa-dev
Severity: normal    
Priority: medium CC: davyaxel0, julien.isorce, kusmabite
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: dirty hack
subdir-objects2

Description Matt Turner 2015-06-08 21:10:52 UTC
The last thing blocking enabling subdir-objects (the default for automake-1.4, and the only option for automake-2.0) is

src/loader/Makefile.am:

if HAVE_DRICOMMON
...
libloader_la_SOURCES += \
        $(top_srcdir)/src/mesa/drivers/dri/common/xmlconfig.c
...
endif

Worse, since the loader is linked into the gallium dri targets, which also links in dricommon which includes xmlconfig.c...

# 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

I'd fix it myself, but I literally have no idea what is going on. I've been poking about this since at least December 21st last year, so I'd *really* appreciate sorting this out.
Comment 1 Erik Faye-Lund 2015-06-09 00:24:16 UTC
Created attachment 116376 [details] [review]
dirty hack

I gave it a spin, and got this compiling. It's a mess, but works for me. Dunno.
Comment 2 Erik Faye-Lund 2015-06-09 01:08:15 UTC
Created attachment 116377 [details] [review]
subdir-objects2

Here's a version that works with out-of-tree builds, and also gets rid of --allow-multiple-definition.
Comment 3 Emil Velikov 2015-06-10 22:42:10 UTC
Yes the situation is a "bit" messy, and considering the interesting use of xmlconfig by the loader (and effectively libGL) I intentionally stayed away from it.

Anywho, I've picked Erik's approach, updated+tested the other two build systems and will send the patch to the ML in a second. Meanwhile Eric pushed some patches that make autotools complain about another subdir-objects issue. Will send a patch for that one as well.
Comment 4 Julien Isorce 2015-06-12 07:05:48 UTC
*** Bug 90310 has been marked as a duplicate of this bug. ***
Comment 5 Julien Isorce 2015-06-12 07:09:24 UTC
attachment 116377 [details] [review] works for me on osx with --enable-dri --disable-vdpau --disable-va --enable-asm --with-gallium-drivers=swrast --enable-gles2 --enable-gles1 --enable-glx --enable-opengl --enable-gallium-osmesa --with-egl-platforms=x11 --enable-debug --enable-gallium-llvm --disable-omx --disable-llvm-shared-libs
Comment 6 Emil Velikov 2015-07-06 11:53:59 UTC
Both issues (the subdir-objects and -Wl,--allow-multiple-definition) should be sorted now. Thank for the help gents.

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.