Bug 84807 - Build issue starting between bf4aecfb2acc8d0dc815105d2f36eccbc97c284b and a3e9582f09249ad27716ba82c7dfcee685b65d51
Summary: Build issue starting between bf4aecfb2acc8d0dc815105d2f36eccbc97c284b and a3e...
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Emil Velikov
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-08 16:27 UTC by Andy Furniss
Modified: 2014-10-14 15:23 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
example patch (1.05 KB, text/plain)
2014-10-08 16:27 UTC, Andy Furniss
Details
make output on bad (12.66 KB, text/plain)
2014-10-08 16:28 UTC, Andy Furniss
Details
make output on good (12.73 KB, text/plain)
2014-10-08 16:29 UTC, Andy Furniss
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Furniss 2014-10-08 16:27:43 UTC
Created attachment 107564 [details]
example patch

Haven't had time to bisect properly, but there are a group of build patches between 

bf4aecfb2acc8d0dc815105d2f36eccbc97c284b (Good)
and
a3e9582f09249ad27716ba82c7dfcee685b65d51 (Bad)

The issue is that without doing a make distclean applying a trivial patch and doing make no longer works properly.

I am radeonsi and from clean build like -

./autogen.sh --prefix=/usr --sysconfdir=/etc --enable-texture-float --with-egl-platforms=x11,drm --with-gallium-drivers=radeonsi,swrast --enable-opencl --enable-gbm --enable-shared-glapi --enable-glx-tls --with-dri-drivers= && make -j5

On bad applying a patch and just doing make fails to update lib/gallium/radeonsi_dri.so

example patch and output from make on good and bad to be attached.
Comment 1 Andy Furniss 2014-10-08 16:28:42 UTC
Created attachment 107565 [details]
make output on bad
Comment 2 Andy Furniss 2014-10-08 16:29:13 UTC
Created attachment 107566 [details]
make output on good
Comment 3 Andy Furniss 2014-10-08 16:40:06 UTC
Here's the diff between the outputs

ph4[~]$ diff mesa-build-issue-bad mesa-build-issue-good
1,2c1,3
< bad 
< a3e9582f09249ad27716ba82c7dfcee685b65d51
---
> Good
> 
> commit bf4aecfb2acc8d0dc815105d2f36eccbc97c284b
200a202
>   CXXLD    gallium_dri.la
208a211
>   CXXLD    libvdpau_gallium.la
Comment 4 Michel Dänzer 2014-10-09 08:39:40 UTC
I've run into this as well now, not sure why I didn't seem to before.

AFAICT the problem is that the contents of the TARGET_RADEON_WINSYS and TARGET_RADEON_COMMON variables don't end up as dependencies of gallium_dri.la. No idea how to fix it though. :(
Comment 5 Emil Velikov 2014-10-13 00:29:59 UTC
(In reply to Michel Dänzer from comment #4)
> I've run into this as well now, not sure why I didn't seem to before.
> 
> AFAICT the problem is that the contents of the TARGET_RADEON_WINSYS and
> TARGET_RADEON_COMMON variables don't end up as dependencies of
> gallium_dri.la. No idea how to fix it though. :(
Now that is a bit odd. Autohell should automatically add them as deps, considering that they are explicitly mentioned for linking purposes.

gallium_dri_la_LIBADD += $(TARGET_LIB_DEPS) \
        $(TARGET_RADEON_WINSYS) $(TARGET_RADEON_COMMON)


Perhaps it's tripping over the usage of "+=". I'll take a look at it over the next few days.
Comment 6 Michel Dänzer 2014-10-14 03:01:44 UTC
I suspected it might be related to '?=', but that's just a gut feeling.
Comment 7 Emil Velikov 2014-10-14 15:23:53 UTC
(In reply to Michel Dänzer from comment #6)
> I suspected it might be related to '?=', but that's just a gut feeling.
Indeed that was the offender. The operator was used as automake tends to just die as soon as it find two "=" operators on the same variable.

Yet it seems that it's not the case when the file containing it is 'included', plus the evaluation of the variables was somewhat random - in some cases there were not evaluated by the time the linking it to take place. Not to mention that the libraries were not added to the DEPENDENCIES list.
sed 's|?=|=|' does not job with no side effects.

commit af897df5083fc94d5a2a011de9894fa1aa852fe2
Author: Emil Velikov <emil.l.velikov@gmail.com>
Date:   Tue Oct 14 15:25:54 2014 +0100

    automake: explicitly set TARGET_RADEON_{WINSYS,COMMON}

    Originally the variables were set only once via the ?= operator but
    that causes issues when doing incremental builds. They appear to be
    undefined and missing from the dependency list despite their addition
    to LIBADD.

    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84807


bug/show.html.tmpl processed on Feb 26, 2017 at 07:45:42.
(provided by the Example extension).