From: jimmy <wg...@ya...> - 2009-10-06 13:55:56
|
> Date: Mon, 5 Oct 2009 21:20:59 -0400 > From: "D. Michael McIntyre" <mic...@ro...> > > On Monday 05 October 2009, Henry W. Peters wrote: > > > It appears that most if not all the RG files > downloaded from svn are > > "not owned by" me. Perhaps I need to put a sudo before > I request the > > files from svn (I have not used svn much)? > > Weird. > > You can probably fix this with something like > > sudo chown -R $(whoami) rosegarden > > although I can't quite imagine how you got into this > predicament in the first > place. > Change ownership of the whole directory back to the user is the remedy. "sudo" should not be used with "svn" command. The problem could be a few things. Normally when a file is first created, it is own by the user who created it. However, if sudo svn ... was originally used, all the source files would be own by root. Sub-sequent use of "svn" by a normal user would only try to update any existing file but will fail because of lack of permission, and if svn continues to check-out new files (not previously existed), those source files would be owned by the normal user. The reverse would also be true -- originally checkout by normal user, subsequently checkout by "sudo/root". When "bootstrap.sh", "configure", "make" are run, those will create files, too. These should also be done by the nomal user, not with sudo/root. The last step is "make install", which normally put the runtime files under /usr/bin, or /usr/local/bin, these directories are owned by root so "sudo/root" is needed. Of course, if "configure" was done with "--prefix=/normal/user/directory", then no sudo/root privileges is needed with "make install", because all the files and directories will be installed under /normal/user/directory that is owned by the normal user. The trick is to set export PATH=/normal/user/directory/bin:$PATH export LD_LIBRARY_PATH=/normal/user/directory/lib:$LD_LIBRARY_PATH in order for the normal user to properly load and run the program. This is also one way to install multiple different instances of a program in different directories. It starts with the "--prefix" option in the "configure" step for the automake's "configure", "make" sequence. I have run into this problem before. I did everything as normal user, then "make install" as root in a separate terminal session. After tweaking the code somewhat, I did recall the command too quick and get "make install" to run again as root. So the "make install" goes through the normal "make" to compile the changed source files and create .o files as root, then install those files not a problem at all. The problem comes in later when I try to "make clean", or "make" as normal user and I can't do anything with those .o or other temporary files which were created by root. I had to change ownership of everything back to the normal user. Hope it helps people understand some of the underlying issues of compiling from source. Jimmy |