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

Chapter 8, Recipe 3: Permission denied whe Renaming #512

Open
byxrolland opened this issue Jun 27, 2019 · 2 comments
Open

Chapter 8, Recipe 3: Permission denied whe Renaming #512

byxrolland opened this issue Jun 27, 2019 · 2 comments

Comments

@byxrolland
Copy link

Hi, I am learning CMake using your book.

In Chapter 8, Recipe 3, when I build the project using cmake --build . inside the build folder, somewhere after the downloading is completed, the build failed. And it gave out the message:

-- extracting... [tar xfz]
-- extracting... [analysis]
-- extracting... [rename]
CMake Error at /mnt/c/Ubuntu/cmake-cookbook/chapter-08/recipe-03/c-example/build/subprojects/Stamp/fftw3_external/extract-fftw3_external.cmake:51 (file):
  file RENAME failed to rename

    /mnt/c/Ubuntu/cmake-cookbook/chapter-08/recipe-03/c-example/build/subprojects/Source/ex-fftw3_external1234/fftw-3.3.8

  to

    /mnt/c/Ubuntu/cmake-cookbook/chapter-08/recipe-03/c-example/build/subprojects/Source/fftw3_external

  because: Permission denied



external/upstream/fftw3/CMakeFiles/fftw3_external.dir/build.make:90: recipe for target 'subprojects/Stamp/fftw3_external/fftw3_external-download' failed
make[2]: *** [subprojects/Stamp/fftw3_external/fftw3_external-download] Error 1
CMakeFiles/Makefile2:145: recipe for target 'external/upstream/fftw3/CMakeFiles/fftw3_external.dir/all' failed
make[1]: *** [external/upstream/fftw3/CMakeFiles/fftw3_external.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

The line that cause the error (.../cmake-cookbook/chapter-08/recipe-03/c-example/build/subprojects/Stamp/fftw3_external/extract-fftw3_external.cmake:51 (file): is

file(RENAME ${contents} ${directory})

I tried sudo cmake --build . It didn't help. As you can see, I am operating on WSL.

Would you please help fix this issue? Thanks.

@bast
Copy link
Member

bast commented Jul 10, 2019

Sorry that you had to wait so long for a reaction. I have never tried WSL but it would be good for me to test it out. I will need to try it on a Windows virtual machine since my laptop runs Linux.

@byxrolland
Copy link
Author

Waiting for your replay.

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