'make install' to a local directory fails as non-root

Bug #915254 reported by Daniel van Vugt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
unity (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

In lp:unity/4.0 ...

mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/usr
make
make install

...
CMake Error at cmake_install.cmake:162 (FILE):
  file INSTALL cannot copy file
  "/home/dan/bzr/unity/run/com.canonical.Unity.gschema.xml" to
  "/usr/share/glib-2.0/schemas/com.canonical.Unity.gschema.xml".

I think this is wrong. It should be possible to 'make install' unity to my local dir ~/usr

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Workaround:
CMakeCache.txt: GSETTINGS_LOCALINSTALL:BOOL=ON

Though I still think this is a bug. It seems to me that com.canonical.Unity.gschema.xml should honour CMAKE_INSTALL_PREFIX by default. Not as a special condition.

Revision history for this message
Hernando Torque (htorque) wrote :

Note: You can also add -DGSETTINGS_LOCALINSTALL=ON to the cmake command.

Revision history for this message
Bilal Akhtar (bilalakhtar) wrote :

Not sure, but is that because glib schemas MUST go to that directory and won't work anywhere else?

That's probably the reason why that line of cmake code doesn't respect the install prefix.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Correct, the schemas only work (apparently) in /usr/share.

However I think the Unity build system should do what the Compiz build system does by default - just give you a warning that the schemas won't work in the local directory, but install them anyway. It's much more functional for developers trying to build and run the code locally. But either way, this never affects regular users.

Omer Akram (om26er)
Changed in unity:
status: New → Confirmed
Changed in unity (Ubuntu):
status: New → Confirmed
Andrea Azzarone (azzar1)
no longer affects: unity
Changed in unity (Ubuntu):
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.