conda-forge / petsc-feedstock

A conda-smithy repository for petsc.
BSD 3-Clause "New" or "Revised" License
8 stars 23 forks source link

petsc v3.19.0 #159

Closed regro-cf-autotick-bot closed 1 year ago

regro-cf-autotick-bot commented 1 year ago

It is very likely that the current package version for this feedstock is out of date.

Checklist before merging this PR:

Information about this PR:

  1. Feel free to push to the bot's branch to update this PR if needed.
  2. The bot will almost always only open one PR per version.
  3. The bot will stop issuing PRs if more than 3 version bump PRs generated by the bot are open. If you don't want to package a particular version please close the PR.
  4. If you want these PRs to be merged automatically, make an issue with code>@conda-forge-admin,</codeplease add bot automerge in the title and merge the resulting PR. This command will add our bot automerge feature to your feedstock.
  5. If this PR was opened in error or needs to be updated please add the 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 the conda-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.

Name Upstream Version Current Version
python 3.11.2 Anaconda-Server Badge

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.

conda-forge-webservices[bot] commented 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.

dalcinl commented 1 year ago

@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.

balay commented 1 year ago

cc: @Jacobfaib

Jacobfaib commented 1 year ago

@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

dalcinl commented 1 year ago

@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.