Cello
Cello copied to clipboard
Make install should use "install --mode=..." instead of "cp"
When running "sudo make install
" or simply "make install
" as root, the Makefile
assumes root umask is something like 0022
. Which is just an ... assumption, not a fact.
Many system administrator set root umask to 0077
(no file is created world-readable or world-executable).
The command "install
" (from GNU coreutils
) has the "--mode
" option to enforce file and directory permissions during the file copy. Which very likely is "0644
" for Cello.h
and libCello.a
, and "0755
" for libCello.so
.
Thanks for the report. Sorry I'm not really a unix expert. So the issue is that installing libraries with cp
does not work in some cases? So what is the fix for this?
To be really fool prof you'd:
install --mode=0755 -d /usr/local
install --mode=0755 -d /usr/local/lib
install --mode=0755 -d /usr/local/include
# this creates the directory tree with proper permissions for normal users
install --mode=0644 libCello.a /usr/local/lib
install --mode=0755 libCello.so /usr/local/lib
install --mode=0644 include/Cello.h /usr/local/include
ldconfig
# this last command updates the dynamic loader cache
This also covers my other ticket about the shared object not being installed.