Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error showed when I install SeismicMesh #4426

Closed
acse-yw11823 opened this issue Jun 19, 2024 · 5 comments
Closed

error showed when I install SeismicMesh #4426

acse-yw11823 opened this issue Jun 19, 2024 · 5 comments

Comments

@acse-yw11823
Copy link

Hello, I meet the following error and it took me 5 hours for now.

(firedrake) yw11823@IC-FVFL80FW1WGC SeismicMesh % pip install -e .
Obtaining file:///Users/yw11823/ACSE/irp/SeismicMesh
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... done
  Preparing editable metadata (pyproject.toml) ... done
Requirement already satisfied: numpy in /Users/yw11823/ACSE/irp/firedrake/lib/python3.11/site-packages (from SeismicMesh==3.6.2) (1.24.0)
Requirement already satisfied: scipy in /Users/yw11823/ACSE/irp/firedrake/lib/python3.11/site-packages (from SeismicMesh==3.6.2) (1.13.1)
Requirement already satisfied: matplotlib in /Users/yw11823/ACSE/irp/firedrake/lib/python3.11/site-packages (from SeismicMesh==3.6.2) (3.9.0)
Requirement already satisfied: mpi4py in /Users/yw11823/ACSE/irp/firedrake/lib/python3.11/site-packages (from SeismicMesh==3.6.2) (3.1.6)
Collecting pyamg (from SeismicMesh==3.6.2)
  Using cached pyamg-5.1.0-cp311-cp311-macosx_11_0_arm64.whl.metadata (8.1 kB)
Collecting pytest-codeblocks (from SeismicMesh==3.6.2)
  Using cached pytest_codeblocks-0.17.0-py3-none-any.whl.metadata (5.4 kB)
Requirement already satisfied: contourpy>=1.0.1 in /Users/yw11823/ACSE/irp/firedrake/lib/python3.11/site-packages (from matplotlib->SeismicMesh==3.6.2) (1.2.1)
Requirement already satisfied: cycler>=0.10 in /Users/yw11823/ACSE/irp/firedrake/lib/python3.11/site-packages (from matplotlib->SeismicMesh==3.6.2) (0.12.1)
Requirement already satisfied: fonttools>=4.22.0 in /Users/yw11823/ACSE/irp/firedrake/lib/python3.11/site-packages (from matplotlib->SeismicMesh==3.6.2) (4.53.0)
Requirement already satisfied: kiwisolver>=1.3.1 in /Users/yw11823/ACSE/irp/firedrake/lib/python3.11/site-packages (from matplotlib->SeismicMesh==3.6.2) (1.4.5)
Requirement already satisfied: packaging>=20.0 in /Users/yw11823/ACSE/irp/firedrake/lib/python3.11/site-packages (from matplotlib->SeismicMesh==3.6.2) (24.0)
Requirement already satisfied: pillow>=8 in /Users/yw11823/ACSE/irp/firedrake/lib/python3.11/site-packages (from matplotlib->SeismicMesh==3.6.2) (10.3.0)
Requirement already satisfied: pyparsing>=2.3.1 in /Users/yw11823/ACSE/irp/firedrake/lib/python3.11/site-packages (from matplotlib->SeismicMesh==3.6.2) (3.1.2)
Requirement already satisfied: python-dateutil>=2.7 in /Users/yw11823/ACSE/irp/firedrake/lib/python3.11/site-packages (from matplotlib->SeismicMesh==3.6.2) (2.9.0.post0)
Requirement already satisfied: pytest>=7.0.0 in /Users/yw11823/ACSE/irp/firedrake/lib/python3.11/site-packages (from pytest-codeblocks->SeismicMesh==3.6.2) (8.2.2)
Requirement already satisfied: iniconfig in /Users/yw11823/ACSE/irp/firedrake/lib/python3.11/site-packages (from pytest>=7.0.0->pytest-codeblocks->SeismicMesh==3.6.2) (2.0.0)
Requirement already satisfied: pluggy<2.0,>=1.5 in /Users/yw11823/ACSE/irp/firedrake/lib/python3.11/site-packages (from pytest>=7.0.0->pytest-codeblocks->SeismicMesh==3.6.2) (1.5.0)
Requirement already satisfied: six>=1.5 in /Users/yw11823/ACSE/irp/firedrake/lib/python3.11/site-packages (from python-dateutil>=2.7->matplotlib->SeismicMesh==3.6.2) (1.16.0)
Using cached pyamg-5.1.0-cp311-cp311-macosx_11_0_arm64.whl (1.6 MB)
Using cached pytest_codeblocks-0.17.0-py3-none-any.whl (7.7 kB)
Building wheels for collected packages: SeismicMesh
  Building editable for SeismicMesh (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building editable for SeismicMesh (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [104 lines of output]
      running editable_wheel
      creating /private/var/folders/hx/g9tst_895vb2cxj5f1f0lghh0000gp/T/pip-wheel-6c52jwmi/.tmp-riglyols/SeismicMesh.egg-info
      writing /private/var/folders/hx/g9tst_895vb2cxj5f1f0lghh0000gp/T/pip-wheel-6c52jwmi/.tmp-riglyols/SeismicMesh.egg-info/PKG-INFO
      writing dependency_links to /private/var/folders/hx/g9tst_895vb2cxj5f1f0lghh0000gp/T/pip-wheel-6c52jwmi/.tmp-riglyols/SeismicMesh.egg-info/dependency_links.txt
      writing requirements to /private/var/folders/hx/g9tst_895vb2cxj5f1f0lghh0000gp/T/pip-wheel-6c52jwmi/.tmp-riglyols/SeismicMesh.egg-info/requires.txt
      writing top-level names to /private/var/folders/hx/g9tst_895vb2cxj5f1f0lghh0000gp/T/pip-wheel-6c52jwmi/.tmp-riglyols/SeismicMesh.egg-info/top_level.txt
      writing manifest file '/private/var/folders/hx/g9tst_895vb2cxj5f1f0lghh0000gp/T/pip-wheel-6c52jwmi/.tmp-riglyols/SeismicMesh.egg-info/SOURCES.txt'
      reading manifest file '/private/var/folders/hx/g9tst_895vb2cxj5f1f0lghh0000gp/T/pip-wheel-6c52jwmi/.tmp-riglyols/SeismicMesh.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      adding license file 'LICENSE.txt'
      writing manifest file '/private/var/folders/hx/g9tst_895vb2cxj5f1f0lghh0000gp/T/pip-wheel-6c52jwmi/.tmp-riglyols/SeismicMesh.egg-info/SOURCES.txt'
      creating '/private/var/folders/hx/g9tst_895vb2cxj5f1f0lghh0000gp/T/pip-wheel-6c52jwmi/.tmp-riglyols/SeismicMesh-3.6.2.dist-info'
      creating /private/var/folders/hx/g9tst_895vb2cxj5f1f0lghh0000gp/T/pip-wheel-6c52jwmi/.tmp-riglyols/SeismicMesh-3.6.2.dist-info/WHEEL
      running build_py
      running build_ext
      clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -I/Users/yw11823/ACSE/irp/firedrake/include -I/opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c flagcheck.cpp -o flagcheck.o -std=c++17
      building '_FastHJ' extension
      creating /var/folders/hx/g9tst_895vb2cxj5f1f0lghh0000gp/T/tmpcax2iw9r.build-temp/SeismicMesh
      creating /var/folders/hx/g9tst_895vb2cxj5f1f0lghh0000gp/T/tmpcax2iw9r.build-temp/SeismicMesh/sizing
      creating /var/folders/hx/g9tst_895vb2cxj5f1f0lghh0000gp/T/tmpcax2iw9r.build-temp/SeismicMesh/sizing/cpp
      clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -I/private/var/folders/hx/g9tst_895vb2cxj5f1f0lghh0000gp/T/pip-build-env-y4zy1wbi/overlay/lib/python3.11/site-packages/pybind11/include -I/Users/yw11823/ACSE/irp/firedrake/include -I/opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c SeismicMesh/sizing/cpp/FastHJ.cpp -o /var/folders/hx/g9tst_895vb2cxj5f1f0lghh0000gp/T/tmpcax2iw9r.build-temp/SeismicMesh/sizing/cpp/FastHJ.o -std=c++17 -mmacosx-version-min=10.14 -fvisibility=hidden -g0
      SeismicMesh/sizing/cpp/FastHJ.cpp:81:7: warning: unused variable 'maxSz' [-Wunused-variable]
        int maxSz = dims[0] * dims[1] * dims[2];
            ^
      1 warning generated.
      clang++ -bundle -undefined dynamic_lookup -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk /var/folders/hx/g9tst_895vb2cxj5f1f0lghh0000gp/T/tmpcax2iw9r.build-temp/SeismicMesh/sizing/cpp/FastHJ.o -lgmp -lmpfr -o /var/folders/hx/g9tst_895vb2cxj5f1f0lghh0000gp/T/tmpqd52a_3v.build-lib/_FastHJ.cpython-311-darwin.so -mmacosx-version-min=10.14
      ld: library 'gmp' not found
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      Traceback (most recent call last):
        File "/private/var/folders/hx/g9tst_895vb2cxj5f1f0lghh0000gp/T/pip-build-env-y4zy1wbi/overlay/lib/python3.11/site-packages/setuptools/_distutils/unixccompiler.py", line 269, in link
          self.spawn(linker + ld_args)
        File "/private/var/folders/hx/g9tst_895vb2cxj5f1f0lghh0000gp/T/pip-build-env-y4zy1wbi/overlay/lib/python3.11/site-packages/setuptools/_distutils/ccompiler.py", line 1041, in spawn
          spawn(cmd, dry_run=self.dry_run, **kwargs)
        File "/private/var/folders/hx/g9tst_895vb2cxj5f1f0lghh0000gp/T/pip-build-env-y4zy1wbi/overlay/lib/python3.11/site-packages/setuptools/_distutils/spawn.py", line 68, in spawn
          raise DistutilsExecError(f"command {cmd!r} failed with exit code {exitcode}")
      distutils.errors.DistutilsExecError: command '/usr/bin/clang++' failed with exit code 1
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/private/var/folders/hx/g9tst_895vb2cxj5f1f0lghh0000gp/T/pip-build-env-y4zy1wbi/overlay/lib/python3.11/site-packages/setuptools/command/editable_wheel.py", line 155, in run
          self._create_wheel_file(bdist_wheel)
        File "/private/var/folders/hx/g9tst_895vb2cxj5f1f0lghh0000gp/T/pip-build-env-y4zy1wbi/overlay/lib/python3.11/site-packages/setuptools/command/editable_wheel.py", line 357, in _create_wheel_file
          files, mapping = self._run_build_commands(dist_name, unpacked, lib, tmp)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/hx/g9tst_895vb2cxj5f1f0lghh0000gp/T/pip-build-env-y4zy1wbi/overlay/lib/python3.11/site-packages/setuptools/command/editable_wheel.py", line 280, in _run_build_commands
          self._run_build_subcommands()
        File "/private/var/folders/hx/g9tst_895vb2cxj5f1f0lghh0000gp/T/pip-build-env-y4zy1wbi/overlay/lib/python3.11/site-packages/setuptools/command/editable_wheel.py", line 307, in _run_build_subcommands
          self.run_command(name)
        File "/private/var/folders/hx/g9tst_895vb2cxj5f1f0lghh0000gp/T/pip-build-env-y4zy1wbi/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
          self.distribution.run_command(command)
        File "/private/var/folders/hx/g9tst_895vb2cxj5f1f0lghh0000gp/T/pip-build-env-y4zy1wbi/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 968, in run_command
          super().run_command(command)
        File "/private/var/folders/hx/g9tst_895vb2cxj5f1f0lghh0000gp/T/pip-build-env-y4zy1wbi/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/private/var/folders/hx/g9tst_895vb2cxj5f1f0lghh0000gp/T/pip-build-env-y4zy1wbi/overlay/lib/python3.11/site-packages/setuptools/command/build_ext.py", line 91, in run
          _build_ext.run(self)
        File "/private/var/folders/hx/g9tst_895vb2cxj5f1f0lghh0000gp/T/pip-build-env-y4zy1wbi/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 359, in run
          self.build_extensions()
        File "/private/var/folders/hx/g9tst_895vb2cxj5f1f0lghh0000gp/T/pip-build-env-y4zy1wbi/overlay/lib/python3.11/site-packages/pybind11/setup_helpers.py", line 287, in build_extensions
          super().build_extensions()
        File "/private/var/folders/hx/g9tst_895vb2cxj5f1f0lghh0000gp/T/pip-build-env-y4zy1wbi/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 479, in build_extensions
          self._build_extensions_serial()
        File "/private/var/folders/hx/g9tst_895vb2cxj5f1f0lghh0000gp/T/pip-build-env-y4zy1wbi/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 505, in _build_extensions_serial
          self.build_extension(ext)
        File "/private/var/folders/hx/g9tst_895vb2cxj5f1f0lghh0000gp/T/pip-build-env-y4zy1wbi/overlay/lib/python3.11/site-packages/setuptools/command/build_ext.py", line 252, in build_extension
          _build_ext.build_extension(self, ext)
        File "/private/var/folders/hx/g9tst_895vb2cxj5f1f0lghh0000gp/T/pip-build-env-y4zy1wbi/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 584, in build_extension
          self.compiler.link_shared_object(
        File "/private/var/folders/hx/g9tst_895vb2cxj5f1f0lghh0000gp/T/pip-build-env-y4zy1wbi/overlay/lib/python3.11/site-packages/setuptools/_distutils/ccompiler.py", line 752, in link_shared_object
          self.link(
        File "/private/var/folders/hx/g9tst_895vb2cxj5f1f0lghh0000gp/T/pip-build-env-y4zy1wbi/overlay/lib/python3.11/site-packages/setuptools/_distutils/unixccompiler.py", line 271, in link
          raise LinkError(msg)
      distutils.errors.LinkError: command '/usr/bin/clang++' failed with exit code 1
      /private/var/folders/hx/g9tst_895vb2cxj5f1f0lghh0000gp/T/pip-build-env-y4zy1wbi/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py:988: _DebuggingTips: Problem in editable installation.
      !!
      
              ********************************************************************************
              An error happened while installing `SeismicMesh` in editable mode.
      
              The following steps are recommended to help debug this problem:
      
              - Try to install the project normally, without using the editable mode.
                Does the error still persist?
                (If it does, try fixing the problem before attempting the editable mode).
              - If you are using binary extensions, make sure you have all OS-level
                dependencies installed (e.g. compilers, toolchains, binary libraries, ...).
              - Try the latest version of setuptools (maybe the error was already fixed).
              - If you (or your project dependencies) are using any setuptools extension
                or customization, make sure they support the editable mode.
      
              After following the steps above, if the problem still persists and
              you think this is related to how setuptools handles editable installations,
              please submit a reproducible example
              (see https://stackoverflow.com/help/minimal-reproducible-example) to:
      
                  https://github.com/pypa/setuptools/issues
      
              See https://setuptools.pypa.io/en/latest/userguide/development_mode.html for details.
              ********************************************************************************
      
      !!
        cmd_obj.run()
      error: command '/usr/bin/clang++' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building editable for SeismicMesh
Failed to build SeismicMesh
ERROR: Could not build wheels for SeismicMesh, which is required to install pyproject.toml-based projects

I tried everything so far, pls help me

@abravalheri
Copy link
Contributor

Hi @acse-yw11823 could you please write here what is the answer/conclusion for each one of the suggested debugging steps suggested in the error message?

@acse-yw11823
Copy link
Author

Hello!
I have installed mpfr gmp boost

 brew install mpfr gmp boost   

with the answer

(firedrake) (base) yw11823@IC-FVFL80FW1WGC demos % brew install mpfr gmp boost             
==> Downloading https://formulae.brew.sh/api/formula.jws.json
################################################################################################################################## 100.0%
==> Downloading https://formulae.brew.sh/api/cask.jws.json
################################################################################################################################## 100.0%
Warning: mpfr 4.2.1 is already installed and up-to-date.
To reinstall 4.2.1, run:
  brew reinstall mpfr
Warning: gmp 6.3.0 is already installed and up-to-date.
To reinstall 6.3.0, run:
  brew reinstall gmp
Warning: boost 1.85.0 is already installed and up-to-date.
To reinstall 1.85.0, run:
  brew reinstall boost

I have checked all the requirements using this link : https://seismicmesh.readthedocs.io/en/par3d/install.html#requirements

where python version is

(firedrake) (base) yw11823@IC-FVFL80FW1WGC demos % python --version
Python 3.11.9

pybind11 version is

(firedrake) (base) yw11823@IC-FVFL80FW1WGC demos % brew info pybind11
==> pybind11: stable 2.12.0 (bottled)
Seamless operability between C++11 and Python
https://github.com/pybind/pybind11
Installed
/opt/homebrew/Cellar/pybind11/2.12.0 (159 files, 2.5MB) *
  Poured from bottle using the formulae.brew.sh API on 2024-06-19 at 16:50:22
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/p/pybind11.rb
License: BSD-3-Clause
==> Dependencies
Build: cmake ✘, python-setuptools ✘, [email protected] ✔, [email protected] ✘
==> Analytics
install: 2,835 (30 days), 10,329 (90 days), 33,692 (365 days)
install-on-request: 626 (30 days), 2,470 (90 days), 8,704 (365 days)
build-error: 1 (30 days)

and the c++ version is

(firedrake) (base) yw11823@IC-FVFL80FW1WGC demos % c++ --version
Apple clang version 15.0.0 (clang-1500.1.0.2.5)
Target: arm64-apple-darwin23.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

and the cmake is

(firedrake) (base) yw11823@IC-FVFL80FW1WGC demos % cmake --version
cmake version 3.29.4

CMake suite maintained and supported by Kitware (kitware.com/cmake).

and the cgal is

(firedrake) (base) yw11823@IC-FVFL80FW1WGC demos % brew info cgal
==> cgal: stable 5.6.1 (bottled)
Computational Geometry Algorithms Library
https://www.cgal.org/
Installed
/opt/homebrew/Cellar/cgal/5.6.1 (3,722 files, 39.6MB) *
  Poured from bottle using the formulae.brew.sh API on 2024-06-19 at 15:57:50
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/c/cgal.rb
License: GPL-3.0-or-later
==> Dependencies
Build: cmake ✘, qt@5 ✘
Required: boost ✔, eigen ✔, gmp ✔, mpfr ✔
==> Analytics
install: 2,410 (30 days), 7,442 (90 days), 29,240 (365 days)
install-on-request: 1,140 (30 days), 4,352 (90 days), 16,014 (365 days)
build-error: 0 (30 days)

Many thanks

@abravalheri
Copy link
Contributor

I see that you got a better lead from Henry in pypa/packaging-problems#772 (comment). That tip sounds very promising.

Please also do look on the error message, there are additional debugging steps suggested there.

If Henry's tips are not related to the problem, please make sure to post the answer/conclusion of the debugging steps suggested in the error message.

@abravalheri
Copy link
Contributor

I will close this one for now as it seems to be handled in pypa/packaging-problems#772 using a different build backend.

@acse-yw11823
Copy link
Author

acse-yw11823 commented Jun 25, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants