kdebaseworkspace-4.4.2-help required

lux-integ lux-integ at btconnect.com
Wed Apr 14 06:04:08 PDT 2010


On Tuesday 13 April 2010 09:58:49 pm linux fan wrote:
> This couldn't be something simple like libXi.so got in wrong place
> among many places, could it?
>
> Try
> whereis libXi.so
tried that  no joy I'm afraid,  it seem to be a problem with  pkgconfig macros  
used  by cmake:-

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 fixed   the file to find libXi  (including to check PKG_CONFIG ( here I 
use the kde one and I am unsure if it is really checking the set 
$PKG_CONFIG_PATH );   I now call it 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  and  thanks to you all for all the suggestions,  
(AND if anyone know of a better way to   use pkgconfig with cmake (find 
package)  rather than that which I  am using  I would be grateful   for 
suggestions)

sincerely
lux-integ






More information about the blfs-support mailing list