public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/netcdf/files/, sci-libs/netcdf/
Date: Fri, 15 Jul 2022 12:49:26 +0000 (UTC)	[thread overview]
Message-ID: <1657889202.400a204bea4aa72d51a0ef53260743c9f7ee0310.sam@gentoo> (raw)

commit:     400a204bea4aa72d51a0ef53260743c9f7ee0310
Author:     brahmajit das <brahmajit.xyz <AT> gmail <DOT> com>
AuthorDate: Fri Jul 15 10:13:20 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jul 15 12:46:42 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=400a204b

sci-libs/netcdf: Fix musl missing execinfo.h check

Check if execinfo.h is present before including the header. The check is
preset in other parts of the souce code, here it was only being checked if
it's WIN32 or CYGIWIN before including execinfo.h as a result build was
failing on musl.

Closes: https://bugs.gentoo.org/828677

Signed-off-by: brahmajit das <brahmajit.xyz <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/26284
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/netcdf-4.9.0-fix-musl-execinfo_h.patch   | 46 ++++++++++++++++++++++
 sci-libs/netcdf/netcdf-4.9.0.ebuild                |  1 +
 2 files changed, 47 insertions(+)

diff --git a/sci-libs/netcdf/files/netcdf-4.9.0-fix-musl-execinfo_h.patch b/sci-libs/netcdf/files/netcdf-4.9.0-fix-musl-execinfo_h.patch
new file mode 100644
index 000000000000..7b711327512a
--- /dev/null
+++ b/sci-libs/netcdf/files/netcdf-4.9.0-fix-musl-execinfo_h.patch
@@ -0,0 +1,46 @@
+# Conditionally include execinfo as it's not available on all libc
+# systems. There is a PR upstream for a similiar issue but the actual
+# issus is not reproducable on Gentoo [math library not found] [1], so
+# for now this is a temporary fix and can be removed once the PR [1]
+# is merged upstream.
+# [1]: https://github.com/Unidata/netcdf-c/pull/1701
+#
+# Closes: https://bugs.gentoo.org/828677
+--- a/libhdf5/hdf5debug.c
++++ b/libhdf5/hdf5debug.c
+@@ -5,7 +5,7 @@
+ #include "config.h"
+ #include <stdarg.h>
+ #include <stdio.h>
+-#if !defined _WIN32 && !defined __CYGWIN__
++#ifdef HAVE_EXECINFO_H
+ #include <execinfo.h>
+ #endif
+
+@@ -15,15 +15,18 @@
+
+ #define STSIZE 1000
+
++#ifdef HAVE_EXECINFO_H
+ #ifdef H5BACKTRACE
+ #  if !defined _WIN32 && !defined __CYGWIN__
+ static void* stacktrace[STSIZE];
+ #  endif
+ #endif
++#endif
+
+ int
+ nch5breakpoint(int err)
+ {
++#ifdef HAVE_EXECINFO_H
+ #ifdef H5BACKTRACE
+ #  if !defined _WIN32 && !defined __CYGWIN__
+     int count = 0;
+@@ -39,6 +42,7 @@ nch5breakpoint(int err)
+     if(trace != NULL) free(trace);
+ #    endif
+ #  endif
++#endif
+ #endif
+     return err;
+ }

diff --git a/sci-libs/netcdf/netcdf-4.9.0.ebuild b/sci-libs/netcdf/netcdf-4.9.0.ebuild
index 8ffc629f18a2..651ca0381223 100644
--- a/sci-libs/netcdf/netcdf-4.9.0.ebuild
+++ b/sci-libs/netcdf/netcdf-4.9.0.ebuild
@@ -36,6 +36,7 @@ REQUIRED_USE="
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-4.7.4-big-endian-test.patch
+	"${FILESDIR}"/${PN}-4.9.0-fix-musl-execinfo_h.patch
 )
 
 src_configure() {


             reply	other threads:[~2022-07-15 12:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-15 12:49 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-12-19 14:47 [gentoo-commits] repo/gentoo:master commit in: sci-libs/netcdf/files/, sci-libs/netcdf/ Andreas Sturmlechner
2023-07-27 19:42 Andreas Sturmlechner

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=1657889202.400a204bea4aa72d51a0ef53260743c9f7ee0310.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.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