Bug 106776

Summary: vma_random unrecognized command line option "-std=c++11"
Product: Mesa Reporter: Vinson Lee <vlee>
Component: OtherAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact: mesa-dev
Severity: normal    
Priority: medium CC: jason, scott.d.phillips
Version: gitKeywords: bisected, regression
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: 0001-util-tests-vma-test-depends-on-C-11-support.patch

Description Vinson Lee 2018-06-01 23:10:20 UTC
Build error with GCC 4.4.

  CXX      vma_random_test-vma_random_test.o
cc1plus: error: unrecognized command line option "-std=c++11"


commit 943fecc5691b55b8ce8740d133dd70614effb72d
Author: Scott D Phillips <scott.d.phillips@intel.com>
Date:   Fri May 4 17:11:13 2018 -0700

    util: Add a randomized test for the virtual memory allocator
    
    The test pseudo-randomly makes allocations and deallocations with
    the virtual memory allocator and checks that the results are
    consistent. Specifically, we test that:
    
     * no result from the allocator overlaps an already allocated range
     * allocated memory fulfills the stated alignment requirement
     * a failed result from the allocator could not have been fulfilled
     * memory freed to the allocator can later be allocated again
    
    v2: - fix if() in test() to actually run fill()
    v3: - add c++11 build flag (Jason)
        - test the full 64-bit range (Jason)
    
    Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Comment 1 Scott D Phillips 2018-06-01 23:30:58 UTC
Created attachment 139959 [details] [review]
0001-util-tests-vma-test-depends-on-C-11-support.patch

I think this should do it. It looks like in the meson build, c++11 support is required.
Comment 2 Vinson Lee 2018-06-04 21:40:32 UTC
(In reply to Scott D Phillips from comment #1)
> Created attachment 139959 [details] [review] [review]
> 0001-util-tests-vma-test-depends-on-C-11-support.patch
> 
> I think this should do it. It looks like in the meson build, c++11 support
> is required.

Tested-by: Vinson Lee <vlee@freedesktop.org>
Comment 3 Scott D Phillips 2018-06-05 17:35:46 UTC
pushed

commit 7d9cb8d5b6e35318fc7f8ef0cefb5c47b9c729cf
Author: Scott D Phillips <scott.d.phillips@intel.com>
Date:   Tue Jun 5 09:29:43 2018 -0700

    util/tests/vma: Fix warning c++11-narrowing
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106801
    Fixes: 943fecc569 ("util: Add a randomized test for the virtual memory allocator")
    Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Comment 4 Scott D Phillips 2018-06-05 17:36:10 UTC
oops, I meant this one:

commit db9cec5689bfc4031e0ddcc5b177c09f2deabb07
Author: Scott D Phillips <scott.d.phillips@intel.com>
Date:   Fri Jun 1 16:26:56 2018 -0700

    util: tests: vma test depends on C++11 support
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106776
    Fixes: 943fecc569 ("util: Add a randomized test for the virtual memory allocator")
    Tested-by: Vinson Lee <vlee@freedesktop.org>
    Reviewed-by: Dylan Baker <dylan@pnwbakers.com>

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.