Bug 386787 - compiling cantor via craft fails
Summary: compiling cantor via craft fails
Status: RESOLVED FIXED
Alias: None
Product: Craft
Classification: Developer tools
Component: Core (show other bugs)
Version: master
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Hannah von Reth
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-12 19:01 UTC by Uwe Stöhr
Modified: 2018-04-19 15:01 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Uwe Stöhr 2017-11-12 19:01:23 UTC
executing

craft cantor

leads to a missing KF5 error. But before it occurs all necessary KF5 packages were detected. Since the last line in the error message refers to ECM I am reporting it here. If this is the wrong place, please tell me.

Kpty is installed in version 5.39.0

Here is the error message:

*** Handling package: kde/applications/cantor, action: all ***
*** Action: fetch for kde/applications/cantor ***
*** Action: unpack for kde/applications/cantor ***
*** Action: compile for kde/applications/cantor ***
*** cmake -G "Ninja"  -DCMAKE_INSTALL_PREFIX="R:/" -DCMAKE_PREFIX_PATH="R:/" -DCMAKE_BUILD_TYPE=Release -DKDE_INSTALL_US
E_QT_SYS_PATHS=ON "R:\build\kde\applications\cantor\work\cantor-17.08.3" ***
executing command: "C:\Program Files\CMake\bin\cmake.exe" -G "Ninja"  -DCMAKE_INSTALL_PREFIX="R:/" -DCMAKE_PREFIX_PATH="
R:/" -DCMAKE_BUILD_TYPE=Release -DKDE_INSTALL_USE_QT_SYS_PATHS=ON "R:\build\kde\applications\cantor\work\cantor-17.08.3"

-- The C compiler identification is MSVC 19.0.24215.1
-- The CXX compiler identification is MSVC 19.0.24215.1
-- Check for working C compiler: C:/Programme (x86)/MSVC2015/VC/bin/amd64/cl.exe
-- Check for working C compiler: C:/Programme (x86)/MSVC2015/VC/bin/amd64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Programme (x86)/MSVC2015/VC/bin/amd64/cl.exe
-- Check for working CXX compiler: C:/Programme (x86)/MSVC2015/VC/bin/amd64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found KF5Config: R:/lib/cmake/KF5Config/KF5ConfigConfig.cmake (found version "5.39.0")
-- Found KF5Crash: R:/lib/cmake/KF5Crash/KF5CrashConfig.cmake (found version "5.39.0")
-- Found KF5Completion: R:/lib/cmake/KF5Completion/KF5CompletionConfig.cmake (found version "5.39.0")
-- Found KF5DocTools: R:/lib/cmake/KF5DocTools/KF5DocToolsConfig.cmake (found version "5.39.0")
-- Found KF5NewStuff: R:/lib/cmake/KF5NewStuff/KF5NewStuffConfig.cmake (found version "5.39.0")
-- Found KF5IconThemes: R:/lib/cmake/KF5IconThemes/KF5IconThemesConfig.cmake (found version "5.39.0")
-- Found Gettext: R:/dev-utils/bin/msgmerge.exe
-- Found PythonInterp: C:/Program Files (x86)/Python36-32/python.exe (found version "3.6.3")
-- Found KF5TextEditor: R:/lib/cmake/KF5TextEditor/KF5TextEditorConfig.cmake (found version "5.39.0")
-- Found KF5CoreAddons: R:/lib/cmake/KF5CoreAddons/KF5CoreAddonsConfig.cmake (found version "5.39.0")
-- Found KF5Archive: R:/lib/cmake/KF5Archive/KF5ArchiveConfig.cmake (found version "5.39.0")
-- Found KF5Parts: R:/lib/cmake/KF5Parts/KF5PartsConfig.cmake (found version "5.39.0")
-- Could NOT find KF5Pty (missing: KF5Pty_DIR)
-- Could NOT find KF5Pty: found neither KF5PtyConfig.cmake nor kf5pty-config.cmake
-- Found KF5TextWidgets: R:/lib/cmake/KF5TextWidgets/KF5TextWidgetsConfig.cmake (found version "5.39.0")
-- Found KF5KIO: R:/lib/cmake/KF5KIO/KF5KIOConfig.cmake (found version "5.39.0")
-- Found KF5XmlGui: R:/lib/cmake/KF5XmlGui/KF5XmlGuiConfig.cmake (found version "5.39.0")
-- Found KF5I18n: R:/lib/cmake/KF5I18n/KF5I18nConfig.cmake (found version "5.39.0")
CMake Error at C:/Program Files/CMake/share/cmake-3.9/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find KF5 (missing: Pty) (found suitable version "5.39.0", minimum
  required is "5.15")
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.9/Modules/FindPackageHandleStandardArgs.cmake:377 (_FPHSA_FAILURE_MESSAGE)
  R:/share/ECM/find-modules/FindKF5.cmake:110 (find_package_handle_standard_args)
  CMakeLists.txt:26 (find_package)
Comment 1 Christophe Marin 2017-11-12 20:03:10 UTC
The relevant part is :

-- Could NOT find KF5Pty (missing: KF5Pty_DIR)
-- Could NOT find KF5Pty: found neither KF5PtyConfig.cmake nor kf5pty-config.cmake

Do you have R:/lib/cmake/KF5Pty/ ? What's inside ?
Comment 2 Uwe Stöhr 2017-11-12 20:12:33 UTC
> Do you have R:/lib/cmake/KF5Pty/ ?

No. I installed kpty using craft. But now I see that there is indeed no 
KF5PtyConfig.cmake
on my system.

I get:

frameworks/tier2/kpty
    Homepage:
    Description: Pty abstraction
    Tags:
    Latest version: 5.39.0
    Installed versions: 5.39.0
    Installed revision: None

but 

craft -i kpty

gives me:

*** Handling package: frameworks/tier2/kpty, action: all ***
*** Action: fetch for frameworks/tier2/kpty ***
*** Action: unpack for frameworks/tier2/kpty ***
*** Action: compile for frameworks/tier2/kpty ***
*** Action: cleanimage for frameworks/tier2/kpty ***
*** Action: install for frameworks/tier2/kpty ***
*** Action: qmerge for frameworks/tier2/kpty ***
*** Craft all succeeded: frameworks/tier2/kpty after 0 seconds ***

So it seems it is a bug in the package of kpty. Should I report it there or as bug in craft?
Comment 3 Kevin Funk 2017-11-12 21:22:52 UTC
Please check the blueprints in such cases.

Inspecting kpty.py reveals:

```
if OsUtils.isUnix():
    class Package(UnixPackage):
        def __init__(self):
            UnixPackage.__init__(self)
else:
    class Package(VirtualPackageBase):
        def __init__(self):
            VirtualPackageBase.__init__(self)
```

=> It won't be built on non-Unix platforms. KF5 Pty can't be built on Windows (check 'Support Platforms' on https://api.kde.org/frameworks/kpty/html/index.html).

=> Make Cantor buildable without kpty or make kpty build on Windows (likely won't make sense).
Comment 4 Christophe Marin 2017-11-12 22:11:48 UTC
Git commit 5700cc59da6f8bba503a38ba4c902877206a59cf by Christophe Giboudeaux.
Committed on 12/11/2017 at 22:11.
Pushed by cgiboudeaux into branch 'Applications/17.08'.

Don't look for KF5Pty when using Windows.

KF5::Pty is used in 2 backends :
- sage isn't built for WIN32 platform,
- maxima doesn't link to KF5::Pty on Windows.

M  +6    -2    CMakeLists.txt

https://commits.kde.org/cantor/5700cc59da6f8bba503a38ba4c902877206a59cf
Comment 5 Uwe Stöhr 2017-11-13 01:37:21 UTC
Many thanks for the quick fix!

But How can I benefit from the fix? I did

craft -i cantor

but get the same error as before.
Comment 6 Kevin Funk 2017-11-13 07:49:57 UTC
You're probably using the 17.08.3 tag for Cantor, which doesn't contain the fix. Christophe pushed his fix to 17.08 branch though.

Overwrite the target for just one single Craft invokation:
=> craft --target=master -i cantor

Overwrite the target for KDE Applications permanently:
=> Open CraftSettings.ini in %KDEROOT%\etc\ and set:

[BlueprintVersions]
  KDEApplications = master
Comment 7 Uwe Stöhr 2017-11-13 21:10:22 UTC
> craft --target=master -i cantor

many thanks Kevin!

I was looking for a full documentation of craft but couldn't find one. 

I only found this page:
https://community.kde.org/Craft

Could you maybe add the info for the --target option and the one with KDEApplications = master to this page?
Comment 9 Uwe Stöhr 2017-12-08 23:15:22 UTC
Many thanks!