Bug 111262 - lp_bld_misc.cpp:811:51: error: ‘llvm::AtomicOrdering’ is not a class or namespace
Summary: lp_bld_misc.cpp:811:51: error: ‘llvm::AtomicOrdering’ is not a class or names...
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/llvmpipe (show other bugs)
Version: git
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords: bisected, regression
Depends on:
Blocks:
 
Reported: 2019-07-30 17:01 UTC by Vinson Lee
Modified: 2019-09-18 18:33 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vinson Lee 2019-07-30 17:01:44 UTC
llvm-3.4 build error

src/gallium/auxiliary/gallivm/lp_bld_misc.cpp: In function ‘llvm::AtomicOrdering mapFromLLVMOrdering(LLVMAtomicOrdering)’:
src/gallium/auxiliary/gallivm/lp_bld_misc.cpp:811:51: error: ‘llvm::AtomicOrdering’ is not a class or namespace
    case LLVMAtomicOrderingNotAtomic: return llvm::AtomicOrdering::NotAtomic;
                                                   ^
Comment 1 Vinson Lee 2019-07-30 20:26:19 UTC
2a55acbc1de0b8d1901988ee4f17d5697519c2d2 is the first bad commit
commit 2a55acbc1de0b8d1901988ee4f17d5697519c2d2
Author: Dave Airlie <airlied@redhat.com>
Date:   Tue Jul 2 07:10:53 2019 +1000

    gallivm: add compare exchange wrapper
    
    This just pulls the wrapper from LLVM for older versions
    
    Reviewed-by: Roland Scheidegger <sroland@vmware.com>

:040000 040000 cee7aedaa0ddff70fc6ab1b45205ed5d9d7bf771 4aa821efcbb5ee85301518e72b79afb636a1fd0f M	src
bisect run success
Comment 2 Roland Scheidegger 2019-07-30 21:29:28 UTC
Seems like different llvm versions (before 5.0) need different wrappers for AtomicCmpXchg(). Pretty much the same issue as bug 111102.
Although I can't reproduce this bug actually, maybe depends on compiler. (I can reproduce the other one, for llvm 3.5-3.8 the function parameters are wrong.)
Though I'm wondering if we actually need a mapping function, isn't it possible to just static cast the c enum to the class enum (as in (llvm::AtomicOrdering)SuccessOrdering)?
Comment 3 Michel Dänzer 2019-07-31 08:06:37 UTC
Any idea why the GitLab CI pipeline scons-llvm job doesn't hit this, which builds against LLVM 3.4.2? (See e.g. https://gitlab.freedesktop.org/mesa/mesa/-/jobs/460746)
Comment 4 Vinson Lee 2019-08-03 08:15:37 UTC
It could be due to different default C++ standards used in different compilers.
Comment 5 GitLab Migration User 2019-09-18 18:33:41 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/251.


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.