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

Installation problems (macosx) #3

Open
xaviliz opened this issue Oct 31, 2018 · 12 comments
Open

Installation problems (macosx) #3

xaviliz opened this issue Oct 31, 2018 · 12 comments
Labels
help wanted Extra attention is needed

Comments

@xaviliz
Copy link

xaviliz commented Oct 31, 2018

Hi David,

thanks for sharing your work. I have tried to install via python setup.py install with Python2.7 and 3.7 but always the same error:
[ 80%] Linking CUDA device code CMakeFiles/gpuRIR_bind.dir/cmake_device_link.o nvcc fatal : Unknown option 'undefined' make[2]: *** [CMakeFiles/gpuRIR_bind.dir/cmake_device_link.o] Error 1 make[1]: *** [CMakeFiles/gpuRIR_bind.dir/all] Error 2 make: *** [all] Error 2 Traceback (most recent call last): File "setup.py", line 86, in <module> "Operating System :: OS Independent", File "/usr/local/lib/python2.7/site-packages/setuptools/__init__.py", line 140, in setup return distutils.core.setup(**attrs) File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup dist.run_commands() File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands self.run_command(cmd) File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/usr/local/lib/python2.7/site-packages/setuptools/command/install.py", line 67, in run self.do_egg_install() File "/usr/local/lib/python2.7/site-packages/setuptools/command/install.py", line 109, in do_egg_install self.run_command('bdist_egg') File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command self.distribution.run_command(command) File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/usr/local/lib/python2.7/site-packages/setuptools/command/bdist_egg.py", line 172, in run cmd = self.call_command('install_lib', warn_dir=0) File "/usr/local/lib/python2.7/site-packages/setuptools/command/bdist_egg.py", line 158, in call_command self.run_command(cmdname) File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command self.distribution.run_command(command) File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/usr/local/lib/python2.7/site-packages/setuptools/command/install_lib.py", line 11, in run self.build() File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/install_lib.py", line 111, in build self.run_command('build_ext') File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command self.distribution.run_command(command) File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "setup.py", line 37, in run self.build_extension(ext) File "setup.py", line 62, in build_extension subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp) File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 190, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j2']' returned non-zero exit status 2

Thanks in advance :)

@DavidDiazGuerra
Copy link
Owner

Hi Xavi,

I don't know what may be generating the error. What OS and C++ compiler are you using? What are your versions of cmake and nvcc?

@xaviliz
Copy link
Author

xaviliz commented Oct 31, 2018

Sure, these are the details:
OS: macosx-10.11
C++ compiler: AppleClang 7.3.0.7030031
CUDA compiler identification is NVIDIA 7.5.26
cmake version 3.12.3

@DavidDiazGuerra
Copy link
Owner

I have never installed the module on macosx. To ensure that nvcc is properly configured, are you able to compile the CUDA examples that come with NVCC?

I'll try to have access to a macosx system next week, but I'm not sure if it will be possible.

@xaviliz
Copy link
Author

xaviliz commented Nov 1, 2018

Ok, I can help you to test it. I have installed recently CUDA drivers but I know it is running well with tensorflow. However I will try to compile examples this evening and I will let you know.

@DavidDiazGuerra
Copy link
Owner

I think the problem is that cmake is using NVCC as linker while using clang++ options (-undefined dynamic_lookup). From what I read, it is better to use clang for linking, so my only ideas to solve it are:

  1. Make cmake use clang++ as a linker (I do not know how to do it).
  2. Use clang++ as a CUDA compiler (which is an open issue in cmake).

To sum up: I do not know how to fix the mac installation.

@DavidDiazGuerra DavidDiazGuerra added the help wanted Extra attention is needed label Nov 6, 2018
@DavidDiazGuerra DavidDiazGuerra changed the title Installation problems Installation problems (macosx) Nov 6, 2018
@xaviliz
Copy link
Author

xaviliz commented Nov 16, 2018

Hi David,

sorry I had a problem with NVIDIA examples. I think there is an incompatibility with the GPU driver and CUDA :(

$ ./samples/bin/x86_64/darwin/release/vectorAdd
[Vector addition of 50000 elements]
Failed to allocate device vector A (error code CUDA driver version is insufficient for CUDA runtime version)!

@DavidDiazGuerra
Copy link
Owner

Yes, it seems that your driver is outdated... Anyway, I don't think this is related to the installation issue of the Python module because one is at the compile time and the other at runtime. I think the problem is in the CMakeLists.txt file, but I do not know how to fix it.

@xaviliz
Copy link
Author

xaviliz commented Nov 16, 2018

If I solve the GPU driver issue, I can try to help you. Thanks for your time!

@mayuchen666
Copy link

mayuchen666 commented Apr 26, 2022

Hi David,

thanks for sharing your work. I have tried to install via python setup.py install with Python2.7 and 3.7 but always the same error:python setup.py install [ 80%] Linking CUDA device code CMakeFiles/gpuRIR_bind.dir/cmake_device_link.o nvcc fatal : Unknown option 'undefined' make[2]: *** [CMakeFiles/gpuRIR_bind.dir/cmake_device_link.o] Error 1 make[1]: *** [CMakeFiles/gpuRIR_bind.dir/all] Error 2 make: *** [all] Error 2 Traceback (most recent call last): File "setup.py", line 86, in <module> "Operating System :: OS Independent", File "/usr/local/lib/python2.7/site-packages/setuptools/__init__.py", line 140, in setup return distutils.core.setup(**attrs) File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup dist.run_commands() File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands self.run_command(cmd) File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/usr/local/lib/python2.7/site-packages/setuptools/command/install.py", line 67, in run self.do_egg_install() File "/usr/local/lib/python2.7/site-packages/setuptools/command/install.py", line 109, in do_egg_install self.run_command('bdist_egg') File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command self.distribution.run_command(command) File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/usr/local/lib/python2.7/site-packages/setuptools/command/bdist_egg.py", line 172, in run cmd = self.call_command('install_lib', warn_dir=0) File "/usr/local/lib/python2.7/site-packages/setuptools/command/bdist_egg.py", line 158, in call_command self.run_command(cmdname) File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command self.distribution.run_command(command) File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/usr/local/lib/python2.7/site-packages/setuptools/command/install_lib.py", line 11, in run self.build() File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/install_lib.py", line 111, in build self.run_command('build_ext') File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command self.distribution.run_command(command) File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "setup.py", line 37, in run self.build_extension(ext) File "setup.py", line 62, in build_extension subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp) File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 190, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j2']' returned non-zero exit status 2

Excuse me, Hello, xaviliz, I have the same problem as you, which has not been solved for many days. Have you solved it?
Sure, these are the details:
windows10 VS2019 cmake3.22.4 CUDA11.1

@xaviliz
Copy link
Author

xaviliz commented Nov 4, 2022

Hi, sorry I didn't see your message before. No, didn't solve it in OSX and I don't have gpu at this time :) However, I don't think CUDA11.1 works well in python2.7 Have you tried with python3.7?

@DavidDiazGuerra
Copy link
Owner

I have used gpuRIR with Python 3.7 in Linux systems and it works fine. I don't remember with which Python I tried to install the library on OSX, but I don't think the issue was related to Python but to how CMake works with CUDA in OSX.

@xaviliz
Copy link
Author

xaviliz commented Nov 7, 2022

Hi David,

Yes, you are right. In Linux, it works like a charm. I have pointed to the python version in my last message because the @mayuchen666 logs show it is working in py2.7 and I think CUDA11.1 is not available in py2.7 But probably the issue is CMake again. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants