Thanks a lot for the solution. It works by skipping the tests in your suggested code.
Yet,
CXXFLAGS=${DOLFINX_CMAKE_CXX_FLAGS} PETSC_ARCH=linux-gnu-complex-32 pip3 install -
v --target $VENV_DIR/lib/python3.10/dist-packages --no-dependencies --no-cache-dir .
gives
Using pip 23.1.2 from /home/ufuk/venvs/fenicsx-src-test/fenicsx-src-test-venv/lib/python3.10/site-packages
/pip (python 3.10)
Processing /home/ufuk/venvs/fenicsx-src-test/fenicsx-src-test-venv/repos/src/dolfinx/python
Running command python setup.py egg_info
running egg_info
creating /tmp/pip-pip-egg-info-s7a6_h5k/fenics_dolfinx.egg-info
writing /tmp/pip-pip-egg-info-s7a6_h5k/fenics_dolfinx.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-pip-egg-info-s7a6_h5k/fenics_dolfinx.egg-info/dependency_links.txt
writing requirements to /tmp/pip-pip-egg-info-s7a6_h5k/fenics_dolfinx.egg-info/requires.txt
writing top-level names to /tmp/pip-pip-egg-info-s7a6_h5k/fenics_dolfinx.egg-info/top_level.txt
writing manifest file '/tmp/pip-pip-egg-info-s7a6_h5k/fenics_dolfinx.egg-info/SOURCES.txt'
reading manifest file '/tmp/pip-pip-egg-info-s7a6_h5k/fenics_dolfinx.egg-info/SOURCES.txt'
writing manifest file '/tmp/pip-pip-egg-info-s7a6_h5k/fenics_dolfinx.egg-info/SOURCES.txt'
Preparing metadata (setup.py) ... done
Building wheels for collected packages: fenics-dolfinx
Running command python setup.py bdist_wheel
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.10
creating build/lib.linux-x86_64-3.10/dolfinx
copying dolfinx/plot.py -> build/lib.linux-x86_64-3.10/dolfinx
copying dolfinx/la.py -> build/lib.linux-x86_64-3.10/dolfinx
copying dolfinx/mesh.py -> build/lib.linux-x86_64-3.10/dolfinx
copying dolfinx/geometry.py -> build/lib.linux-x86_64-3.10/dolfinx
copying dolfinx/graph.py -> build/lib.linux-x86_64-3.10/dolfinx
copying dolfinx/log.py -> build/lib.linux-x86_64-3.10/dolfinx
copying dolfinx/__init__.py -> build/lib.linux-x86_64-3.10/dolfinx
copying dolfinx/common.py -> build/lib.linux-x86_64-3.10/dolfinx
copying dolfinx/jit.py -> build/lib.linux-x86_64-3.10/dolfinx
copying dolfinx/pkgconfig.py -> build/lib.linux-x86_64-3.10/dolfinx
creating build/lib.linux-x86_64-3.10/dolfinx/fem
copying dolfinx/fem/function.py -> build/lib.linux-x86_64-3.10/dolfinx/fem
copying dolfinx/fem/forms.py -> build/lib.linux-x86_64-3.10/dolfinx/fem
copying dolfinx/fem/dofmap.py -> build/lib.linux-x86_64-3.10/dolfinx/fem
copying dolfinx/fem/__init__.py -> build/lib.linux-x86_64-3.10/dolfinx/fem
copying dolfinx/fem/assemble.py -> build/lib.linux-x86_64-3.10/dolfinx/fem
copying dolfinx/fem/petsc.py -> build/lib.linux-x86_64-3.10/dolfinx/fem
copying dolfinx/fem/bcs.py -> build/lib.linux-x86_64-3.10/dolfinx/fem
creating build/lib.linux-x86_64-3.10/dolfinx/io
copying dolfinx/io/gmshio.py -> build/lib.linux-x86_64-3.10/dolfinx/io
copying dolfinx/io/utils.py -> build/lib.linux-x86_64-3.10/dolfinx/io
copying dolfinx/io/__init__.py -> build/lib.linux-x86_64-3.10/dolfinx/io
creating build/lib.linux-x86_64-3.10/dolfinx/nls
copying dolfinx/nls/__init__.py -> build/lib.linux-x86_64-3.10/dolfinx/nls
copying dolfinx/nls/petsc.py -> build/lib.linux-x86_64-3.10/dolfinx/nls
creating build/lib.linux-x86_64-3.10/dolfinx/wrappers
copying dolfinx/wrappers/__init__.py -> build/lib.linux-x86_64-3.10/dolfinx/wrappers
copying dolfinx/py.typed -> build/lib.linux-x86_64-3.10/dolfinx
copying dolfinx/fem/py.typed -> build/lib.linux-x86_64-3.10/dolfinx/fem
copying dolfinx/nls/py.typed -> build/lib.linux-x86_64-3.10/dolfinx/nls
copying dolfinx/wrappers/caster_petsc.h -> build/lib.linux-x86_64-3.10/dolfinx/wrappers
copying dolfinx/wrappers/caster_mpi.h -> build/lib.linux-x86_64-3.10/dolfinx/wrappers
copying dolfinx/wrappers/array.h -> build/lib.linux-x86_64-3.10/dolfinx/wrappers
copying dolfinx/wrappers/MPICommWrapper.h -> build/lib.linux-x86_64-3.10/dolfinx/wrappers
running build_ext
-- Found MPI_C: /usr/lib/libmpi.so (found suitable version "3.1", minimum required is "3")
-- Found MPI_CXX: /usr/lib/libmpi_cxx.so (found suitable version "3.1", minimum required is "3")
-- Found MPI: TRUE (found suitable version "3.1", minimum required is "3")
-- Found Boost 1.81.0 at /usr/lib/cmake/Boost-1.81.0
-- Requested configuration: QUIET REQUIRED COMPONENTS timer
-- Found boost_headers 1.81.0 at /usr/lib/cmake/boost_headers-1.81.0
-- Found boost_timer 1.81.0 at /usr/lib/cmake/boost_timer-1.81.0
-- [x] libboost_timer.so.1.81.0
-- [ ] libboost_timer.a
-- Adding boost_timer dependencies: chrono;headers
-- Found boost_chrono 1.81.0 at /usr/lib/cmake/boost_chrono-1.81.0
-- [x] libboost_chrono.so.1.81.0
-- [ ] libboost_chrono.a
-- Adding boost_chrono dependencies: headers
-- Adding /home/ufuk/venvs/fenicsx-src-test/fenicsx-src-test-venv/lib/python3.10/site-packages/basix to
Basix search hints
-- Found PETSc version 3.17.2, prefix: /home/ufuk/venvs/fenicsx-src-test/fenicsx-src-test-venv/installat
ion/petsc/linux-gnu-complex-32
-- HDF5: Using hdf5 compiler wrapper to determine C configuration
-- HDF5_DIR: HDF5_DIR-NOTFOUND
-- HDF5_DEFINITIONS:
-- HDF5_INCLUDE_DIRS: /home/ufuk/venvs/fenicsx-src-test/fenicsx-src-test-venv/installation/hdf5/include
-- HDF5_LIBRARIES: /home/ufuk/venvs/fenicsx-src-test/fenicsx-src-test-venv/installation/hdf5/lib/libhdf5
.so;/usr/lib/libz.so;/usr/lib/libdl.a;/usr/lib/libm.so
-- HDF5_HL_LIBRARIES:
-- HDF5_C_DEFINITIONS:
-- HDF5_C_INCLUDE_DIR:
-- HDF5_C_INCLUDE_DIRS: /home/ufuk/venvs/fenicsx-src-test/fenicsx-src-test-venv/installation/hdf5/includ
e
-- HDF5_C_LIBRARY:
-- HDF5_C_LIBRARIES: /home/ufuk/venvs/fenicsx-src-test/fenicsx-src-test-venv/installation/hdf5/lib/libhd
f5.so;/usr/lib/libz.so;/usr/lib/libdl.a;/usr/lib/libm.so
-- HDF5_C_HL_LIBRARY:
-- HDF5_C_HL_LIBRARIES:
-- Defined targets (if any):
-- ... hdf5::hdf5
-- Asking Python module FFCx for location of UFC... (Python executable: /home/ufuk/venvs/fenicsx-src-tes
t/fenicsx-src-test-venv/bin/python)
-- Found MPI_C: /usr/lib/libmpi.so (found version "3.1")
-- Found MPI_CXX: /usr/lib/libmpi_cxx.so (found version "3.1")
-- Found MPI: TRUE (found version "3.1")
-- Found SLEPc version 3.17.1, prefix: /home/ufuk/venvs/fenicsx-src-test/fenicsx-src-test-venv/installat
ion/slepc/linux-gnu-complex-32
-- Checking for package 'SCOTCH-PT'
-- Found SCOTCH (version 6)
-- ParMETIS could not be found/configured. (missing: PARMETIS_INCLUDE_DIRS) (Required is at least versio
n "4.0.2")
-- The following features have been enabled:
* BUILD_SHARED_LIBS, Build DOLFINx with shared libraries.
* DOLFINX_SKIP_BUILD_TESTS, Skip build tests for testing usability of dependency packages.
* CMAKE_INSTALL_RPATH_USE_LINK_PATH, Add paths to linker search and installed rpath.
* DOLFINX_UFCX_PYTHON, Enable UFCx discovery using Python. Disable if UFCx should be found using a CMak
e config file.
-- The following OPTIONAL packages have been found:
* ADIOS2 (required version >= 2.8.1), Adaptable Input/Output (I/O) System., <https://adios2.readthedocs
.io/en/latest/>
IO, including in parallel
* SCOTCH, Programs and libraries for graph, mesh and hypergraph partitioning, <https://www.labri.fr/per
so/pelegrin/scotch>
Parallel graph partitioning
-- The following RECOMMENDED packages have been found:
* SLEPc, Scalable Library for Eigenvalue Problem Computations, <http://slepc.upv.es/>
Eigenvalue computation
-- The following REQUIRED packages have been found:
* pugixml
* boost_chrono (required version == 1.81.0)
* boost_headers (required version == 1.81.0)
* boost_timer (required version == 1.81.0)
* Boost (required version >= 1.70), Boost C++ libraries, <http://www.boost.org>
* Basix (required version >= 0.6)
* PETSc, Portable, Extensible Toolkit for Scientific Computation (PETSc), <https://www.mcs.anl.gov/pets
c/>
PETSc linear algebra backend
* HDF5, Hierarchical Data Format 5 (HDF5), <https://www.hdfgroup.org/HDF5>
* Python3
* UFCx (required version >= 0.6), Interface for form-compilers (part of FFCx), <https://github.com/feni
cs/ffcx>
* MPI
* PkgConfig
-- The following RECOMMENDED packages have not been found:
* ParMETIS (required version >= 4.0.2), Parallel Graph Partitioning and Fill-reducing Matrix Ordering,
<http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview>
Parallel graph partitioning
-- Configuring done (3.4s)
-- Generating done (0.0s)
-- Build files have been written to: /home/ufuk/venvs/fenicsx-src-test/fenicsx-src-test-venv/repos/src/d
olfinx/python
Error: could not load cache
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/home/ufuk/venvs/fenicsx-src-test/fenicsx-src-test-venv/repos/src/dolfinx/python/setup.py", line
69, in <module>
setup(name='fenics-dolfinx',
File "/home/ufuk/venvs/fenicsx-src-test/fenicsx-src-test-venv/lib/python3.10/site-packages/setuptools/
__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.10/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.10/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.10/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/ufuk/venvs/fenicsx-src-test/fenicsx-src-test-venv/lib/python3.10/site-packages/wheel/bdist
_wheel.py", line 343, in run
self.run_command("build")
File "/usr/lib/python3.10/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.10/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/lib/python3.10/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/lib/python3.10/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.10/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/ufuk/venvs/fenicsx-src-test/fenicsx-src-test-venv/repos/src/dolfinx/python/setup.py", line
41, in run
self.build_extension(ext)
File "/home/ufuk/venvs/fenicsx-src-test/fenicsx-src-test-venv/repos/src/dolfinx/python/setup.py", line
66, in build_extension
subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp, env=env)
File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release']' returned non-z
ero exit status 1.
error: subprocess-exited-with-error
× python setup.py bdist_wheel 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/ufuk/venvs/fenicsx-src-test/fenicsx-src-test-venv/bin/python -u -c '
exec(compile('"'"''"'"''"'"'
# This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
#
# - It imports setuptools before invoking setup.py, to enable projects that directly
# import from `distutils.core` to work with newer packaging standards.
# - It provides a clear error message when setuptools is not installed.
# - It sets `sys.argv[0]` to the underlying `setup.py`, when invoking `setup.py` so
# setuptools doesn'"'"'t think the script is `-c`. This avoids the following warning:
# manifest_maker: standard file '"'"'-c'"'"' not found".
# - It generates a shim setup.py, for handling setup.cfg-only projects.
import os, sys, tokenize
try:
import setuptools
except ImportError as error:
print(
"ERROR: Can not execute `setup.py` since setuptools is not available in "
"the build environment.",
file=sys.stderr,
)
sys.exit(1)
__file__ = %r
sys.argv[0] = __file__
if os.path.exists(__file__):
filename = __file__
with tokenize.open(__file__) as f:
setup_py_code = f.read()
else:
filename = "<auto-generated setuptools caller>"
setup_py_code = "from setuptools import setup; setup()"
exec(compile(setup_py_code, filename, "exec"))
'"'"''"'"''"'"' % ('"'"'/home/ufuk/venvs/fenicsx-src-test/fenicsx-src-test-venv/repos/src/dolfinx/python
/setup.py'"'"',), "<pip-setuptools-caller>", "exec"))' bdist_wheel -d /tmp/pip-wheel-mza6wvdr
cwd: /home/ufuk/venvs/fenicsx-src-test/fenicsx-src-test-venv/repos/src/dolfinx/python/
Building wheel for fenics-dolfinx (setup.py) ... error
ERROR: Failed building wheel for fenics-dolfinx
Running setup.py clean for fenics-dolfinx
Running command python setup.py clean
running clean
removing 'build/temp.linux-x86_64-3.10' (and everything under it)
removing 'build/lib.linux-x86_64-3.10' (and everything under it)
'build/bdist.linux-x86_64' does not exist -- can't clean it
'build/scripts-3.10' does not exist -- can't clean it
removing 'build'
Failed to build fenics-dolfinx
ERROR: Could not build wheels for fenics-dolfinx, which is required to install pyproject.toml-based projec
ts
I would be happy if you could suggest a solution.
Best,
Ufuk