Github messages for voidlinux
 help / color / mirror / Atom feed
From: r-ricci <r-ricci@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] imv: configure with -Db_ndebug=false
Date: Sun, 19 Mar 2023 20:01:56 +0100	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-42865@inbox.vuxu.org> (raw)

[-- 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"

             reply	other threads:[~2023-03-19 19:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-19 19:01 r-ricci [this message]
2023-03-19 19:23 ` mhmdanas
2023-03-19 19:23 ` mhmdanas
2023-03-20  4:08 ` [PR PATCH] [Merged]: " classabbyamp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-42865@inbox.vuxu.org \
    --to=r-ricci@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).