Skip to contentSkip to conversation

package/weston: disable -NDEBUG

PATCH Superseded James Hilliard 2 participants 5 messages Jun 15, 2021 – Jun 16, 2021

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/weston: disable -NDEBUG

Fixes:
http://autobuild.buildroot.net/results/f42/f420890de1b52786f8cf5f2922b69c909162eaa1/

---
 package/weston/weston.mk | 2 ++
 1 file changed, 2 insertions(+)
package/weston/weston.mk +2 -0
index 8afe4bbab4..abafb3a6d9 100644
@@ -19,6 +19,8 @@ WESTON_CONF_OPTS = \
 	-Dcolor-management-colord=false \
 	-Dremoting=false
 
+WESTON_CFLAGS="$(TARGET_CFLAGS) -UNDEBUG"
+
 # Uses VIDIOC_EXPBUF, only available from 3.8+
 ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8),y)
 WESTON_CONF_OPTS += -Dsimple-clients=dmabuf-v4l
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/1 package/weston: disable -NDEBUG

James, All,

On 2021-06-14 18:55 -0600, James Hilliard spake thusly:

Quoted 2 lines

Fixes:
http://autobuild.buildroot.net/results/f42/f420890de1b52786f8cf5f2922b69c909162eaa1/

It is just tests that can't be built with -DNDEBUG. It would be a shame to have to build the whole thing without NDEBUG, just becuase of tests that are not usefull on the target...

Is it possible to just disable building tests at all? Or if not, can't we just patch them out?

Regards,
Yann E. MORIN.

Quoted 25 lines
---
 package/weston/weston.mk | 2 ++
 1 file changed, 2 insertions(+)
package/weston/weston.mk +2 -0
index 8afe4bbab4..abafb3a6d9 100644
@@ -19,6 +19,8 @@ WESTON_CONF_OPTS = \
 	-Dcolor-management-colord=false \
 	-Dremoting=false
 
+WESTON_CFLAGS="$(TARGET_CFLAGS) -UNDEBUG"
+
 # Uses VIDIOC_EXPBUF, only available from 3.8+
 ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8),y)
 WESTON_CONF_OPTS += -Dsimple-clients=dmabuf-v4l
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#2 lore raw

PATCH 1/1 package/weston: disable -NDEBUG

Quoted 10 lines · Yann E. MORIN

James, All,

On 2021-06-14 18:55 -0600, James Hilliard spake thusly:

Quoted 2 lines

Fixes:
http://autobuild.buildroot.net/results/f42/f420890de1b52786f8cf5f2922b69c909162eaa1/

It is just tests that can't be built with -DNDEBUG. It would be a shame to have to build the whole thing without NDEBUG, just becuase of tests that are not usefull on the target...

Per upstream weston should not be built with -DNDEBUG since weston relies on asserts for non-tests as well to catch certain fatal conditions.

Quoted 3 lines

Is it possible to just disable building tests at all? Or if not, can't we just patch them out?

We could...however upstream recommended not to do that as it can make tracing certain errors extremely difficult.

Quoted 37 lines

Regards,
Yann E. MORIN.

Quoted 21 lines
---
 package/weston/weston.mk | 2 ++
 1 file changed, 2 insertions(+)
package/weston/weston.mk +2 -1
index 8afe4bbab4..abafb3a6d9 100644
@@ -19,6 +19,8 @@ WESTON_CONF_OPTS = \
      -Dcolor-management-colord=false \
      -Dremoting=false
 
+WESTON_CFLAGS="$(TARGET_CFLAGS) -UNDEBUG"
+
 # Uses VIDIOC_EXPBUF, only available from 3.8+
 ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8),y)
 WESTON_CONF_OPTS += -Dsimple-clients=dmabuf-v4l
--

2.25.1

Quoted 4 lines

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

--
.-----------------.--------------------.------------------.--------------------.

|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |

'------------------------------^-------^------------------^--------------------'

#3 lore raw

PATCH 1/1 package/weston: disable -NDEBUG

James, All,

On 2021-06-16 13:48 -0600, James Hilliard spake thusly:

Quoted 11 lines · Yann E. MORIN
Quoted 7 lines

On 2021-06-14 18:55 -0600, James Hilliard spake thusly:

Quoted 2 lines

Fixes:
http://autobuild.buildroot.net/results/f42/f420890de1b52786f8cf5f2922b69c909162eaa1/

It is just tests that can't be built with -DNDEBUG. It would be a shame to have to build the whole thing without NDEBUG, just becuase of tests that are not usefull on the target...

Per upstream weston should not be built with -DNDEBUG since weston relies on asserts for non-tests as well to catch certain fatal conditions.

That info should have been in the commit log. A pointer to upstream discussion about it would be a bonus.

Can you respoin the patch, please?

Quoted 4 lines
Quoted 2 lines

Is it possible to just disable building tests at all? Or if not, can't we just patch them out?

We could...however upstream recommended not to do that as it can make tracing certain errors extremely difficult.

OK, but having a way to disable tests would still be good, because basically, tests are useless on a product.

Regards,
Yann E. MORIN.

Quoted 37 lines
Quoted 37 lines

Regards,
Yann E. MORIN.

Quoted 21 lines
---
 package/weston/weston.mk | 2 ++
 1 file changed, 2 insertions(+)
package/weston/weston.mk +2 -1
index 8afe4bbab4..abafb3a6d9 100644
@@ -19,6 +19,8 @@ WESTON_CONF_OPTS = \
      -Dcolor-management-colord=false \
      -Dremoting=false
 
+WESTON_CFLAGS="$(TARGET_CFLAGS) -UNDEBUG"
+
 # Uses VIDIOC_EXPBUF, only available from 3.8+
 ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8),y)
 WESTON_CONF_OPTS += -Dsimple-clients=dmabuf-v4l
--

2.25.1

Quoted 4 lines

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

--
.-----------------.--------------------.------------------.--------------------.

|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |

'------------------------------^-------^------------------^--------------------'

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#4 lore raw

PATCH 1/1 package/weston: disable -NDEBUG

Quoted 12 lines · Yann E. MORIN

James, All,

On 2021-06-16 13:48 -0600, James Hilliard spake thusly:

Quoted 8 lines · Yann E. MORIN
Quoted 7 lines

On 2021-06-14 18:55 -0600, James Hilliard spake thusly:

Quoted 2 lines

Fixes:
http://autobuild.buildroot.net/results/f42/f420890de1b52786f8cf5f2922b69c909162eaa1/

It is just tests that can't be built with -DNDEBUG. It would be a shame to have to build the whole thing without NDEBUG, just becuase of tests that are not usefull on the target...

Quoted 8 lines
Quoted 3 lines

Per upstream weston should not be built with -DNDEBUG since weston relies on asserts for non-tests as well to catch certain fatal conditions.

That info should have been in the commit log. A pointer to upstream discussion about it would be a bonus.

Can you respoin the patch, please?

https://patchwork.ozlabs.org/project/buildroot/patch/20210616201711.1131369-1-james.hilliard1 at gmail.com/

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Is it possible to just disable building tests at all? Or if not, can't we just patch them out?

We could...however upstream recommended not to do that as it can make tracing certain errors extremely difficult.

OK, but having a way to disable tests would still be good, because basically, tests are useless on a product.

Yeah, there's some pending PR's that would make that possible, see:
https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/555
https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/642

Quoted 49 lines

Regards,
Yann E. MORIN.

Quoted 25 lines
Quoted 25 lines

Regards,
Yann E. MORIN.

Quoted 21 lines
---
 package/weston/weston.mk | 2 ++
 1 file changed, 2 insertions(+)
package/weston/weston.mk +2 -1
index 8afe4bbab4..abafb3a6d9 100644
@@ -19,6 +19,8 @@ WESTON_CONF_OPTS = \
      -Dcolor-management-colord=false \
      -Dremoting=false
 
+WESTON_CFLAGS="$(TARGET_CFLAGS) -UNDEBUG"
+
 # Uses VIDIOC_EXPBUF, only available from 3.8+
 ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8),y)
 WESTON_CONF_OPTS += -Dsimple-clients=dmabuf-v4l
--

2.25.1

Quoted 12 lines
Quoted 5 lines
Quoted 4 lines

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Quoted 7 lines

--
.-----------------.--------------------.------------------.--------------------.

|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |

'------------------------------^-------^------------------^--------------------'

--
.-----------------.--------------------.------------------.--------------------.

|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |

'------------------------------^-------^------------------^--------------------'