Bug 50480

Summary: Commit f9d1562 breaks x86 build after x86_64 build
Product: Mesa Reporter: Tobias Droste <tdroste>
Component: Mesa coreAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: git   
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Patch to make 'make clean' work again

Description Tobias Droste 2012-05-29 17:54:21 UTC
commit f9d1562f356a66b70f13324e3360d63e8602a35f (automake: Convert dricore building to automake) breaks building x86 mesa after building x86_64 mesa or vice versa, because make clean leaves a lot of *.lo files in src/mesa/libcore
Comment 1 Matt Turner 2012-05-30 11:34:08 UTC
Run `git clean -dfx`

When making build system changes, there's no way to make both the old and new system clean up everything potentially left over by both the old and new systems.

I've seen this kind of thing reported really often, so I'll close this report. Reopen if `git clean -dfx` and reruning ./autogen.sh doesn't fix it.
Comment 2 Tobias Droste 2012-05-30 11:37:25 UTC
git clean -fdx obviously does help (as it removes everything that is not tracked). but building mesa (with rerun autogen.sh) will recreate the *.lo files in src/mesa/libcore and make clean does not remove them. 

Currently to build x86 and x86_64 in the same tree I have to run git clean -fdx before building. before the change a make clean was enough.
Comment 3 Tobias Droste 2012-05-30 11:49:19 UTC
just to clarify what is going on:

what should work, but does not:
1. git clean -fdx 
2. autogen.sh ....
3. make && make install
4. make clean
5. autogen.sh --enable-32-bit ...
6. make -> fails

what still does work is:
1. git clean -fdx 
2. autogen.sh ....
3. make && make install
4. git clean -fdx
5. autogen.sh --enable-32-bit ...
6. make && make install
Comment 4 Tobias Droste 2012-05-30 12:13:13 UTC
Created attachment 62299 [details] [review]
Patch to make 'make clean' work again

This would fix the problem, but I'm not sure if it's supposed to work this way with automake or if this is just a workaround
Comment 5 Eric Anholt 2012-05-30 14:17:53 UTC
Proposed patch:

http://lists.freedesktop.org/archives/mesa-dev/2012-May/022402.html
Comment 6 Tobias Droste 2012-05-30 16:08:37 UTC
yes, that does fix the problem
Comment 7 Eric Anholt 2012-06-01 16:27:01 UTC
commit 775ba11dcd8ddc46f78db3afe35de193a92515d0
Author: Eric Anholt <eric@anholt.net>
Date:   Wed May 30 13:31:27 2012 -0700

    automake: Connect the libdricore target to make clean.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50480
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>

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.