Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] imv: configure with -Db_ndebug=false
@ 2023-03-19 19:01 r-ricci
  2023-03-19 19:23 ` mhmdanas
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: r-ricci @ 2023-03-19 19:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 916 bytes --]

There is a new pull request by r-ricci against master on the void-packages repository

https://github.com/r-ricci/void-packages imv-assert
https://github.com/void-linux/void-packages/pull/42865

imv: configure with -Db_ndebug=false
`WAYLAND_DISPLAY= imv-wayland` and `DISPLAY= imv-x11` segfault because assertions are used to check for errors in these cases and we build with `-Db_ndebug=true` by default.

By looking at the commit history, I see that similar problems occurred in the past for other meson projects.
Meson, unlike cmake, doesn't define NDEBUG by default for release build types, so it's possible that many meson projects rely on assertions being always enabled. I don't believe it's safe to have `-Db_ndebug=true` in our build style.

#### Testing the changes
- I tested the changes in this PR: **YES**

A patch file from https://github.com/void-linux/void-packages/pull/42865.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-imv-assert-42865.patch --]
[-- Type: text/x-diff, Size: 1067 bytes --]

From 34630679128e352c31c42c1fce33a76e0fd0c776 Mon Sep 17 00:00:00 2001
From: Roberto Ricci <ricci@disroot.org>
Date: Sun, 19 Mar 2023 19:15:04 +0100
Subject: [PATCH] imv: configure with -Db_ndebug=false

Fix segfault when DISPLAY and WAYLAND_DISPLAY are not defined
---
 srcpkgs/imv/template | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/imv/template b/srcpkgs/imv/template
index 1599b72f2b43..97ec386b6939 100644
--- a/srcpkgs/imv/template
+++ b/srcpkgs/imv/template
@@ -1,8 +1,12 @@
 # Template file for 'imv'
 pkgname=imv
 version=4.4.0
-revision=1
+revision=2
 build_style=meson
+# don't define NDEBUG since assert(3) is used to detect error conditions
+# (e.g.: https://git.sr.ht/~exec64/imv/tree/v4.4.0/item/src/x11_window.c#L109
+# and https://git.sr.ht/~exec64/imv/tree/v4.4.0/item/src/wl_window.c#L673)
+configure_args="-Db_ndebug=false"
 hostmakedepends="asciidoc pkg-config cmake"
 makedepends="cmocka-devel freeimage-devel glu-devel librsvg-devel libheif-devel libxkbcommon-devel
  pango-devel wayland-devel inih-devel"

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: imv: configure with -Db_ndebug=false
  2023-03-19 19:01 [PR PATCH] imv: configure with -Db_ndebug=false r-ricci
@ 2023-03-19 19:23 ` mhmdanas
  2023-03-19 19:23 ` mhmdanas
  2023-03-20  4:08 ` [PR PATCH] [Merged]: " classabbyamp
  2 siblings, 0 replies; 4+ messages in thread
From: mhmdanas @ 2023-03-19 19:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 192 bytes --]

New comment by mhmdanas on void-packages repository

https://github.com/void-linux/void-packages/pull/42865#issuecomment-1475372816

Comment:
Change looks good to me (though I can't test it).

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: imv: configure with -Db_ndebug=false
  2023-03-19 19:01 [PR PATCH] imv: configure with -Db_ndebug=false r-ricci
  2023-03-19 19:23 ` mhmdanas
@ 2023-03-19 19:23 ` mhmdanas
  2023-03-20  4:08 ` [PR PATCH] [Merged]: " classabbyamp
  2 siblings, 0 replies; 4+ messages in thread
From: mhmdanas @ 2023-03-19 19:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 202 bytes --]

New comment by mhmdanas on void-packages repository

https://github.com/void-linux/void-packages/pull/42865#issuecomment-1475372816

Comment:
Change looks good to me (though I can't test it right now).

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PR PATCH] [Merged]: imv: configure with -Db_ndebug=false
  2023-03-19 19:01 [PR PATCH] imv: configure with -Db_ndebug=false r-ricci
  2023-03-19 19:23 ` mhmdanas
  2023-03-19 19:23 ` mhmdanas
@ 2023-03-20  4:08 ` classabbyamp
  2 siblings, 0 replies; 4+ messages in thread
From: classabbyamp @ 2023-03-20  4:08 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 762 bytes --]

There's a merged pull request on the void-packages repository

imv: configure with -Db_ndebug=false
https://github.com/void-linux/void-packages/pull/42865

Description:
`WAYLAND_DISPLAY= imv-wayland` and `DISPLAY= imv-x11` segfault because assertions are used to check for errors in these cases and we build with `-Db_ndebug=true` by default.

By looking at the commit history, I see that similar problems occurred in the past for other meson projects.
Meson, unlike cmake, doesn't define NDEBUG by default for release build types, so it's possible that many meson projects rely on assertions being always enabled. I don't believe it's safe to have `-Db_ndebug=true` in our build style.

#### Testing the changes
- I tested the changes in this PR: **YES**

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-03-20  4:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-19 19:01 [PR PATCH] imv: configure with -Db_ndebug=false r-ricci
2023-03-19 19:23 ` mhmdanas
2023-03-19 19:23 ` mhmdanas
2023-03-20  4:08 ` [PR PATCH] [Merged]: " classabbyamp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).