diff --git a/Cast-function-pointer-types-so-they-can-be-compared-without-warnings.patch b/Cast-function-pointer-types-so-they-can-be-compared-without-warnings.patch new file mode 100644 index 0000000..e78e1b8 --- /dev/null +++ b/Cast-function-pointer-types-so-they-can-be-compared-without-warnings.patch @@ -0,0 +1,49 @@ +commit 4ae8e1670ea5495275bcf873cb2513302e56702a +Author: Scott Pakin +Date: Wed Feb 19 13:38:08 2020 -0700 + + Cast function pointer types so they can be compared without warnings + +diff --git src/coll.c src/coll.c +index 0ee5964fdd6a..890896a20b72 100644 +--- src/coll.c ++++ src/coll.c +@@ -122,7 +122,7 @@ static char *mpi_bcast_doc[] = { + DEFINE_BUILTIN(mpi_bcast, "mpi_bcast [message] name"); + + /* Define a reduction-type function (allreduce, scan, exscan, etc.). */ +-typedef int (*reduction_func_t)(void *, void *, int, MPI_Datatype, MPI_Op, MPI_Comm); ++typedef int (*reduction_func_t)(const void *, void *, int, MPI_Datatype, MPI_Op, MPI_Comm); + + /* Parse an operation name into an MPI_Op. Return 1 on success, 0 on + * failure. */ +@@ -213,25 +213,25 @@ reduction_like (WORD_LIST *list, char *funcname, reduction_func_t func) + /* Parse the target variable, which must not be read-only. */ + YES_ARGS(list); + varname = list->word->word; +- if (mpibash_rank != 0 || func != MPI_Exscan) ++ if (mpibash_rank != 0 || (void *)func != (void *)MPI_Exscan) + REQUIRE_WRITABLE(varname); + list = list->next; + no_args(list); + + /* Perform the reduction operation. Bind the given array variable + * to the result and, for minloc/maxloc, the associated rank. */ +- if (mpibash_rank != 0 || func != MPI_Exscan) { ++ if (mpibash_rank != 0 || (void *)func != (void *)MPI_Exscan) { + bind_array_variable(varname, 0, "", 0); + bind_array_variable(varname, 1, "", 0); + } + if (operation == MPI_MINLOC || operation == MPI_MAXLOC) { + MPI_TRY(func(&number, &result, 1, MPI_LONG_INT, operation, MPI_COMM_WORLD)); +- if (mpibash_rank != 0 || func != MPI_Exscan) ++ if (mpibash_rank != 0 || (void *)func != (void *)MPI_Exscan) + mpibash_bind_array_variable_number(varname, 1, result.rank, 0); + } + else + MPI_TRY(func(&number.value, &result.value, 1, MPI_LONG, operation, MPI_COMM_WORLD)); +- if (mpibash_rank != 0 || func != MPI_Exscan) ++ if (mpibash_rank != 0 || (void *)func != (void *)MPI_Exscan) + mpibash_bind_array_variable_number(varname, 0, result.value, 0); + return EXECUTION_SUCCESS; + } diff --git a/mpibash.changes b/mpibash.changes index f337b42..5049fe1 100644 --- a/mpibash.changes +++ b/mpibash.changes @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Thu Sep 5 13:29:03 UTC 2024 - Nicolas Morey + +- Add Cast-function-pointer-types-so-they-can-be-compared-without-warnings.patch + to fix compilation issues with GCC >= 14 +- Add workaround a missing bash function definition +------------------------------------------------------------------- Fri Feb 23 07:42:42 UTC 2024 - pgajdos@suse.com - Use %autosetup macro. Allows to eliminate the usage of deprecated diff --git a/mpibash.spec b/mpibash.spec index ac30758..42b4298 100644 --- a/mpibash.spec +++ b/mpibash.spec @@ -25,6 +25,7 @@ Group: Productivity/Networking/Other URL: https://github.com/lanl/MPI-Bash Source0: https://github.com/lanl/MPI-Bash/releases/download/v%{version}/mpibash-%{version}.tar.gz Patch0: Replace-deprecated-MPI_Errhandler_set-with-newer-MPI_Comm_set_errhandler.patch +Patch1: Cast-function-pointer-types-so-they-can-be-compared-without-warnings.patch BuildRequires: bash-devel >= 4.4 BuildRequires: libcircle-devel BuildRequires: openmpi-macros-devel @@ -55,6 +56,11 @@ This package contains example scripts for mpibash. %build %setup_openmpi +# This is to avoid an issue with execute_shell_function which is declared in +# /usr/include/bash/execute_cmd.h but it does not exists for "older" bash +# versions. Once updatig to v1.4 (which will require this header), this flag should +# be dropped +export CFLAGS="-Wno-implicit-function-declaration" %configure --docdir=%{_docdir}/%{name} --with-plugindir=%{_libdir}/%{name}/ CC=mpicc %make_build