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

cmake: "make install" tries to set permissions on target directories #4872

Closed
llvmbot opened this issue Jul 3, 2009 · 10 comments
Closed

cmake: "make install" tries to set permissions on target directories #4872

llvmbot opened this issue Jul 3, 2009 · 10 comments
Labels
bugzilla Issues migrated from bugzilla

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Jul 3, 2009

Bugzilla Link 4500
Resolution FIXED
Resolved on Feb 10, 2014 05:00
Version unspecified
OS Linux
Blocks llvm/llvm-bugzilla-archive#15732
Reporter LLVM Bugzilla Contributor
CC @bradking,@chandlerc,@DougGregor

Extended Description

For me "make install" when using cmake fails with:

Install the project...
-- Install configuration: ""
-- Installing: /usr/local/./include
CMake Error at cmake_install.cmake:36 (FILE):
file Problem setting permissions on directory "/usr/local/./include"

Indeed I don't have permission to change permissions on /usr/local/./include.
And why would I need to? There's no problem installing files inside that
directory, and setting their permissions. I think the fact that cmake is
trying to set permissions on /usr/local/include is a bug.

@llvmbot
Copy link
Collaborator Author

llvmbot commented Jul 11, 2009

Is this an LLVM bug though, or a cmake bug?

@llvmbot
Copy link
Collaborator Author

llvmbot commented Jul 12, 2009

I don't know - cmake is an opaque mystery to me. How can I tell?

@llvmbot
Copy link
Collaborator Author

llvmbot commented Jul 12, 2009

I CCed Doug in the hopes he would know.

@chandlerc
Copy link
Member

This seems likely to be this CMake bug:
http://public.kitware.com/Bug/view.php?id=10978

@bradking
Copy link
Contributor

@bradking
Copy link
Contributor

@bradking
Copy link
Contributor

This is actually a bug in LLVM and Clang's CMake code and not in CMake. The install(DIRECTORY) command documents how it sets permissions on directories, and it is consistent with the behavior observed here. We should not ask CMake to install the top-level "include/" directory for us because it is not exclusive to LLVM or Clang. Instead we should ask it only to handle the "include/llvm", "include/llvm-c", "include/clang", and "include/clang-c" subdirectories.

I've just attached a patch to LLVM and another to Clang to fix this issue.

@chandlerc
Copy link
Member

This is actually a bug in LLVM and Clang's CMake code and not in CMake. The
install(DIRECTORY) command documents how it sets permissions on directories,
and it is consistent with the behavior observed here. We should not ask
CMake to install the top-level "include/" directory for us because it is not
exclusive to LLVM or Clang. Instead we should ask it only to handle the
"include/llvm", "include/llvm-c", "include/clang", and "include/clang-c"
subdirectories.

I've just attached a patch to LLVM and another to Clang to fix this issue.

Can you post it to the commit list for review? (Or use Phabricator to do so?)

Thanks for tracking down the root cause of this issue.

@bradking
Copy link
Contributor

Can you post it to the commit list for review?

http://thread.gmane.org/gmane.comp.compilers.llvm.cvs/173963

@llvmbot
Copy link
Collaborator Author

llvmbot commented Feb 10, 2014

I had been missing this PR for long time, ... :(

Fixed in r201075 and r201076.

I have confirmed Brad fixed this issue with prerequisites:

  • root owns PREFIX.
  • subdirectories, bin, include, lib, and share are owned by root but writable to installer. (in this case, me)

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla
Projects
None yet
Development

No branches or pull requests

3 participants