Bug 427070 - file cannot create directory: /qch. Maybe need administrative privileges.
Summary: file cannot create directory: /qch. Maybe need administrative privileges.
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: installer/packages (show other bugs)
Version: Git
Platform: Homebrew (macOS) macOS
: NOR major
Target Milestone: ---
Assignee: Umbrello Development Group
URL: https://invent.kde.org/packaging/home...
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-28 13:50 UTC by Yurii Kolesnykov
Modified: 2020-11-12 04:39 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.32.3 (KDE releases 20.08.3)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yurii Kolesnykov 2020-09-28 13:50:18 UTC
SUMMARY

The latest release as well as master of umbrello tries to install qch files to /qch. Full log is here [0], while most important part is:

CMake Error at cmake_install.cmake:49 (file):
  file cannot create directory: /qch.  Maybe need administrative privileges.


FAILED: CMakeFiles/install.util 
cd /tmp/umbrello-20200928-53058-pdjdvm/build && /usr/local/Cellar/cmake/3.18.3/bin/cmake -P cmake_install.cmake
ninja: build stopped: subcommand failed.


STEPS TO REPRODUCE
1. Try to install umbrello via homebrew formula [1].

OBSERVED RESULT
Umbrello tries to write qch files to /qch, ignores cmake option to disable the building of qch files (-DBUILD_QCH=OFF), ignores manual specification of qch installation of qch files (-DQCHDIR=doc/qch -DQTQCHDIR=doc/qch).

EXPECTED RESULT
qch install location should work as in other KDE software stack.

SOFTWARE/OS VERSIONS
macOS: 10.15.7 (19H2)
KDE Frameworks Version: 5.74.0
Qt Version: 5.15.1

[1]https://git.io/JUP0j
[2]https://invent.kde.org/packaging/homebrew-kde/-/blob/master/Formula/umbrello.rb
Comment 1 Ralf Habacker 2020-10-13 07:36:05 UTC
(In reply to Yurii Kolesnykov from comment #0)

> ignores manual specification of
> qch installation of qch files (-DQCHDIR=doc/qch -DQTQCHDIR=doc/qch).

In the build system QT_DOC_DIR is used to get the doc install root (see https://invent.kde.org/sdk/umbrello/-/blob/master/CMakeLists.txt#L274 for details), which seems not be set on MacOSX. 

Using -DQT_DOC_DIR=doc/qch on cmake command line should help here.


> 
> EXPECTED RESULT
> qch install location should work as in other KDE software stack.
> 
> SOFTWARE/OS VERSIONS
> macOS: 10.15.7 (19H2)
> KDE Frameworks Version: 5.74.0
> Qt Version: 5.15.1
> 
> [1]https://git.io/JUP0j
> [2]https://invent.kde.org/packaging/homebrew-kde/-/blob/master/Formula/
> umbrello.rb
Comment 2 Ralf Habacker 2020-10-13 08:43:42 UTC
Git commit 8fdb410cd678fe5b018db7a094daa940263a8349 by Ralf Habacker.
Committed on 13/10/2020 at 08:43.
Pushed by habacker into branch 'release/20.08'.

Add cmake command line option BUILD_QCH to support building without QCH support if requested

M  +3    -1    CMakeLists.txt

https://invent.kde.org/sdk/umbrello/commit/8fdb410cd678fe5b018db7a094daa940263a8349
Comment 3 Ralf Habacker 2020-10-13 08:43:50 UTC
Git commit d4b77bfe0a54c5f10b63020c19b1150209cbad60 by Ralf Habacker.
Committed on 13/10/2020 at 08:43.
Pushed by habacker into branch 'release/20.08'.

Fix "file cannot create directory: /qch. Maybe need administrative privileges"

The KF5 build variant uses QTQCHDIR for specifing qch install location,
which was not used.
FIXED-IN:2.32.3 (KDE releases 20.08.3)

M  +2    -1    CMakeLists.txt

https://invent.kde.org/sdk/umbrello/commit/d4b77bfe0a54c5f10b63020c19b1150209cbad60
Comment 4 Ralf Habacker 2020-10-13 14:11:03 UTC
Git commit b2fd2bf58bbea512de1f37897bbc480986f62826 by Ralf Habacker.
Committed on 13/10/2020 at 14:10.
Pushed by habacker into branch 'release/20.08'.

cmake: Add fallback in case QTQCHDIR was not found for KF5 build variant

This is required at least for the openSUSE distribution Leap 15.1, which
uses ECM version 5.55 by default.

M  +3    -0    CMakeLists.txt

https://invent.kde.org/sdk/umbrello/commit/b2fd2bf58bbea512de1f37897bbc480986f62826
Comment 5 Oliver Kellogg 2020-10-25 21:27:28 UTC
If I use the cmake command given in the INSTALL file on my Tumbleweed system, I get this:

$ cmake -DCMAKE_INSTALL_PREFIX=$HOME/umbrello -DCMAKE_BUILD_TYPE=Debug  ../
[...]
-- found qhelpgenerator /usr/bin/qhelpgenerator-qt5
CMake Error at CMakeLists.txt:277 (install):
  install FILES given no DESTINATION!

If I add -DBUILD_QCH=FALSE the error goes away.
I suggest including -DBUILD_QCH=FALSE in the example cmake command given in INSTALL, or otherwise extending the example command so that it works out of the box.
Comment 6 Ralf Habacker 2020-10-26 12:57:35 UTC
(In reply to Oliver Kellogg from comment #5)
> If I use the cmake command given in the INSTALL file on my Tumbleweed
> system, I get this:
If you are on the master branch, please try again, as the branch did not contain the last corrections from the stable branch.
Comment 7 Oliver Kellogg 2020-11-12 04:39:17 UTC
(In reply to Ralf Habacker from comment #6)
> (In reply to Oliver Kellogg from comment #5)
> > If I use the cmake command given in the INSTALL file on my Tumbleweed
> > system, I get this:
> If you are on the master branch, please try again, as the branch did not
> contain the last corrections from the stable branch.

Confirmed working, thanks.