Bug 109791

Summary: The mesa release config doesn't define NDEBUG when building using meson 0.45.0
Product: Mesa Reporter: asimiklit <andrey.simiklit>
Component: OtherAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact: mesa-dev
Severity: normal    
Priority: medium CC: andrey.simiklit.1989, baker.dylan.c
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description asimiklit 2019-02-27 13:28:45 UTC
-DNDEBUG is not passed to GCC, even if
buildtype=release
b_ndebug=true

Looks like it is related to this meson issues:
https://github.com/mesonbuild/meson/issues/3258
https://github.com/mesonbuild/meson/pull/3274

Possible that is a one more point to bump the meson version:
https://patchwork.freedesktop.org/patch/263283/

Looks like this is a meson fix for it:
https://github.com/mesonbuild/meson/commit/12bac512f6497e46ada8ed980cbcb1631506691c
Comment 1 Eero Tamminen 2019-02-27 13:52:47 UTC
>The mesa release configuration can't be build using meson 0.45.0

Does this mean that the build actually fails, or...

> -DNDEBUG is not passed to GCC, even if buildtype=release b_ndebug=true

...just that NDEBUG define value (for disabling asserts) is wrong during building?


I'm asking because Mesa builds and works fine with Meson 0.45.1 in Ubuntu 18.04 (latest LTS release) and following options:
     -Ddri-drivers=i965,swrast
     -Dvulkan-drivers=intel,amd
     -Dgallium-drivers=iris,radeonsi
     -Dllvm=true
     -Dplatforms=x11,wayland,drm,surfaceless
     -Ddri3=true
     -Dgbm=true
     -Degl=true
     -Dvalgrind=true
     -Dlibunwind=true
     -Dtools=intel-ui

(Newer Meson version, 0.47.2, comes only in Ubuntu 18.10. It wasn't updated with the first HW-enabling 18.04 LTS update, at least not yet.)
Comment 2 asimiklit 2019-02-27 14:12:21 UTC
(In reply to Eero Tamminen from comment #1)
> >The mesa release configuration can't be build using meson 0.45.0
> 
> Does this mean that the build actually fails, or...
> 
> > -DNDEBUG is not passed to GCC, even if buildtype=release b_ndebug=true
> 
> ...just that NDEBUG define value (for disabling asserts) is wrong during
> building?
> 
> 
> I'm asking because Mesa builds and works fine with Meson 0.45.1 in Ubuntu
> 18.04 (latest LTS release) and following options:
>      -Ddri-drivers=i965,swrast
>      -Dvulkan-drivers=intel,amd
>      -Dgallium-drivers=iris,radeonsi
>      -Dllvm=true
>      -Dplatforms=x11,wayland,drm,surfaceless
>      -Ddri3=true
>      -Dgbm=true
>      -Degl=true
>      -Dvalgrind=true
>      -Dlibunwind=true
>      -Dtools=intel-ui
> 
> (Newer Meson version, 0.47.2, comes only in Ubuntu 18.10. It wasn't updated
> with the first HW-enabling 18.04 LTS update, at least not yet.)

Yes, NDEBUG define value is wrong during building.
Maybe we can add at least some warning message for this case buildtype=release + b_ndebug=true ?
And I will change bug title to something like: 
"The mesa release config doesn't define NDEBUG when building using meson 0.45.0"
Comment 3 asimiklit 2019-02-28 16:18:47 UTC
I suggested a patch to add the warning:
https://gitlab.freedesktop.org/mesa/mesa/merge_requests/358
Comment 4 linawutida@web-experts.net (Spammer; Account disabled) 2019-03-06 07:54:48 UTC
BHai awaz aa rahi hay meri?
Comment 5 linawutida@web-experts.net (Spammer; Account disabled) 2019-03-06 08:00:50 UTC
Jai Hind
Comment 6 andrii simiklit 2019-07-30 09:49:12 UTC
This issue was fixed by commit:
f7b6a8d12fdc446e325129033e5f61e3bbafb0b2 "meson: bump required version to 0.46"

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.