Bug 59332 - Problems building 32bit Mesa
Summary: Problems building 32bit Mesa
Status: RESOLVED INVALID
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/r600 (show other bugs)
Version: git
Hardware: Other Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-14 02:43 UTC by Mike Lothian
Modified: 2013-02-05 21:26 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
32bit build log (176.95 KB, text/plain)
2013-01-14 02:43 UTC, Mike Lothian
Details
Updated build log with patch (51.39 KB, application/x-xz)
2013-01-31 18:49 UTC, Mike Lothian
Details

Description Mike Lothian 2013-01-14 02:43:25 UTC
Created attachment 72977 [details]
32bit build log

I can no longer build a 32bit mesa on my 64bit system

I'm using the same options and using master on both builds

I think this might have something to do with the autotools merge
Comment 1 Mike Lothian 2013-01-16 02:33:18 UTC
I think the issue is in egl - mesa builds fine on 32bit without it

The 64bit version builds fine with it
Comment 2 Mike Lothian 2013-01-19 03:51:43 UTC
I've bisected it back to:

b07ae05a3dccef620c716e821c647413b951051 is the first bad commit
commit ab07ae05a3dccef620c716e821c647413b951051
Author: Matt Turner <mattst88@gmail.com>
Date:   Wed Sep 5 11:12:29 2012 -0700

    targets/dri-r600: Convert to automake
    
    v2: Andreas Boll <andreas.boll.dev@gmail.com>
        - Provide compatibility with scripts for the old Mesa build system

:100644 100644 9c9791b5137525bb22de3439806d565411a698aa bb287d776c71a849f627af941bdbe0d514282ea1 M      configure.ac
:040000 040000 097ecdc98b02d01f522d90cae259f846fac14d64 c3659daefaf1f71454c058590a87603c250d4458 M      src


But I don't think that's much of a surprise and might be a bit of a red herring 

I've got a feeling the -m32 probably isn't being passed somewhere
Comment 3 Mike Lothian 2013-01-27 13:07:11 UTC
I notice in the glsl directory the Makefile has CFLAGS and CFLAGS_FOR_BUILD and the same for CXX too the FOR_BUILD ones don't have -m32 and I think could be causing some of the issues I'm seeing
Comment 4 Matt Turner 2013-01-27 19:06:39 UTC
Thanks. I know about this. Trying to come up with a good solution.
Comment 5 Matt Turner 2013-01-30 23:47:23 UTC
(In reply to comment #3)
> I notice in the glsl directory the Makefile has CFLAGS and CFLAGS_FOR_BUILD
> and the same for CXX too the FOR_BUILD ones don't have -m32 and I think
> could be causing some of the issues I'm seeing

Actually, that doesn't seem related. Looks like this is yet another problem with 32-bit LLVM.

I wonder if Tom's seen this?
Comment 6 Mike Lothian 2013-01-31 08:03:04 UTC
Even with the llvm switches set to off I still have issues
Comment 7 Andreas Boll 2013-01-31 08:13:25 UTC
(In reply to comment #6)
> Even with the llvm switches set to off I still have issues

Maybe this patch helps:
http://lists.freedesktop.org/archives/mesa-dev/2013-January/033797.html
Comment 8 Mike Lothian 2013-01-31 18:46:11 UTC
It's an improvement I can build mesa again without EGL 

building with EGL I get errors such as:

../../../../src/gallium/auxiliary/.libs/libgallium.a(lp_bld_debug.o):lp_bld_debug.cpp:function lp_disassemble: error: undefined reference to 'std::string::_Rep::_S_empty_rep_storage'
../../../../src/gallium/auxiliary/.libs/libgallium.a(lp_bld_debug.o):lp_bld_debug.cpp:function lp_disassemble: error: undefined reference to 'std::string::_Rep::_S_empty_rep_storage'
../../../../src/gallium/auxiliary/.libs/libgallium.a(lp_bld_debug.o):lp_bld_debug.cpp:function lp_disassemble: error: undefined reference to 'std::string::_Rep::_S_empty_rep_storage'
../../../../src/gallium/auxiliary/.libs/libgallium.a(lp_bld_debug.o):lp_bld_debug.cpp:function lp_disassemble: error: undefined reference to 'std::string::_Rep::_S_empty_rep_storage'
/usr/lib32/llvm/libLLVMX86CodeGen.a(X86FrameLowering.o):function emitSPUpdate(llvm::MachineBasicBlock&, llvm::MachineBasicBlock::bundle_iterator<llvm::MachineInstr, llvm::ilist_iterator<llvm::MachineInstr> >&, unsigned int, long long, bool, bool, llvm::TargetInstrInfo const&, llvm::TargetRegisterInfo const&): error: undefined reference to 'std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'
/usr/lib32/llvm/libLLVMX86CodeGen.a(X86FrameLowering.o):function emitSPUpdate(llvm::MachineBasicBlock&, llvm::MachineBasicBlock::bundle_iterator<llvm::MachineInstr, llvm::ilist_iterator<llvm::MachineInstr> >&, unsigned int, long long, bool, bool, llvm::TargetInstrInfo const&, llvm::TargetRegisterInfo const&): error: undefined reference to 'std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'
Comment 9 Mike Lothian 2013-01-31 18:49:13 UTC
Created attachment 74012 [details]
Updated build log with patch

I had to compress it due to the size
Comment 10 Mike Lothian 2013-01-31 19:44:58 UTC
Equally disabling llvm and leaving egl on works too
Comment 11 Mike Lothian 2013-02-05 21:05:54 UTC
Seems I had a rogue /usr/lib32/libstdc++.so causing problems with my 32bit builds

Everything is working fine now with LLVM enabled


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.