Bug 155173 - Build error in krfb as tagged in KDE 4.0.0, related to Xtest
Summary: Build error in krfb as tagged in KDE 4.0.0, related to Xtest
Status: RESOLVED FIXED
Alias: None
Product: krfb
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Alessandro Praduroux
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-06 07:10 UTC by Troy Unrau
Modified: 2008-03-09 15:11 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
typo fix for krfb/CMakeLists.txt (523 bytes, patch)
2008-01-07 00:53 UTC, Gabriel C
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Troy Unrau 2008-01-06 07:10:17 UTC
Version:           1.0 (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc (GCC) 4.2.2 20070909 (prerelease) (4.2.2-0.RC.1mdv2008.0) 
OS:                Linux

**********
The original error output is:

[ 76%] Generating ui_configsecurity.h
[ 76%] Generating krfbconfig.h, krfbconfig.cpp
[ 76%] Generating ui_connectionwidget.h
[ 76%] Generating ui_manageinvitations.h
[ 76%] Generating ui_personalinvitewidget.h
[ 76%] Generating ui_invitewidget.h
[ 76%] Generating ui_configtcp.h
[ 76%] Generating krfb_automoc.cpp
Generating qtframebuffer.moc
Generating connectiondialog.moc
Generating personalinvitedialog.moc
Generating x11framebuffer.moc
Generating invitationmanager.moc
Generating krfbserver.moc
Generating manageinvitationsdialog.moc
Generating framebuffer.moc
Generating trayicon.moc
Generating connectioncontroller.moc
Generating invitedialog.moc
Scanning dependencies of target krfb
[ 76%] Building CXX object krfb/CMakeFiles/krfb.dir/krfb_automoc.o
[ 76%] Building CXX object krfb/CMakeFiles/krfb.dir/main.o
[ 77%] Building CXX object krfb/CMakeFiles/krfb.dir/trayicon.o
[ 77%] Building CXX object krfb/CMakeFiles/krfb.dir/krfbserver.o
[ 77%] Building CXX object krfb/CMakeFiles/krfb.dir/manageinvitationsdialog.o
[ 77%] Building CXX object krfb/CMakeFiles/krfb.dir/invitationmanager.o
[ 77%] Building CXX object krfb/CMakeFiles/krfb.dir/invitedialog.o
[ 77%] Building CXX object krfb/CMakeFiles/krfb.dir/invitation.o
[ 77%] Building CXX object krfb/CMakeFiles/krfb.dir/connectiondialog.o
[ 77%] Building CXX object krfb/CMakeFiles/krfb.dir/personalinvitedialog.o
[ 77%] Building CXX object krfb/CMakeFiles/krfb.dir/connectioncontroller.o
[ 77%] Building CXX object krfb/CMakeFiles/krfb.dir/events.o
[ 77%] Building CXX object krfb/CMakeFiles/krfb.dir/framebuffer.o
[ 78%] Building CXX object krfb/CMakeFiles/krfb.dir/qtframebuffer.o
[ 78%] Building CXX object krfb/CMakeFiles/krfb.dir/x11framebuffer.o
[ 78%] Building CXX object krfb/CMakeFiles/krfb.dir/krfbconfig.o
Linking CXX executable krfb
CMakeFiles/krfb.dir/krfbserver.o: In function `KrfbServer::checkX11Capabilities()':
/home/kde4/sources/kdenetwork/krfb/krfbserver.cpp:283: undefined reference to `XTestQueryExtension'
CMakeFiles/krfb.dir/events.o: In function `PointerEvent::exec()':
/home/kde4/sources/kdenetwork/krfb/events.cpp:159: undefined reference to `XTestFakeMotionEvent'
/home/kde4/sources/kdenetwork/krfb/events.cpp:166: undefined reference to `XTestFakeButtonEvent'
CMakeFiles/krfb.dir/events.o: In function `KeyboardEvent::tweakModifiers(signed char, bool)':
/home/kde4/sources/kdenetwork/krfb/events.cpp:87: undefined reference to `XTestFakeKeyEvent'
/home/kde4/sources/kdenetwork/krfb/events.cpp:91: undefined reference to `XTestFakeKeyEvent'
/home/kde4/sources/kdenetwork/krfb/events.cpp:97: undefined reference to `XTestFakeKeyEvent'
/home/kde4/sources/kdenetwork/krfb/events.cpp:102: undefined reference to `XTestFakeKeyEvent'
/home/kde4/sources/kdenetwork/krfb/events.cpp:107: undefined reference to `XTestFakeKeyEvent'
CMakeFiles/krfb.dir/events.o:/home/kde4/sources/kdenetwork/krfb/events.cpp:126: more undefined references to `XTestFakeKeyEvent' follow
collect2: ld returned 1 exit status
make[2]: *** [krfb/krfb] Error 1
make[1]: *** [krfb/CMakeFiles/krfb.dir/all] Error 2
make: *** [all] Error 2

***********
The linking command is:

cd /home/kde4/build/kdenetwork/krfb && /usr/bin/c++     -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith-Wformat-security -fno-exceptions -fno-check-new -fno-common -Woverloaded-virtual -fvisibility=hidden -fvisibility-inlines-hidden -g3 -fno-inline  -fPIC -Wl,--enable-new-dtags  "CMakeFiles/krfb.dir/krfb_automoc.o" "CMakeFiles/krfb.dir/main.o" "CMakeFiles/krfb.dir/trayicon.o" "CMakeFiles/krfb.dir/krfbserver.o" "CMakeFiles/krfb.dir/manageinvitationsdialog.o" "CMakeFiles/krfb.dir/invitationmanager.o" "CMakeFiles/krfb.dir/invitedialog.o" "CMakeFiles/krfb.dir/invitation.o" "CMakeFiles/krfb.dir/connectiondialog.o" "CMakeFiles/krfb.dir/personalinvitedialog.o" "CMakeFiles/krfb.dir/connectioncontroller.o" "CMakeFiles/krfb.dir/events.o" "CMakeFiles/krfb.dir/framebuffer.o" "CMakeFiles/krfb.dir/qtframebuffer.o" "CMakeFiles/krfb.dir/x11framebuffer.o" "CMakeFiles/krfb.dir/krfbconfig.o"   -o krfb -rdynamic -L/usr/lib/qt4/lib -L/home/kde4/lib -ljpeg -lslp -lvncserver -lXdamage -lQtCore -lpthread -lkdecore -lkdeui -lkdnssd -lQtSvg -lkdecore -lQtCore -lpthread -lQtNetwork -lQtDBus -lz -lbz2 -lresolv -lSM -lICE -lX11 -lXext -lXft -lXau -lXdmcp -lQtGui -lQtXml -lXcursor -lXfixes -Wl,-rpath,/home/kde4/lib:/usr/lib/qt4/lib:/home/kde4/lib 

**********
Workaround: manually issue linking command, adding -lXtst - build then continues as normal, installs, and runs as expected.

This appears to be a problem with the X11_XTest_FOUND variable never being properly defined. In my CMakeCache.txt, I have lines that look like:

//Path to a file.
X11_XTest_INCLUDE_PATH:PATH=/usr/include

//Path to a library.
X11_XTest_LIB:FILEPATH=/usr/lib/libXtst.so

**********
The wrinkle: 
in kdenetwork/krfb/CMakeLists.txt 

if(X11_XTest_FOUND)
  target_link_libraries(krfb ${X11_XTest_Lib})
endif(X11_XTest_FOUND)

but X11_XTest_FOUND is never defined.  IF I define it manually before the build, it builds as expected.

***********
This wasn't detected before as earlier versions of X included the XTest symbols inside Xext, so missing the link to Xtst was not fatal to these X versions.  Apparently the X version distributed by Mandriva 2008 has this separated, which triggered the problem.
Comment 1 Gabriel C 2008-01-07 00:51:13 UTC
Just a typo attached patch fixes it.

 
Comment 2 Gabriel C 2008-01-07 00:53:05 UTC
Created attachment 22882 [details]
typo fix for krfb/CMakeLists.txt
Comment 3 Urs Wolfer 2008-03-09 15:11:51 UTC
SVN commit 783749 by uwolfer:

Fix typo. Patch by crazy.
BUG:155173

 M  +1 -1      CMakeLists.txt  


WebSVN link: http://websvn.kde.org/?view=rev&revision=783749