[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: kdesrc-build: PolkitQt5-1
From:       "gregor.mi.sw" <codestruct () posteo ! org>
Date:       2018-05-16 8:25:14
Message-ID: ffa1c2bf-7a95-ad24-6786-c2eab1d7ce98 () posteo ! org
[Download RAW message or body]

On 16.05.2018 05:17, Michael Pyne wrote:
> On Tue, May 15, 2018 at 10:33:17AM +0200, gregor.mi.sw wrote:
>> Hello Michael,
>>
>> I just started a full rebuild and closely watched the CMakeCache.txt files. There is one finding.
>>
>> $ # no special env var setup
>> $ kdesrc-build --include-dependencies ksysguard kinfocenter kdevelop
>>
>> ...
>>
>> Building polkit-qt-1 from <module-set at line 34> (9/86)
>>           No source update, but the build directory doesn't exist
>>           Updating polkit-qt-1 (to branch master)
>>           Source update complete for polkit-qt-1: no files affected
>>           Preparing build system for polkit-qt-1.
>>           Running cmake...
>>           Compiling... succeeded (after 19 seconds)
>>           Installing.. succeeded (after 0 seconds)
>>
>> Building kauth from frameworks (10/86)
>>           No source update, but the build directory doesn't exist
>>           Updating kauth (to branch master)
>>           Source update complete for kauth: no files affected
>>           Preparing build system for kauth.
>>           Running cmake...
>>           Compiling... succeeded (after 52 seconds)
>>           Installing.. succeeded (after 0 seconds)
>> ...
>>
>>
>> In /home/gregor/kde/build/frameworks/kauth/CMakeCache.txt I have those lines:
>>
>> ...
>> //The directory containing a CMake configuration file for KF5CoreAddons.
>> KF5CoreAddons_DIR:PATH=/home/gregor/kde/usr/lib64/cmake/KF5CoreAddons
>>
>> //The directory containing a CMake configuration file for PolkitQt5-1.
>> PolkitQt5-1_DIR:PATH=/usr/lib64/cmake/PolkitQt5-1
>> ...
>>
>> which means KF5CoreAddons was found at the correct place whereas for PolkitQt5-1, it picked up the
>> wrong location. I checke, those files are present:
>>
>> /home/gregor/kde/usr/lib64/cmake/PolkitQt5-1/PolkitQt5-1Config.cmake
>> /home/gregor/kde/usr/lib64/cmake/PolkitQt5-1/PolkitQt5-1ConfigVersion.cmake
>> /home/gregor/kde/usr/lib64/cmake/PolkitQt5-1/PolkitQt5-1Targets-debug.cmake
>> /home/gregor/kde/usr/lib64/cmake/PolkitQt5-1/PolkitQt5-1Targets.cmake
>>
>> Any idea?
> 
> The only thing that comes to mind is the possibility of using the
> "CMAKE_MODULE_PATH" setting as well.
> 
>  From looking at the kdesrc-build code, we set CMAKE_MODULE_PATH for Qt
> modules, but don't also do the same (by default) for the module being
> built.
> 
> For the majority of KDE code this shouldn't matter, as CMAKE_MODULE_PATH
> is used for the "Module" mode of CMake's find_package(), which most code
> no longer uses. Instead we use "Config" mode for most find_package()
> calls (which uses CMAKE_PREFIX_PATH).  See the find_package
> documentation for details. [1]
> 
> CMake will use "Module" mode by default for find_package() calls that
> use the "simplified" syntax and for which it can find matching CMake
> modules. In the right setup that means it's possible for CMake to find
> different packages depending only on whether the find_package() call
> uses a simplified or complex syntax, which could explain why some
> modules found the wrong module and some did not.
> 
> To confirm this, you could try exporting CMAKE_MODULE_PATH to something
> like "$HOME/kde/usr/lib64/cmake" manually, before running kdesrc-build
> for kauth.  Though I'm planning just to modify kdesrc-build to set the
> variable regardless just in case.
> 
> To avoid --refresh-build you can call "kdesrc-build --reconfigure kauth"
> to re-run CMake first without deleting the build directory.
> 
> [1] https://cmake.org/cmake/help/latest/command/find_package.html
> 
> Regards,
>   - Michael Pyne
> 

Sadly, the test was negative...

$ sudo zypper install libpolkit-qt5-1-devel

$ kdesrc-build --reconfigure kauth

### /home/gregor/kde/build/frameworks/kauth/CMakeCache.txt
--- Problems --------------------------------
PolkitQt5-1_DIR:PATH=/usr/lib64/cmake/PolkitQt5-1
---------------------------------------------

$ export CMAKE_MODULE_PATH=$HOME/kde/usr/lib64/cmake

$ kdesrc-build --reconfigure kauth

Same problem:

### /home/gregor/kde/build/frameworks/kauth/CMakeCache.txt
--- Problems --------------------------------
PolkitQt5-1_DIR:PATH=/usr/lib64/cmake/PolkitQt5-1
---------------------------------------------

Removing the system devel package helps again:

$ sudo zypper remove libpolkit-qt5-1-devel

$ kdesrc-build --reconfigure kauth

### /home/gregor/kde/build/frameworks/kauth/CMakeCache.txt
OK

Gregor
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic