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

Struggling to get VMEC to run on MacOS #11

Open
killah-t-cell opened this issue Jul 9, 2022 · 1 comment
Open

Struggling to get VMEC to run on MacOS #11

killah-t-cell opened this issue Jul 9, 2022 · 1 comment

Comments

@killah-t-cell
Copy link

I am trying to install the Python VMEC extension for Mac, but keep getting an error related to _f2py_runtime_library. The main error seems to be:

CMake Error at /private/var/folders/w9/y85j6mld4459qyg6n1qphmvm0000gn/T/pip-build-env-1gcs_583/overlay/lib/python3.9/site-packages/skbuild/resources/cmake/FindF2PY.cmake:92 (add_library):
        No SOURCES given to target: _f2py_runtime_library

But I thought f2py was a numpy thing (which I do have installed) so I'm not sure what I could do here. Any ideas?

Here's the full output:

Processing /Users/gabrielbirnbaum/VMEC2000
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: f90wrap in /Users/gabrielbirnbaum/opt/miniconda3/lib/python3.9/site-packages (from vmec==0.0.4) (0.2.7)
Requirement already satisfied: numpy>=1.13 in /Users/gabrielbirnbaum/opt/miniconda3/lib/python3.9/site-packages (from f90wrap->vmec==0.0.4) (1.23.1)
Building wheels for collected packages: vmec
  Building wheel for vmec (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for vmec (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [92 lines of output]
      Not searching for unused variables given on the command line.
      -- The C compiler identification is AppleClang 13.1.6.13160021
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - done
      -- Check for working C compiler: /usr/bin/clang - skipped
      -- Detecting C compile features
      -- Detecting C compile features - done
      -- The CXX compiler identification is AppleClang 13.1.6.13160021
      -- Detecting CXX compiler ABI info
      -- Detecting CXX compiler ABI info - done
      -- Check for working CXX compiler: /usr/bin/clang - skipped
      -- Detecting CXX compile features
      -- Detecting CXX compile features - done
      -- Configuring done
      -- Generating done
      -- Build files have been written to: /Users/gabrielbirnbaum/VMEC2000/_cmake_test_compile/build
      -- NETCDF_INC_PATH is /usr/local/include
      -- NETCDF_I value is /usr/local/include/netcdf.inc
      -- NETCDF_F value is /usr/local/lib/libnetcdff.dylib
      -- NETCDF_C value is /opt/local/lib/libnetcdf.dylib
      -- Using netcdf
      -- scalapack_lib is /usr/local/lib/libscalapack.dylib
      -- updated scalapack_lib is /usr/local/lib/libscalapack.dylib
      -- vmec linked libraries are /usr/local/lib/libnetcdff.dylib;/opt/local/lib/libnetcdf.dylib;/usr/local/lib/libscalapack.dylib;/opt/local/lib/libopenblas.dylib;/opt/local/lib/libopenblas.dylib;/opt/local/lib/libopenblas.dylib
      -- Compile definitions for preprocessor are MPI_OPT;MACOSX;NETCDF;MRC
      -- fortran_src_files is /Users/gabrielbirnbaum/VMEC2000/python/fortran_src/runvmec.f;/Users/gabrielbirnbaum/VMEC2000/python/fortran_src/reinit.f90;/Users/gabrielbirnbaum/VMEC2000/python/fortran_src/cleanup.f90;/Users/gabrielbirnbaum/VMEC2000/python/fortran_src/vmec_input.f;/Users/gabrielbirnbaum/VMEC2000/python/fortran_src/read_wout_mod.f90
      -- preprocess_fortran arguments: fpp_files, followed by /Users/gabrielbirnbaum/VMEC2000/python/fortran_src/runvmec.f;/Users/gabrielbirnbaum/VMEC2000/python/fortran_src/reinit.f90;/Users/gabrielbirnbaum/VMEC2000/python/fortran_src/cleanup.f90;/Users/gabrielbirnbaum/VMEC2000/python/fortran_src/vmec_input.f;/Users/gabrielbirnbaum/VMEC2000/python/fortran_src/read_wout_mod.f90
      -- Got fortran file: /Users/gabrielbirnbaum/VMEC2000/python/fortran_src/runvmec.f
      -- Output name: /Users/gabrielbirnbaum/VMEC2000/_skbuild/macosx-10.16-x86_64-3.9/cmake-build/python/runvmec_fpp.f
      -- Got fortran file: /Users/gabrielbirnbaum/VMEC2000/python/fortran_src/reinit.f90
      -- Output name: /Users/gabrielbirnbaum/VMEC2000/_skbuild/macosx-10.16-x86_64-3.9/cmake-build/python/reinit_fpp.f90
      -- Got fortran file: /Users/gabrielbirnbaum/VMEC2000/python/fortran_src/cleanup.f90
      -- Output name: /Users/gabrielbirnbaum/VMEC2000/_skbuild/macosx-10.16-x86_64-3.9/cmake-build/python/cleanup_fpp.f90
      -- Got fortran file: /Users/gabrielbirnbaum/VMEC2000/python/fortran_src/vmec_input.f
      -- Output name: /Users/gabrielbirnbaum/VMEC2000/_skbuild/macosx-10.16-x86_64-3.9/cmake-build/python/vmec_input_fpp.f
      -- Got fortran file: /Users/gabrielbirnbaum/VMEC2000/python/fortran_src/read_wout_mod.f90
      -- Output name: /Users/gabrielbirnbaum/VMEC2000/_skbuild/macosx-10.16-x86_64-3.9/cmake-build/python/read_wout_mod_fpp.f90
      -- fpp_files is /Users/gabrielbirnbaum/VMEC2000/_skbuild/macosx-10.16-x86_64-3.9/cmake-build/python/runvmec_fpp.f;/Users/gabrielbirnbaum/VMEC2000/_skbuild/macosx-10.16-x86_64-3.9/cmake-build/python/reinit_fpp.f90;/Users/gabrielbirnbaum/VMEC2000/_skbuild/macosx-10.16-x86_64-3.9/cmake-build/python/cleanup_fpp.f90;/Users/gabrielbirnbaum/VMEC2000/_skbuild/macosx-10.16-x86_64-3.9/cmake-build/python/vmec_input_fpp.f;/Users/gabrielbirnbaum/VMEC2000/_skbuild/macosx-10.16-x86_64-3.9/cmake-build/python/read_wout_mod_fpp.f90
      -- Python exten suffix expansion: .cpython-39-darwin.so
      -- f90_wrap_output_files: /Users/gabrielbirnbaum/VMEC2000/_skbuild/macosx-10.16-x86_64-3.9/cmake-build/python/f90wrap_toplevel.f90/Users/gabrielbirnbaum/VMEC2000/_skbuild/macosx-10.16-x86_64-3.9/cmake-build/python/f90wrap_read_wout_mod.f90/Users/gabrielbirnbaum/VMEC2000/_skbuild/macosx-10.16-x86_64-3.9/cmake-build/python/f90wrap_vmec_input.f90
      -- f2py_module_name: _vmec
      -- generated_module_name: /Users/gabrielbirnbaum/VMEC2000/_skbuild/macosx-10.16-x86_64-3.9/cmake-build/python/_vmec.cpython-39-darwin.so
      -- Configuring done
      CMake Error at /private/var/folders/w9/y85j6mld4459qyg6n1qphmvm0000gn/T/pip-build-env-1gcs_583/overlay/lib/python3.9/site-packages/skbuild/resources/cmake/FindF2PY.cmake:92 (add_library):
        No SOURCES given to target: _f2py_runtime_library
      Call Stack (most recent call first):
        python/CMakeLists.txt:10 (find_package)
      
      
      CMake Generate step failed.  Build files cannot be regenerated correctly.
        File "/private/var/folders/w9/y85j6mld4459qyg6n1qphmvm0000gn/T/pip-build-env-1gcs_583/overlay/lib/python3.9/site-packages/skbuild/setuptools_wrap.py", line 637, in setup
          env = cmkr.configure(
        File "/private/var/folders/w9/y85j6mld4459qyg6n1qphmvm0000gn/T/pip-build-env-1gcs_583/overlay/lib/python3.9/site-packages/skbuild/cmaker.py", line 328, in configure
          raise SKBuildError(
      system.platform is darwin
      
      
      --------------------------------------------------------------------------------
      -- Trying "Ninja" generator
      --------------------------------
      ---------------------------
      ----------------------
      -----------------
      ------------
      -------
      --
      --
      -------
      ------------
      -----------------
      ----------------------
      ---------------------------
      --------------------------------
      -- Trying "Ninja" generator - success
      --------------------------------------------------------------------------------
      
      Configuring Project
        Working directory:
          /Users/gabrielbirnbaum/VMEC2000/_skbuild/macosx-10.16-x86_64-3.9/cmake-build
        Command:
          cmake /Users/gabrielbirnbaum/VMEC2000 -G Ninja -DCMAKE_INSTALL_PREFIX:PATH=/Users/gabrielbirnbaum/VMEC2000/_skbuild/macosx-10.16-x86_64-3.9/cmake-install -DPYTHON_VERSION_STRING:STRING=3.9.1 -DSKBUILD:INTERNAL=TRUE -DCMAKE_MODULE_PATH:PATH=/private/var/folders/w9/y85j6mld4459qyg6n1qphmvm0000gn/T/pip-build-env-1gcs_583/overlay/lib/python3.9/site-packages/skbuild/resources/cmake -DPython3_EXECUTABLE:FILEPATH=/Users/gabrielbirnbaum/opt/miniconda3/bin/python -DPython3_INCLUDE_DIR:PATH=/Users/gabrielbirnbaum/opt/miniconda3/include/python3.9 -DPython3_LIBRARY:PATH=/Users/gabrielbirnbaum/opt/miniconda3/lib/libpython3.9.dylib -DPython3_NumPy_INCLUDE_DIRS:PATH=/private/var/folders/w9/y85j6mld4459qyg6n1qphmvm0000gn/T/pip-build-env-1gcs_583/overlay/lib/python3.9/site-packages/numpy/core/include -DPython_EXECUTABLE:FILEPATH=/Users/gabrielbirnbaum/opt/miniconda3/bin/python -DPython_INCLUDE_DIR:PATH=/Users/gabrielbirnbaum/opt/miniconda3/include/python3.9 -DPython_LIBRARY:PATH=/Users/gabrielbirnbaum/opt/miniconda3/lib/libpython3.9.dylib -DPython_NumPy_INCLUDE_DIRS:PATH=/private/var/folders/w9/y85j6mld4459qyg6n1qphmvm0000gn/T/pip-build-env-1gcs_583/overlay/lib/python3.9/site-packages/numpy/core/include -DPYTHON_EXECUTABLE:FILEPATH=/Users/gabrielbirnbaum/opt/miniconda3/bin/python -DPYTHON_INCLUDE_DIR:PATH=/Users/gabrielbirnbaum/opt/miniconda3/include/python3.9 -DPYTHON_LIBRARY:PATH=/Users/gabrielbirnbaum/opt/miniconda3/lib/libpython3.9.dylib -DPYTHON_NumPy_INCLUDE_DIRS:PATH=/private/var/folders/w9/y85j6mld4459qyg6n1qphmvm0000gn/T/pip-build-env-1gcs_583/overlay/lib/python3.9/site-packages/numpy/core/include -DCMAKE_MAKE_PROGRAM:FILEPATH=/private/var/folders/w9/y85j6mld4459qyg6n1qphmvm0000gn/T/pip-build-env-1gcs_583/overlay/lib/python3.9/site-packages/ninja/data/bin/ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang -DCMAKE_Fortran_COMPILER=mpif90 -DNETCDF_INC_PATH=/usr/local/include -DNETCDF_LIB_PATH=/usr/local/Cellar -DBLA_VENDOR=OpenBLAS -DSCALAPACK_LIB_NAME=mkl_scalapack_lp64 -DBLACS_LIB_NAME=mkl_blacs_mpich_lp64 -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.16 -DCMAKE_OSX_ARCHITECTURES:STRING=x86_64
      
      Traceback (most recent call last):
      
      An error occurred while configuring with CMake.
        Command:
          cmake /Users/gabrielbirnbaum/VMEC2000 -G Ninja -DCMAKE_INSTALL_PREFIX:PATH=/Users/gabrielbirnbaum/VMEC2000/_skbuild/macosx-10.16-x86_64-3.9/cmake-install -DPYTHON_VERSION_STRING:STRING=3.9.1 -DSKBUILD:INTERNAL=TRUE -DCMAKE_MODULE_PATH:PATH=/private/var/folders/w9/y85j6mld4459qyg6n1qphmvm0000gn/T/pip-build-env-1gcs_583/overlay/lib/python3.9/site-packages/skbuild/resources/cmake -DPython3_EXECUTABLE:FILEPATH=/Users/gabrielbirnbaum/opt/miniconda3/bin/python -DPython3_INCLUDE_DIR:PATH=/Users/gabrielbirnbaum/opt/miniconda3/include/python3.9 -DPython3_LIBRARY:PATH=/Users/gabrielbirnbaum/opt/miniconda3/lib/libpython3.9.dylib -DPython3_NumPy_INCLUDE_DIRS:PATH=/private/var/folders/w9/y85j6mld4459qyg6n1qphmvm0000gn/T/pip-build-env-1gcs_583/overlay/lib/python3.9/site-packages/numpy/core/include -DPython_EXECUTABLE:FILEPATH=/Users/gabrielbirnbaum/opt/miniconda3/bin/python -DPython_INCLUDE_DIR:PATH=/Users/gabrielbirnbaum/opt/miniconda3/include/python3.9 -DPython_LIBRARY:PATH=/Users/gabrielbirnbaum/opt/miniconda3/lib/libpython3.9.dylib -DPython_NumPy_INCLUDE_DIRS:PATH=/private/var/folders/w9/y85j6mld4459qyg6n1qphmvm0000gn/T/pip-build-env-1gcs_583/overlay/lib/python3.9/site-packages/numpy/core/include -DPYTHON_EXECUTABLE:FILEPATH=/Users/gabrielbirnbaum/opt/miniconda3/bin/python -DPYTHON_INCLUDE_DIR:PATH=/Users/gabrielbirnbaum/opt/miniconda3/include/python3.9 -DPYTHON_LIBRARY:PATH=/Users/gabrielbirnbaum/opt/miniconda3/lib/libpython3.9.dylib -DPYTHON_NumPy_INCLUDE_DIRS:PATH=/private/var/folders/w9/y85j6mld4459qyg6n1qphmvm0000gn/T/pip-build-env-1gcs_583/overlay/lib/python3.9/site-packages/numpy/core/include -DCMAKE_MAKE_PROGRAM:FILEPATH=/private/var/folders/w9/y85j6mld4459qyg6n1qphmvm0000gn/T/pip-build-env-1gcs_583/overlay/lib/python3.9/site-packages/ninja/data/bin/ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang -DCMAKE_Fortran_COMPILER=mpif90 -DNETCDF_INC_PATH=/usr/local/include -DNETCDF_LIB_PATH=/usr/local/Cellar -DBLA_VENDOR=OpenBLAS -DSCALAPACK_LIB_NAME=mkl_scalapack_lp64 -DBLACS_LIB_NAME=mkl_blacs_mpich_lp64 -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.16 -DCMAKE_OSX_ARCHITECTURES:STRING=x86_64
        Source directory:
          /Users/gabrielbirnbaum/VMEC2000
        Working directory:
          /Users/gabrielbirnbaum/VMEC2000/_skbuild/macosx-10.16-x86_64-3.9/cmake-build
      Please see CMake's output for more information.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for vmec
Failed to build vmec
ERROR: Could not build wheels for vmec, which is required to install pyproject.toml-based projects
@mishapadidar
Copy link

I have also run into this same issue. Has this been resolved @killah-t-cell ?

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