Skip to content

Spack: compiling py-scifem fails on first try #147

@dajuno

Description

@dajuno

Hi,

I'm trying to install scifem using spack. The installation of scifem in a fresh environment always fails on the first attempt, although fenics-dolfinx and all dependencies compile successfully. Running spack install a second time will successfully install sci-fem.

  • Spack version: v1.0.2

  • minimal environment spack.yaml:

    spack:
      specs:
      - py-scifem ^openmpi
      view: true
      concretizer:
        unify: true
  • to reproduce:

    spack env create test-scifem spack.yaml
    spack concretize --fresh
    spack install

spack-build-out.txt:

==> py-scifem: Executing phase: 'install'
==> [2025-10-09-17:25:53.026479] '/home/david/work/dev/spack/opt/spack/linux-skylake/python-venv-1.0-ew4k26zoq5lmtyhk35aol7cshoozp43q/bin/python3' '-m' 'pip' '-vvv' '--no-input' '--no-cache-dir' '--disable-pip-version-check' 'install' '--no-deps' '--ignore-installed' '--no-build-isolation' '--no-warn-script-location' '--no-index' '--prefix=/home/david/work/dev/spack/opt/spack/linux-skylake/py-scifem-0.7.0-qhqjr5sidw63ldazqxoys456karz4jgu' '.'
Using pip 25.1.1 from /home/david/work/dev/spack/opt/spack/linux-skylake/py-pip-25.1.1-4kxv4gobwlmzxrd5mqqliyoqee5chfij/lib/python3.12/site-packages/pip (python 3.12)
Non-user install due to --prefix or --target option
Ignoring indexes: https://pypi.org/simple
Created temporary directory: /tmp/pip-build-tracker-ve25kr4y
Initialized build tracking at /tmp/pip-build-tracker-ve25kr4y
Created build tracker: /tmp/pip-build-tracker-ve25kr4y
Entered build tracker: /tmp/pip-build-tracker-ve25kr4y
Created temporary directory: /tmp/pip-install-d0nhzrxj
Created temporary directory: /tmp/pip-ephem-wheel-cache-s3hapshl
Processing /tmp/david/spack-stage/spack-stage-py-scifem-0.7.0-qhqjr5sidw63ldazqxoys456karz4jgu/spack-src
  Added file:///tmp/david/spack-stage/spack-stage-py-scifem-0.7.0-qhqjr5sidw63ldazqxoys456karz4jgu/spack-src to build tracker '/tmp/pip-build-tracker-ve25kr4y'
  Created temporary directory: /tmp/pip-modern-metadata-d2xm23qa
  Preparing metadata (pyproject.toml): started
  Running command Preparing metadata (pyproject.toml)
  *** scikit-build-core 0.11.5 using CMake 3.31.8 (metadata_wheel)
  Preparing metadata (pyproject.toml): finished with status 'done'
  Source in /tmp/david/spack-stage/spack-stage-py-scifem-0.7.0-qhqjr5sidw63ldazqxoys456karz4jgu/spack-src has version 0.6.0, which satisfies requirement scifem==0.6.0 from file:///tmp/david/spack-stage/spack-stage-py-scifem-0.7.0-qhqjr5sidw63ldazqxoys456karz4jgu/spack-src
  Removed scifem==0.6.0 from file:///tmp/david/spack-stage/spack-stage-py-scifem-0.7.0-qhqjr5sidw63ldazqxoys456karz4jgu/spack-src from build tracker '/tmp/pip-build-tracker-ve25kr4y'
Created temporary directory: /tmp/pip-unpack-2dapp3r_
Building wheels for collected packages: scifem
  Created temporary directory: /tmp/pip-wheel-vxb1dkyo
  Destination directory: /tmp/pip-wheel-vxb1dkyo
  Building wheel for scifem (pyproject.toml): started
  Running command Building wheel for scifem (pyproject.toml)
  *** scikit-build-core 0.11.5 using CMake 3.31.8 (wheel)
  *** Configuring CMake...
  loading initial cache file /tmp/tmpxhx8g5l1/build/CMakeInit.txt
  -- The C compiler identification is GNU 15.2.1
  -- The CXX compiler identification is GNU 15.2.1
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: /usr/bin/gcc - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: /home/david/work/dev/spack/opt/spack/linux-skylake/compiler-wrapper-1.0-ncfreugxt37tqdl4lwzni7mnevu5ccue/libexec/spack/gcc/g++ - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  CMake Error at CMakeLists.txt:29 (find_package):
    Could not find a package configuration file provided by "Basix" with any of
    the following names:

      BasixConfig.cmake
      basix-config.cmake

    Add the installation prefix of "Basix" to CMAKE_PREFIX_PATH or set
    "Basix_DIR" to a directory containing one of the above files.  If "Basix"
    provides a separate development package or SDK, be sure it has been
    installed.


  -- Configuring incomplete, errors occurred!

  *** CMake configuration failed
  error: subprocess-exited-with-error
  
  × Building wheel for scifem (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /home/david/work/dev/spack/opt/spack/linux-skylake/python-venv-1.0-ew4k26zoq5lmtyhk35aol7cshoozp43q/bin/python3 /home/david/work/dev/spack/opt/spack/linux-skylake/py-pip-25.1.1-4kxv4gobwlmzxrd5mqqliyoqee5chfij/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_wheel /tmp/tmpx73msjqh
  cwd: /tmp/david/spack-stage/spack-stage-py-scifem-0.7.0-qhqjr5sidw63ldazqxoys456karz4jgu/spack-src
  Building wheel for scifem (pyproject.toml): finished with status 'error'
  ERROR: Failed building wheel for scifem
Failed to build scifem
ERROR: Failed to build installable wheels for some pyproject.toml based projects (scifem)
Exception information:
Traceback (most recent call last):
  File "/home/david/work/dev/spack/opt/spack/linux-skylake/py-pip-25.1.1-4kxv4gobwlmzxrd5mqqliyoqee5chfij/lib/python3.12/site-packages/pip/_internal/cli/base_command.py", line 105, in _run_wrapper
    status = _inner_run()
             ^^^^^^^^^^^^
  File "/home/david/work/dev/spack/opt/spack/linux-skylake/py-pip-25.1.1-4kxv4gobwlmzxrd5mqqliyoqee5chfij/lib/python3.12/site-packages/pip/_internal/cli/base_command.py", line 96, in _inner_run
    return self.run(options, args)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/david/work/dev/spack/opt/spack/linux-skylake/py-pip-25.1.1-4kxv4gobwlmzxrd5mqqliyoqee5chfij/lib/python3.12/site-packages/pip/_internal/cli/req_command.py", line 68, in wrapper
    return func(self, options, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/david/work/dev/spack/opt/spack/linux-skylake/py-pip-25.1.1-4kxv4gobwlmzxrd5mqqliyoqee5chfij/lib/python3.12/site-packages/pip/_internal/commands/install.py", line 436, in run
    raise InstallationError(
pip._internal.exceptions.InstallationError: Failed to build installable wheels for some pyproject.toml based projects (scifem)
Removed build tracker: '/tmp/pip-build-tracker-ve25kr4y'

Output of spack spec -I:

 -   [email protected]~adios2~biomed~hdf5~petsc build_system=python_pip platform=linux os=arch target=skylake %[email protected]
[+]      ^[email protected]~doc+ncurses+ownlibs~qtgui build_system=generic build_type=Release platform=linux os=arch target=skylake %c,[email protected]
[+]          ^[email protected]~gssapi~ldap~libidn2~librtmp~libssh~libssh2+nghttp2 build_system=autotools libs:=shared,static tls:=openssl platform=linux os=arch target=skylake %c,[email protected]
[+]              ^[email protected] build_system=autotools platform=linux os=arch target=skylake %c,[email protected]
[+]              ^[email protected]+cpanm+opcode+open+shared+threads build_system=generic platform=linux os=arch target=skylake %[email protected]
[+]                  ^[email protected]+cxx~docs+stl build_system=autotools patches:=26090f4,b231fcc platform=linux os=arch target=skylake %c,[email protected]
[+]          ^[email protected]~guile build_system=generic platform=linux os=arch target=skylake %[email protected]
[+]          ^[email protected]~symlinks+termlib abi=none build_system=autotools patches:=7a351bc platform=linux os=arch target=skylake %c,[email protected]
[+]          ^[email protected]+compat+new_strategies+opt+pic+shared build_system=autotools platform=linux os=arch target=skylake %c,[email protected]
[+]      ^[email protected] build_system=generic platform=linux os=arch target=skylake 
[e]      ^[email protected]~binutils+bootstrap~graphite~mold~nvptx~piclibs~profiled~strip build_system=autotools build_type=RelWithDebInfo languages:='c,c++,fortran' platform=linux os=arch target=skylake 
[+]      ^[email protected] build_system=generic platform=linux os=arch target=skylake 
[e]      ^[email protected] build_system=autotools platform=linux os=arch target=skylake 
[+]      ^[email protected]~petsc4py~slepc4py build_system=python_pip platform=linux os=arch target=skylake %[email protected]
[+]          ^[email protected]~ipo build_system=cmake build_type=Release generator=make platform=linux os=arch target=skylake %[email protected]
[+]          ^[email protected]~adios2~ipo~petsc~slepc build_system=cmake build_type=Release generator=make partitioners:=parmetis platform=linux os=arch target=skylake %c,[email protected]
[+]              ^[email protected]~atomic~charconv~chrono~clanglibcpp~cobalt~container~context~contract~coroutine~date_time~debug~exception~fiber~filesystem~graph~graph_parallel~icu~iostreams~json~locale~log~math~mpi~mqtt5+multithreaded~nowide~numpy~pic~program_options~python~random~regex~serialization+shared~signals2~singlethreaded~stacktrace~system~taggedlayout~test~thread+timer~type_erasure~url~versionedlayout~wave build_system=generic cxxstd=11 patches:=a440f96 visibility=hidden platform=linux os=arch target=skylake %c,[email protected]
[+]              ^[email protected]~ipo build_system=cmake build_type=Release generator=make platform=linux os=arch target=skylake 
[+]              ^[email protected]+atomics~cuda~debug+fortran~gpfs~internal-hwloc~internal-libevent~internal-pmix~ipv6~java~lustre~memchecker~openshmem~rocm~romio+rsh~static~two_level_namespace+vt+wrapper-rpath build_system=autotools fabrics:=none romio-filesystem:=none schedulers:=none platform=linux os=arch target=skylake %c,cxx,[email protected]
[+]                  ^[email protected] build_system=autotools platform=linux os=arch target=skylake 
[+]                      ^[email protected]+sigsegv build_system=autotools platform=linux os=arch target=skylake %c,[email protected]
[+]                          ^[email protected] build_system=autotools platform=linux os=arch target=skylake %[email protected]
[+]                  ^[email protected] build_system=autotools platform=linux os=arch target=skylake %[email protected]
[+]                  ^[email protected]~cairo~cuda~gl~level_zero~libudev+libxml2~nvml~opencl+pci~rocm build_system=autotools libs:=shared,static platform=linux os=arch target=skylake %c,[email protected]
[+]                      ^[email protected] build_system=autotools platform=linux os=arch target=skylake %[email protected]
[+]                          ^[email protected] build_system=autotools platform=linux os=arch target=skylake 
[+]                  ^[email protected]+openssl build_system=autotools platform=linux os=arch target=skylake %[email protected]
[+]                  ^[email protected] build_system=autotools platform=linux os=arch target=skylake %[email protected]
[+]                      ^[email protected] build_system=autotools patches:=440b954 platform=linux os=arch target=skylake %[email protected]
[+]                  ^[email protected] build_system=autotools platform=linux os=arch target=skylake %[email protected]
[+]                  ^[email protected]+gssapi build_system=autotools platform=linux os=arch target=skylake %c,[email protected]
[+]                      ^[email protected]+shared build_system=autotools platform=linux os=arch target=skylake %c,[email protected]
[+]                          ^[email protected]~color build_system=autotools platform=linux os=arch target=skylake %c,[email protected]
[+]                      ^[email protected] build_system=autotools platform=linux os=arch target=skylake %[email protected]
[+]                  ^[email protected]~munge~python build_system=autotools platform=linux os=arch target=skylake %[email protected]
[+]                  ^[email protected] build_system=autotools platform=linux os=arch target=skylake %[email protected]
[+]                      ^[email protected]+lex~nls build_system=autotools platform=linux os=arch target=skylake %c,[email protected]
[+]              ^[email protected]~gdb~int64~ipo+shared build_system=cmake build_type=Release generator=make patches:=4f89253,50ed208,704b84f platform=linux os=arch target=skylake %c,[email protected]
[+]                  ^[email protected]~gdb~int64~ipo~no_warning~real64+shared build_system=cmake build_type=Release generator=make patches:=4991da9,93a7903,b1225da platform=linux os=arch target=skylake %c,[email protected]
[+]              ^[email protected]~ipo+pic+shared build_system=cmake build_type=Release generator=make platform=linux os=arch target=skylake %[email protected]
[+]              ^[email protected]~ipo+shared build_system=cmake build_type=Release generator=make patches:=fdc325d platform=linux os=arch target=skylake %[email protected]
[+]                  ^[email protected]~ipo+pic~shared build_system=cmake build_type=Release cxxstd=11 generator=make platform=linux os=arch target=skylake %c,[email protected]
[+]          ^[email protected]~cxx~fortran~hl~ipo~java~map+mpi+shared~subfiling~szip~threadsafe+tools api=default build_system=cmake build_type=Release generator=make platform=linux os=arch target=skylake %[email protected]
[+]          ^[email protected] build_system=autotools platform=linux os=arch target=skylake %[email protected]
[+]          ^[email protected] build_system=python_pip platform=linux os=arch target=skylake %[email protected]
[+]              ^[email protected] build_system=python_pip platform=linux os=arch target=skylake %[email protected]
[+]          ^[email protected] build_system=python_pip platform=linux os=arch target=skylake %[email protected]
[+]          ^[email protected] build_system=python_pip platform=linux os=arch target=skylake 
[+]          ^[email protected] build_system=python_pip platform=linux os=arch target=skylake 
[+]          ^[email protected] build_system=python_pip platform=linux os=arch target=skylake %[email protected]
[+]      ^[email protected] build_system=python_pip commit=0e7aa61a75052034453cd2b906a79fe222792697 platform=linux os=arch target=skylake %[email protected]
[+]      ^[email protected] build_system=python_pip patches:=873745d platform=linux os=arch target=skylake %c,[email protected]
[+]          ^[email protected]~bignuma~consistent_fpcsr+dynamic_dispatch+fortran~ilp64+locking+pic+shared build_system=makefile symbol_suffix=none threads=none platform=linux os=arch target=skylake %c,cxx,[email protected]
[+]          ^[email protected] build_system=python_pip platform=linux os=arch target=skylake %c,[email protected]
[+]          ^[email protected] build_system=python_pip platform=linux os=arch target=skylake %[email protected]
[+]              ^[email protected] build_system=python_pip patches:=0f0b1bd platform=linux os=arch target=skylake 
[+]              ^[email protected]+re2c build_system=generic platform=linux os=arch target=skylake %c,[email protected]
[+]                  ^[email protected] build_system=autotools platform=linux os=arch target=skylake %c,[email protected]
[+]              ^[email protected] build_system=python_pip platform=linux os=arch target=skylake 
[+]      ^[email protected] build_system=python_pip platform=linux os=arch target=skylake 
[+]          ^[email protected] build_system=python_pip platform=linux os=arch target=skylake 
[+]      ^[email protected] build_system=generic platform=linux os=arch target=skylake 
[+]      ^[email protected]+pyproject build_system=python_pip platform=linux os=arch target=skylake %c,cxx,[email protected]
[+]          ^[email protected] build_system=python_pip platform=linux os=arch target=skylake 
[+]              ^[email protected]+toml build_system=python_pip platform=linux os=arch target=skylake 
[+]                  ^[email protected]+man+nls+perl+subtree~svn~tcltk build_system=autotools platform=linux os=arch target=skylake %[email protected]
[+]                      ^[email protected] build_system=autotools platform=linux os=arch target=skylake %[email protected]
[+]                          ^[email protected] build_system=autotools platform=linux os=arch target=skylake %[email protected]
[+]                      ^[email protected]~jit+multibyte+pic build_system=autotools platform=linux os=arch target=skylake %[email protected]
[+]          ^[email protected] build_system=python_pip platform=linux os=arch target=skylake 
[+]              ^[email protected] build_system=python_pip platform=linux os=arch target=skylake 
[+]              ^[email protected] build_system=python_pip platform=linux os=arch target=skylake 
[+]                  ^[email protected] build_system=python_pip platform=linux os=arch target=skylake 
[+]          ^[email protected] build_system=python_pip platform=linux os=arch target=skylake 
[+]      ^[email protected] build_system=generic platform=linux os=arch target=skylake 
[+]      ^[email protected] build_system=generic platform=linux os=arch target=skylake 
[+]      ^[email protected]+bz2+crypt+ctypes+dbm~debug+libxml2+lzma~optimizations+pic+pyexpat+pythoncmd+readline+shared+sqlite3+ssl~tkinter+uuid+zlib build_system=generic platform=linux os=arch target=skylake %c,[email protected]
[+]          ^[email protected]~debug~pic+shared build_system=generic platform=linux os=arch target=skylake %[email protected]
[+]              ^[email protected] build_system=autotools platform=linux os=arch target=skylake %[email protected]
[+]          ^[email protected]+libbsd build_system=autotools platform=linux os=arch target=skylake %c,[email protected]
[+]              ^[email protected] build_system=autotools platform=linux os=arch target=skylake %[email protected]
[+]                  ^[email protected] build_system=autotools platform=linux os=arch target=skylake %[email protected]
[+]          ^[email protected] build_system=autotools platform=linux os=arch target=skylake %[email protected]
[+]          ^[email protected]+bzip2+curses+git~libunistring+libxml2+pic+shared+tar+xz build_system=autotools platform=linux os=arch target=skylake %c,[email protected]
[+]              ^[email protected] build_system=autotools libs:=shared,static platform=linux os=arch target=skylake %[email protected]
[+]              ^[email protected]~http+pic~python+shared build_system=autotools platform=linux os=arch target=skylake %[email protected]
[+]              ^[email protected] build_system=autotools zip=pigz platform=linux os=arch target=skylake %[email protected]
[+]                  ^[email protected] build_system=makefile platform=linux os=arch target=skylake %[email protected]
[+]                  ^[email protected]+programs build_system=makefile compression:=none libs:=shared,static platform=linux os=arch target=skylake %c,[email protected]
[+]          ^[email protected] build_system=autotools platform=linux os=arch target=skylake %c,[email protected]
[+]          ^[email protected]~obsolete_api build_system=autotools platform=linux os=arch target=skylake %[email protected]
[+]          ^[email protected]~docs+shared build_system=generic certs=mozilla platform=linux os=arch target=skylake %c,[email protected]
[+]              ^ca-certificates-mozilla@2025-05-20 build_system=generic platform=linux os=arch target=skylake 
[+]          ^[email protected] build_system=autotools patches:=21f0a03 platform=linux os=arch target=skylake %[email protected]
[+]          ^[email protected]+column_metadata+dynamic_extensions+fts~functions+rtree build_system=autotools platform=linux os=arch target=skylake %[email protected]
[+]          ^[email protected] build_system=autotools platform=linux os=arch target=skylake %[email protected]
[+]          ^[email protected]~pic build_system=autotools libs:=shared,static platform=linux os=arch target=skylake %[email protected]
[+]      ^[email protected] build_system=generic platform=linux os=arch target=skylake 

It would be nice to be able to install the environment in one go. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions