Bug 349658 - plasma-desktop cmake error
Summary: plasma-desktop cmake error
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (show other bugs)
Version: master
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: 1.0
Assignee: Aleix Pol
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-27 15:31 UTC by Wood
Modified: 2015-07-10 12:56 UTC (History)
9 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 Wood 2015-06-27 15:31:43 UTC
Compile fails after commit f70d8407cd3e7858e37660afd404b7b89db2ec1b

In plasma-desktop/ConfigureChecks.cmake:58
set(XLIBDIR "${xrootdir}/lib/X11")
if (NOT EXISTS "${XLIBDIR}")
    message(FATAL_ERROR "Couldn't find X11 prefix XLIBDIR: ${XLIBDIR}")
endif()

 doesn't work for systems where X11 is installed in /usr/lib64/X11

Reproducible: Always
Comment 1 Bhushan Shah 2015-06-27 15:39:01 UTC
Plasma 4 bugs goes to plasma4 product.. plasmashell is for Plasma 5
Comment 2 David Edmundson 2015-06-27 17:05:33 UTC
That's partly the reason for putting int the error message. Before it was just silently failing breaking part of system settings, now you're seeing it's wrong.

cmake -DXLIBDIR /usr/lib64/X11 

should set it correctly.
Comment 3 Aleix Pol 2015-06-27 17:40:23 UTC
It never worked, many people had a broken build directory.

Feel free to redefine some_x_program meanwhile.
Comment 4 Christian Butcher 2015-06-29 09:37:43 UTC
Seems like (at least for me?) the command 

cmake -DXLIBDIR=/usr/lib64/X11/ .. 

executed from within a 'build' subdirectory still throws me a 'Couldn't find X11 prefix XLIBDIR: /usr/lib/X11' error, and gives 'Configuring incomplete, errors occured!'

Changing the 'ConfigureChecks.cmake' file avoids this problem.

Why is this?
Comment 5 Sebastian Kügler 2015-06-29 13:42:39 UTC
cmake -DXLIBDIR=/usr/lib64/X11/ ..

also breaks for Debian multiarch systems. What's the reason to not use KDEInstallDirs from ECM?
Comment 6 Aleix Pol 2015-06-29 17:17:37 UTC
Maybe what you want to call is with -Dsome_x_program=/usr/bin/xterm.

Anyway, I'll try to spend some time fixing the X11 lookup this week...
Comment 7 Aleix Pol 2015-06-30 14:53:58 UTC
It would be good if somebody could test the following patch:
https://git.reviewboard.kde.org/r/124215/
Comment 8 Christian Butcher 2015-07-01 00:38:12 UTC
Works for me - patched and the cmake/make/make install cycle had no problems. If there's something you want me to check to ensure it behaves as expected otherwise, just say and I'll take a look.

Additionally, looks like it cuts out a bunch of contortions in the xkb rules file, which has to be nice.
Comment 9 Jure Repinc 2015-07-02 07:23:51 UTC
It also worked for me on Gentoo
Comment 10 desaparecido 2015-07-02 15:38:06 UTC
builds fine with patch and works without problem in Archlinux (only an issue about "logout", nothing happens, but I don't know if is about this package or another issue, I need confirm why)
Comment 11 Aleix Pol 2015-07-07 14:41:40 UTC
Git commit 543652303260945ba0ca0190184d3a72aa4097b7 by Aleix Pol, on behalf of Aleix Pol Gonzalez.
Committed on 07/07/2015 at 14:39.
Pushed by apol into branch 'master'.

Explicitly look for XKB instead of juggling paths in base of a prefix

Instead of looking for X11 libraries and then looking stuff up, just find the directory we're looking for.
Also drop XBINDIR, as it wasn't being used at all.

REVIEW: 124215

M  +3    -11   ConfigureChecks.cmake
M  +2    -5    config-workspace.h.cmake
M  +1    -23   kcms/keyboard/xkb_rules.cpp

http://commits.kde.org/plasma-desktop/543652303260945ba0ca0190184d3a72aa4097b7