building kde-4.4.2 with xorg75 not in /usr

lux-integ lux-integ at btconnect.com
Wed Apr 14 22:58:50 CEST 2010


On Wednesday 14 April 2010 08:52:12 pm Alexander Neundorf wrote:

> Where is your Xorg ?
> Please post also the actual error message.
>
> Alex

Thanks for the quick reply.  My setup has kde in /opt and Xorg7.5 
in /usr/X11R7.5.  It is a cblfs  based machine (pure 64 bit (not multilib)   
with nouveau-drm.   The tail of Cmake and make respectively  report the 
following:-

###################

-----------------------------------------------------------------------------
-- The following external packages were located on your system.
-- This installation will have the extra features provided by these packages.
-----------------------------------------------------------------------------
   * glib2 - Low-level core library for data structure handling, portability 
wrappers, etc.
   * GoogleGadgets - Google Gadgets library
   * QEdje - QEdje library
   * Python - KDE Python support
   * Soprano - Semantic Desktop Storing
   * Shared desktop ontologies - Desktop ontologies
   * Nepomuk - Nepomuk Libraries
   * Polkit-Qt - Qt Wrapper around PolicyKit
   * Compositing support - X11 Compositing support
   * lm-sensors - Sensors support for ksysguard
   * BlueZ - BlueZ is the Linux Bluetooth protocol stack
   * NetworkManager - A daemon for user controlled networking
   * libgps - GPS support for geolocation
   * XMMS - X MultiMedia System development libraries
   * kdepimlibs - KDE PIM libraries
   * Soprano - Semantic Desktop Storing
   * FreeType - A font rendering engine
   * libxklavier - A XKB foundation library for keyboard handling software
   * xkbfile - X11 KXB library for keyboard handling software
   * libusb - User level access to USB devices
   * libxft - X FreeType interface library
   * ck-connector - The ConsoleKit connector library

-----------------------------------------------------------------------------
-- Congratulations! All external packages have been found.
-----------------------------------------------------------------------------
-- Configuring done
-- Generating done
-- Build files have been written to: $SOURCES/kdebase-workspace-4.4.2/build
Scanning dependencies of target kgreet_classic_automoc
Generating kgreet_classic.moc
--------
###########
[ 83%] Building CXX object 
kcontrol/kxkb/CMakeFiles/kcm_keyboard_layout.dir/pixmap.o
[ 84%] Building CXX object 
kcontrol/kxkb/CMakeFiles/kcm_keyboard_layout.dir/xklavier_adaptor.o
Linking CXX shared module ../../lib/kcm_keyboard_layout.so
CMakeFiles/kcm_keyboard_layout.dir/x11helper.o: In function 
`X11Helper::registerForNewDeviceEvent(_XDisplay*)':
$SOURCES/kdebase-workspace-4.4.2/kcontrol/kxkb/x11helper.cpp:413: undefined 
reference to `_XiGetDevicePresenceNotifyEvent'
$SOURCES/kdebase-workspace-4.4.2/kcontrol/kxkb/x11helper.cpp:414: undefined 
reference to `XSelectExtensionEvent'
CMakeFiles/kcm_keyboard_layout.dir/x11helper.o: In function 
`X11Helper::isNewDeviceEvent(_XEvent*)':
$SOURCES/kdebase-workspace-4.4.2/kcontrol/kxkb/x11helper.cpp:388: undefined 
reference to `XListInputDevices'
$SOURCES/kdebase-workspace-4.4.2/kcontrol/kxkb/x11helper.cpp:399: undefined 
reference to `XFreeDeviceList'
collect2: ld returned 1 exit status
make[2]: *** [lib/kcm_keyboard_layout.so] Error 1
make[1]: *** [kcontrol/kxkb/CMakeFiles/kcm_keyboard_layout.dir/all] Error 2
make: *** [all] Error 2
##########

##########

after some to-ing and fro-ing I  decided to try a  little brute-force on 
cmake:  Here are the findings


A) My pkgconfig path is set like so:-
export PKG_CONFIG_PATH=$XORG_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH
( a check of xi.pc  is below:-
##########################
root [ /usr/X11R7.5/lib/pkgconfig ]# ls xi.pc
xi.pc
root [ /usr/X11R7.5/lib/pkgconfig ]# cat   xi.pc
prefix=/usr/X11R7.5
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: Xi
Description: X Input Extension Library
Version: 1.3
Requires: inputproto
Requires.private: x11 xext
Cflags: -I${includedir}
Libs: -L${libdir} -lXi
root [ /usr/X11R7.5/lib/pkgconfig ]#

#########################

as regards XI headers      I have these:-

root [ ~ ]# ls  /usr/X11R7.5/include/X11/extensions/XI*.h
/usr/X11R7.5/include/X11/extensions/XI.h       /usr/X11R7.5/include/X11/extensions/XInput.h
/usr/X11R7.5/include/X11/extensions/XI2.h      /usr/X11R7.5/include/X11/extensions/XInput2.h
/usr/X11R7.5/include/X11/extensions/XI2proto.h /usr/X11R7.5/include/X11/extensions/XIproto.h
root [ ~ ]#

#######################

B) I have a file I call FindlibXi.cmake  created like so:-

######### file to find libXi  (not in /usr/
cd  kdebase-workspace-4.4.2
cat >cmake/modules/FindlibXi.cmake<<"EOF"
###########################################
FIND_PATH(LIBXi_INCLUDE_DIR XI.h /usr/X11R7.5/include/X11/extensions )
FIND_LIBRARY(LIBXi_LIBRARY NAMES libXi.so libXi.so.6 libXi.so.6.1.0  
PATH /usr/X11R7.5/lib /usr/X11R7.5/lib64 ) 

IF (LIBXi_INCLUDE_DIR AND LIBXi_LIBRARY)
  IF (NOT WIN32)
        # use pkg-config to get the directories and then use these values
        # in the FIND_PATH() and FIND_LIBRARY() calls
        INCLUDE(UsePkgConfig)
        pkg_check_modules(LIBXi libXi>=1.2.0)
    ENDIF (NOT WIN32)
   SET(LIBXi_FOUND TRUE)
ENDIF (LIBXi_INCLUDE_DIR AND LIBXi_LIBRARY)
IF (LIBXi_FOUND)
   IF (NOT libXi_FIND_QUIETLY)
      message(STATUS "Found libXi: ${LIBXi_LIBRARY}")
   ENDIF (NOT libXi_FIND_QUIETLY)
ELSE (LIBXi_FOUND)
   IF (libXi_FIND_REQUIRED)
      message(FATAL_ERROR "Could not find libXi")
   ENDIF (libXi_FIND_REQUIRED)
ENDIF (LIBXi_FOUND)
EOF

C) I force cmake to 'execute' this file   before a Makefile is generated like 
so:-

cd  $SOURCES/kdebase-workspace-4.4.2
cat  CMakeLists.txt | sed -e '25 i find_package(libXi REQUIRED)' 
>CMakeLists.txt2
mv -v CMakeLists.txt2 CMakeLists.txt
cd  cmake/modules

cat  CMakeLists.txt | sed  -e '6 i FindlibXi.cmake  )' >CMakeLists.txt3
mv -v CMakeLists.txt3 CMakeLists.txt

(my seds are a little crufty;  perhaps someone on list could suggest something 
more elegant) 

D) The output from cmake shows that libXi is 'found' :-
###############  spew from cmake

-- Found automoc4: /opt/kde-4.4.2/bin/automoc4
-- Strigi API needs 'signed char'
-- Found Strigi: /opt/kde-4.4.2/lib/libstreams.so
--   found qimageblitz, version 4.0.0
-- Found QImageBlitz: /opt/kde-4.4.2/include/qimageblitz
-- Found ZLIB: /usr/lib64/libz.so
-- checking for module 'libXi>=1.2.0'
--   package 'libXi>=1.2.0' not found
-- Found libXi: /usr/X11R7.5/lib64/libXi.so
-- WARNING: you are using the obsolete 'PKGCONFIG' macro use FindPkgConfig
-- Found GLIB2: /usr/lib64/libglib-2.0.so
--   found fontconfig, version 2.7.3
-- Found Fontconfig: /usr/lib64/libfontconfig.so
--   found libggadget-1.0, version 0.11.2
--   found libggadget-qt-1.0, version 0.11.2
-- Found Googlegadgets: ggadget-qt-1.0;ggadget-1.0;QtGui;QtCore
-- checking for modules 'qzion>=0.4.0;qedje>=0.4.0'
--   found qzion, version 0.4.0
--   found qedje, version 0.4.0
-- Found QEdje: /opt/kde-4.4.2/lib/libqedje.so;/opt/kde-4.4.2/lib/libqzion.so

############  then further down

-- Looking for _XiGetDevicePresenceNotifyEvent
-- Looking for _XiGetDevicePresenceNotifyEvent - not found
-- _XiGetDevicePresenceNotifyEvent is not found, libXi version 1.2.0 or later 
is required to keep layouts with keyboard hotplugging

....it reports that the version is NOT >=1.2.0  ( though I have version 1.3  
as shown in the xi.pc above).  


E) ..then  the usual 'hardwired' failure if libXi is not in /usr/lib  of make 
at 84%


----------------

Clearly there is something wrong  with   xi.pc  not being checked for the 
correct version or   there is  some  macro    to report   libXi  of version 
>=1.2.0  only  if it is found  in /usr/lib  or some such.  (I also noticed  
this line 
-- WARNING: you are using the obsolete 'PKGCONFIG' macro use FindPkgConfig  

(whether I use  ' 
UsePkgConfig '   or  'FindPkgConfig '  in the FindLibxi.cmake macro above.  I 
am also unsure of which X1.h header to use in said macro.  I have tried XI.h 
and XI2.h all with the same result.    I also came across this link which 
could be of relevance:
http://mail.kde.org/pipermail/kde-buildsystem/2009-April/005716.html



Sorry about the long post  but I hope it provides some context ...  I would be 
grateful   for 
helpful suggestions)


sincerely
lux-integ


More information about the Kde-buildsystem mailing list