Closed regro-cf-autotick-bot closed 1 year ago
Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe
) and found it was in an excellent condition.
@balay @BarrySmith I'm getting the following errors
In file included from $BUILD_PREFIX/x86_64-conda-linux-gnu/sysroot/usr/include/alloca.h:25,
from $BUILD_PREFIX/x86_64-conda-linux-gnu/sysroot/usr/include/stdlib.h:497,
from $SRC_DIR/include/petscsys.h:1395,
from $SRC_DIR/include/petscvec.h:9,
from $SRC_DIR/include/petsc/private/vecimpl.h:11,
from $SRC_DIR/include/../src/vec/vec/impls/nest/vecnestimpl.h:4,
from $SRC_DIR/src/vec/vec/impls/nest/vecnest.c:2:
$SRC_DIR/include/petsc/private/vecimpl.h:119:15: error: expected declaration specifiers or '...' before '__builtin_offsetof'
119 | static_assert(offsetof(struct _VecOps, duplicate) == sizeof(void (*)(void)) * VECOP_DUPLICATE, "");
The issue originates here. I guess PETSc requires an explicit configure test to use static_assert
.
I need a patch ASAP to get conda-forge packages out.
#if defined(offsetof) && (defined(__cplusplus) || (PETSC_C_VERSION >= 11))
#if (PETSC_C_VERSION >= 11) && (PETSC_C_VERSION < 23)
// static_assert() is a keyword since C23, before that defined as macro in assert.h
#include <assert.h>
#endif
static_assert(offsetof(struct _VecOps, duplicate) == sizeof(void (*)(void)) * VECOP_DUPLICATE, "");
static_assert(offsetof(struct _VecOps, set) == sizeof(void (*)(void)) * VECOP_SET, "");
static_assert(offsetof(struct _VecOps, view) == sizeof(void (*)(void)) * VECOP_VIEW, "");
static_assert(offsetof(struct _VecOps, load) == sizeof(void (*)(void)) * VECOP_LOAD, "");
static_assert(offsetof(struct _VecOps, viewnative) == sizeof(void (*)(void)) * VECOP_VIEWNATIVE, "");
static_assert(offsetof(struct _VecOps, loadnative) == sizeof(void (*)(void)) * VECOP_LOADNATIVE, "");
#endif
PS: PETSc is not a "modern" header-only C++ library/framework that excruciatingly needs static assertions in header files. IMHO, this kind of sanity check could very well be implemented in a runtime test.
cc: @Jacobfaib
@dalcinl hmmm what compiler is this? And do you have the compiler flag list? I can improve the ifdef to better filter out if compiler has static_assert() or not. Better to do this check in situ rather than from configure
@Jacobfaib The failures are in the logs from the builds here. The problem triggers on Linux/macOS x86_64 with gcc/clang with native compilation, but not when cross-compiling for aarch64,ppc64le/arm64. For the time being I added a patch removing these static_assert
uses in vecimpl.h
. I don't have time to further debug this issue.
It is very likely that the current package version for this feedstock is out of date.
Checklist before merging this PR:
license_file
is packagedInformation about this PR:
please add bot automerge
in the title and merge the resulting PR. This command will add our bot automerge feature to your feedstock.bot-rerun
label to this PR. The bot will close this PR and schedule another one. If you do not have permissions to add this label, you can use the phrase code>@<space/conda-forge-admin, please rerun bot in a PR comment to have theconda-forge-admin
add it for you.Pending Dependency Version Updates
Here is a list of all the pending dependency version updates for this repo. Please double check all dependencies before merging.
Dependency Analysis
We couldn't run dependency analysis due to an internal error in the bot. :/ Help is very welcome!
This PR was created by the regro-cf-autotick-bot. The regro-cf-autotick-bot is a service to automatically track the dependency graph, migrate packages, and propose package version updates for conda-forge. Feel free to drop us a line if there are any issues! This PR was generated by https://github.com/regro/cf-scripts/actions/runs/4569762953, please use this URL for debugging.