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

nvcc fatal : Unknown option flto #89

Closed
aradhyamathur opened this issue May 4, 2020 · 6 comments
Closed

nvcc fatal : Unknown option flto #89

aradhyamathur opened this issue May 4, 2020 · 6 comments

Comments

@aradhyamathur
Copy link

aradhyamathur commented May 4, 2020

upon running cmake ../ as shown in installation instructions no error is encountered, however upon running cmake --build . --config Release the following error is obtained -

[ 96%] Built target ply2points
Scanning dependencies of target pyoctree
[ 97%] Building CXX object python/CMakeFiles/pyoctree.dir/pyoctree.cpp.o
[ 98%] Linking CUDA device code CMakeFiles/pyoctree.dir/cmake_device_link.o
nvcc fatal : Unknown option 'flto'
python/CMakeFiles/pyoctree.dir/build.make:84: recipe for target 'python/CMakeFiles/pyoctree.dir/cmake_device_link.o' failed
make[2]: *** [python/CMakeFiles/pyoctree.dir/cmake_device_link.o] Error 1
CMakeFiles/Makefile2:1017: recipe for target 'python/CMakeFiles/pyoctree.dir/all' failed
make[1]: *** [python/CMakeFiles/pyoctree.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

What could be a possible reason for the same ?

@wang-ps
Copy link
Contributor

wang-ps commented Jun 10, 2020

Does this issue still exist?

@aradhyamathur
Copy link
Author

Actually yes, it pertains to cuda version, I noticed that after cmake this flag gets added, so one has to manually remove it.

@wang-ps
Copy link
Contributor

wang-ps commented Jun 11, 2020

I have just tried on my own PC (Ubuntu 16.04, Cuda 10.1), and did not reproduce the error. Could you provide your compiling environments?

@aradhyamathur
Copy link
Author

aradhyamathur commented Jun 11, 2020

Cuda 10.0, Ubuntu 18.04.1, python 3.7

@wang-ps
Copy link
Contributor

wang-ps commented Jun 11, 2020

Try the following command

cmake ..  -DUSE_PYTHON=OFF && cmake --build . --config Release

@aradhyamathur
Copy link
Author

Thanks this worked.

@wang-ps wang-ps closed this as completed Jun 12, 2020
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