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

proshade fails to compile on mac or linux via pip #4

Open
shahpnmlab opened this issue Mar 30, 2023 · 1 comment
Open

proshade fails to compile on mac or linux via pip #4

shahpnmlab opened this issue Mar 30, 2023 · 1 comment

Comments

@shahpnmlab
Copy link

Hi,
I am having troubles installing proshade on a Mac (M1, ventura) or Linux boxes (Centos 9) in a python3.8 conda env. Below is the traceback of the compilation error.

    Your CMake version is at least the recommended version. Allowing fast build and Python language binding to be created.
      -- The CXX compiler identification is AppleClang 14.0.0.14000029
      -- The C compiler identification is AppleClang 14.0.0.14000029
      -- Detecting CXX compiler ABI info
      -- Detecting CXX compiler ABI info - done
      -- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
      -- Detecting CXX compile features
      -- Detecting CXX compile features - done
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - done
      -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
      -- Detecting C compile features
      -- Detecting C compile features - done
      -- Found FFTW: /usr/local/lib
      -- FFTW3 library path is        : /usr/local/lib
      -- FFTW3 include path is        : /usr/local/include
      -- Looking for sgemm_
      -- Looking for sgemm_ - not found
      -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
      -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
      -- Found Threads: TRUE
      -- Looking for dgemm_
      -- Looking for dgemm_ - found
      -- Found BLAS: /Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/System/Library/Frameworks/Accelerate.framework
      -- Looking for cheev_
      -- Looking for cheev_ - found
      -- A library with LAPACK API found.
      -- Found LAPACK library in      : /Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/System/Library/Frameworks
      -- SOFT library path is         : /private/var/folders/lv/7pkpq1zs14v7rxh_0_f9j0jh0000gn/T/pip-install-ujaguaf2/proshade_9ff5caf6f77d487697e5a0182e3dd774/proshade/extern/soft-2.0
      -- SOFT include path is         : /private/var/folders/lv/7pkpq1zs14v7rxh_0_f9j0jh0000gn/T/pip-install-ujaguaf2/proshade_9ff5caf6f77d487697e5a0182e3dd774/proshade/extern/soft-2.0/include
      -- Installation is set to       : /private/var/folders/lv/7pkpq1zs14v7rxh_0_f9j0jh0000gn/T/pip-install-ujaguaf2/proshade_9ff5caf6f77d487697e5a0182e3dd774/proshade/install
      -- pybind11 v2.6.2 dev1
      -- Found PythonInterp: /Users/ps/software/miniforge3/envs/va/bin/python3.8 (found version "3.8.16")
      -- Found PythonLibs: /Users/ps/software/miniforge3/envs/va/lib/libpython3.8.dylib
      -- Performing Test HAS_FLTO
      -- Performing Test HAS_FLTO - Success
      -- Performing Test HAS_FLTO_THIN
      -- Performing Test HAS_FLTO_THIN - Success
      -- Configuring done
      -- Generating done
      -- Build files have been written to: /private/var/folders/lv/7pkpq1zs14v7rxh_0_f9j0jh0000gn/T/pip-install-ujaguaf2/proshade_9ff5caf6f77d487697e5a0182e3dd774/build/temp.macosx-10.9-x86_64-cpython-38
      [  8%] Built target gemmi_lib
      [  8%] Built target soft2_lib
      [ 16%] Building CXX object cmake/sources/CMakeFiles/compileObjs.dir/__/__/src/proshade/ProSHADE.cpp.o
      [ 16%] Building CXX object cmake/sources/CMakeFiles/compileObjs.dir/__/__/src/proshade/ProSHADE_data.cpp.o
      [ 20%] Building CXX object cmake/sources/CMakeFiles/compileObjs.dir/__/__/src/proshade/ProSHADE_distances.cpp.o
      [ 24%] Building CXX object cmake/sources/CMakeFiles/compileObjs.dir/__/__/src/proshade/ProSHADE_exceptions.cpp.o
      [ 28%] Building CXX object cmake/sources/CMakeFiles/compileObjs.dir/__/__/src/proshade/ProSHADE_io.cpp.o
      [ 32%] Building CXX object cmake/sources/CMakeFiles/compileObjs.dir/__/__/src/proshade/ProSHADE_mapManip.cpp.o
      /private/var/folders/lv/7pkpq1zs14v7rxh_0_f9j0jh0000gn/T/pip-install-ujaguaf2/proshade_9ff5caf6f77d487697e5a0182e3dd774/proshade/src/proshade/ProSHADE_mapManip.cpp:717:96: error: cannot initialize a parameter of type 'gemmi::GridSizeRounding' with an rvalue of type 'bool'
          dencalc.grid.set_size_from_spacing                ( dencalc.d_min / ( 2.0 * dencalc.rate), true );
                                                                                                     ^~~~
      /private/var/folders/lv/7pkpq1zs14v7rxh_0_f9j0jh0000gn/T/pip-install-ujaguaf2/proshade_9ff5caf6f77d487697e5a0182e3dd774/proshade/extern/gemmi/include/gemmi/grid.hpp:348:70: note: passing argument to parameter 'rounding' here
        void set_size_from_spacing(double approx_spacing, GridSizeRounding rounding) {
                                                                           ^
      1 error generated.
      gmake[2]: *** [cmake/sources/CMakeFiles/compileObjs.dir/build.make:146: cmake/sources/CMakeFiles/compileObjs.dir/__/__/src/proshade/ProSHADE_mapManip.cpp.o] Error 1
      gmake[2]: *** Waiting for unfinished jobs....
      gmake[1]: *** [CMakeFiles/Makefile2:278: cmake/sources/CMakeFiles/compileObjs.dir/all] Error 2
      gmake: *** [Makefile:136: all] Error 2
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/lv/7pkpq1zs14v7rxh_0_f9j0jh0000gn/T/pip-install-ujaguaf2/proshade_9ff5caf6f77d487697e5a0182e3dd774/setup.py", line 251, in <module>
          setup (
        File "/Users/ps/software/miniforge3/envs/va/lib/python3.8/site-packages/setuptools/__init__.py", line 108, in setup
          return distutils.core.setup(**attrs)
        File "/Users/ps/software/miniforge3/envs/va/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
        File "/Users/ps/software/miniforge3/envs/va/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/Users/ps/software/miniforge3/envs/va/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/Users/ps/software/miniforge3/envs/va/lib/python3.8/site-packages/setuptools/dist.py", line 1221, in run_command
          super().run_command(command)
        File "/Users/ps/software/miniforge3/envs/va/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/Users/ps/software/miniforge3/envs/va/lib/python3.8/site-packages/setuptools/command/install.py", line 68, in run
          return orig.install.run(self)
        File "/Users/ps/software/miniforge3/envs/va/lib/python3.8/site-packages/setuptools/_distutils/command/install.py", line 697, in run
          self.run_command('build')
        File "/Users/ps/software/miniforge3/envs/va/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/Users/ps/software/miniforge3/envs/va/lib/python3.8/site-packages/setuptools/dist.py", line 1221, in run_command
          super().run_command(command)
        File "/Users/ps/software/miniforge3/envs/va/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/Users/ps/software/miniforge3/envs/va/lib/python3.8/site-packages/setuptools/_distutils/command/build.py", line 131, in run
          self.run_command(cmd_name)
        File "/Users/ps/software/miniforge3/envs/va/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/Users/ps/software/miniforge3/envs/va/lib/python3.8/site-packages/setuptools/dist.py", line 1221, in run_command
          super().run_command(command)
        File "/Users/ps/software/miniforge3/envs/va/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/private/var/folders/lv/7pkpq1zs14v7rxh_0_f9j0jh0000gn/T/pip-install-ujaguaf2/proshade_9ff5caf6f77d487697e5a0182e3dd774/setup.py", line 98, in run
          self.build_extension                      ( ext, cmake_command_name )
        File "/private/var/folders/lv/7pkpq1zs14v7rxh_0_f9j0jh0000gn/T/pip-install-ujaguaf2/proshade_9ff5caf6f77d487697e5a0182e3dd774/setup.py", line 142, in build_extension
          subprocess.check_call                         ( [cmake_command_name, '--build', '.'] + build_args, cwd = self.build_temp )
        File "/Users/ps/software/miniforge3/envs/va/lib/python3.8/subprocess.py", line 364, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j2']' returned non-zero exit status 2.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> proshade

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure

Any suggestions on how best to circumvent the problem?

@vinith2
Copy link

vinith2 commented Jun 2, 2023

Hello,
One way to solve the issuse is to download the source code locally and install it.
The below correction helps in installing appropriate gemmi package: #3 (comment)
You could pip install from the local folder by first downloading the prosade source code perfrom the above corrections and then run
pip install . from the location ./proshade/proshade, this has the setup.py file.

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