Installing application from kdesrc-build wants to write to unpermitted directories

When using kdesrc-build ktexteditor, the package seems to build, but tells me it doesn’t install because its trying to write to something it doesn’t have access to.

CMake Error at src/cmake_install.cmake:142 (file):
  file INSTALL cannot copy file
  to "/usr/share/polkit-1/actions/org.kde.ktexteditor.katetextbuffer.policy":
  Permission denied.
Call Stack (most recent call first):
  cmake_install.cmake:51 (include)

How do I get around this (without needing to use sudo)? Also, how do I make other local KDE packages on my system to use local dependencies instead of system ones? Thank you.

I can’t reproduce, ktexteditor installs into ~/kde/usr for me. Are you sure kdedir is set in your kdesrc-builrc?

Depends on what you mean by “local”. Do you mean the ones built in kdesrc-build? They should find each other automatically.

When opening the config file, I come across this.

    # Install directory for KDE software
    kdedir ~/kde/usr

    # Directory for downloaded source code
    source-dir ~/kde/src

    # Directory to build KDE into before installing
    # relative to source-dir by default
    build-dir ~/kde/build

I don’t think there shouldn’t be anything in here that would cause an install to /usr/.

I also noticed include-dependencies is kept off since I am on a rolling release. Does this have to be on?

I have the same issue.

I followed instructions on develop dot kde dot org to set up kdesrc-build (but I can’t post links).

I could build and run kcalc (kdesrc-build kcalc and then kdesrc-build --run kcalc), but when I tried to build workspace an error occured when building libksysguard:

-- Installing: /MYPATH/kde/usr/share/dbus-1/system.d/org.kde.ksysguard.processlisthelper.conf
-- Installing: /MYPATH/kde/usr/share/dbus-1/system-services/org.kde.ksysguard.processlisthelper.service
-- Installing: /usr/share/polkit-1/actions/org.kde.ksysguard.processlisthelper.policy
CMake Error at processcore/cmake_install.cmake:148 (file):
  file INSTALL cannot copy file
  Permission denied.

(MYPATH is set in ~/.config/kdesrc-buildrc and apparently it isn’t a problem for other projects; as said, building kcalc worked fine; and cottonears doesn’t seem to have edited the paths and still gets that error)

The file in question only differs in some hebrew localisation from the installed file, so I’m tempted to let it be overwritten, but I fear that opens a can of worms for other projects to overwrite other files as well, so I have to tackle the issue eventually.