Bug 187260

Summary: x11-toolkits/qt5-gui Compile error: linux/kd.h not found
Product: Ports & Packages Reporter: martin
Component: Individual Port(s)Assignee: freebsd-kde (group) <kde>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description martin 2014-03-04 17:30:00 UTC
x11-toolkits/qt5-gui fails to build with the error:

input/evdevmouse/qevdevmousehandler.cpp:56:10: fatal error: 'linux/kd.h' file not found
#include <linux/kd.h>

I fixed this by replacing the header with <sys/kbio.h>, I lifted this solution from graphics/svgalib, which I found after a little grepping.

Then I get this error:

clang++ -Wl,--no-undefined -Wl,-O1 -pthread -Wl,-rpath,/usr/local/lib -shared -o libqxcb.so .obj/qxcbclipboard.o  .obj/qxcbconnection.o  .obj/qxcbintegration.o  .obj/qxcbkeyboard.o  .obj/qxcbmime.o  .obj/qxcbdrag.o  .obj/qxcbscreen.o  .obj/qxcbwindow.o  .obj/qxcbbackingstore.o  .obj/qxcbwmsupport.o  .obj/main.o  .obj/qxcbnativeinterface.o  .obj/qxcbcursor.o  .obj/qxcbimage.o  .obj/qxcbxsettings.o  .obj/qxcbsystemtraytracker.o  .obj/qxcbconnection_xi2.o  .obj/qxcbsessionmanager.o  .obj/qglxintegration.o  .obj/moc_qxcbconnection.o  .obj/moc_qxcbmime.o  .obj/moc_qxcbnativeinterface.o  .obj/moc_qxcbsystemtraytracker.o  -L/usr/local/lib -lX11-xcb -lXi -lxcb-render-util -lSM -lICE -lxcb-glx -lxcb-render -ldbus-1 -lxcb -lxcb-image -lxcb-icccm -lxcb-sync -lxcb-xfixes -lxcb-shm -lxcb-randr -lxcb-shape -lxcb-keysyms -lxkbcommon -L/usr/obj/usr/ports/x11-toolkits/qt5-gui/work/qtbase-opensource-src-5.2.1/lib -lQt5PlatformSupport -lfontconfig -lfreetype -lgthread-2.0 -pthread -lglib-2.0 -lintl -lX
 render -lXext -lX11 -lm -lQt5DBus -lQt5Gui -lQt5Core -lGL 
.obj/qxcbconnection.o: In function `QXcbConnection::initializeXKB()':
qxcbconnection.cpp:(.text+0x1d3a): undefined reference to `xcb_xkb_id'
qxcbconnection.cpp:(.text+0x1d70): undefined reference to `xcb_xkb_use_extension'
qxcbconnection.cpp:(.text+0x1d7c): undefined reference to `xcb_xkb_use_extension_reply'
qxcbconnection.cpp:(.text+0x1dd2): undefined reference to `xcb_xkb_select_events_checked'
.obj/qxcbconnection.o:(.data.rel.ro+0x28): undefined reference to `xcb_xkb_id'
.obj/qxcbkeyboard.o: In function `QXcbKeyboard::updateKeymap()':
qxcbkeyboard.cpp:(.text+0x388): undefined reference to `xcb_xkb_get_state'
qxcbkeyboard.cpp:(.text+0x394): undefined reference to `xcb_xkb_get_state_reply'
.obj/qxcbkeyboard.o: In function `QXcbKeyboard::QXcbKeyboard(QXcbConnection*)':
qxcbkeyboard.cpp:(.text+0xd3b): undefined reference to `xcb_xkb_get_device_info'
qxcbkeyboard.cpp:(.text+0xd4b): undefined reference to `xcb_xkb_get_device_info_reply'
.obj/qxcbkeyboard.o: In function `QXcbKeyboard::updateVModMapping()':
qxcbkeyboard.cpp:(.text+0xde9): undefined reference to `xcb_xkb_get_names'
qxcbkeyboard.cpp:(.text+0xdf9): undefined reference to `xcb_xkb_get_names_reply'
qxcbkeyboard.cpp:(.text+0xe0d): undefined reference to `xcb_xkb_get_names_value_list'
qxcbkeyboard.cpp:(.text+0xe52): undefined reference to `xcb_xkb_get_names_value_list_unpack'
.obj/qxcbkeyboard.o: In function `QXcbKeyboard::updateVModToRModMapping()':
qxcbkeyboard.cpp:(.text+0x10e6): undefined reference to `xcb_xkb_get_map'
qxcbkeyboard.cpp:(.text+0x10f6): undefined reference to `xcb_xkb_get_map_reply'
qxcbkeyboard.cpp:(.text+0x110a): undefined reference to `xcb_xkb_get_map_map'
qxcbkeyboard.cpp:(.text+0x1168): undefined reference to `xcb_xkb_get_map_map_unpack'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)


This seems to be defined in /usr/local/include/xcb/xkb.h, which is part of x11/libxcb; I have the latest version installed (1.9.3).

I fixed this by adding:
-lxcb-xkb
to /src/plugins/platforms/xcb/Makefile.xcb-plugin in the LIBS variable

After this, build & install seem to work okay.

Sorry for not providing a patch to fix this in the port. :-( I have a number of other things I *really* need to get done, and it's been ages since I did anything serious with the port system & CMake...
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2014-03-10 03:51:16 UTC
Responsible Changed
From-To: freebsd-ports-bugs->kde

Over to maintainer(s).
Comment 2 Max Brazhnikov freebsd_committer freebsd_triage 2014-03-10 08:31:15 UTC
State Changed
From-To: open->feedback

Please, show output of 'make configure WANT_QT_VERBOSE_CONFIGURE=1' and 
list of installed ports.
Comment 3 martin 2014-03-20 17:56:52 UTC
On Mon, Mar 10, 2014 at 08:31:15AM +0000, makc@FreeBSD.org wrote:
> Synopsis: x11-toolkits/qt5-gui Compile error: linux/kd.h not found
> 
> State-Changed-From-To: open->feedback
> State-Changed-By: makc
> State-Changed-When: Mon Mar 10 08:31:15 UTC 2014
> State-Changed-Why: 
> Please, show output of 'make configure WANT_QT_VERBOSE_CONFIGURE=1' and
> list of installed ports.
> 
> http://www.freebsd.org/cgi/query-pr.cgi?pr=187260

Thanks for your reply.

I did a `portsnap fetch update', pkg_delete qt5\*, and reinstalled qt5-gui with
the verbose option.
It builds & installs okay now. With or without the WANT_QT_VERBOSE_CONFIGURE
flag.

- I have a /usr/local/include/linux/kd.h now, installed by svgalib-1.4.3_6

  This seems to be incidentally installed, +REQUIRED_BY lists:
	ghostscript9-9.06_5
	libspectre-0.2.6_1
	evince-2.32.0_12

  I incidentally installed evince a few days ago.

  Conclusion: svgalib should be listed as a dependency?

- As for the missing -lxcb-xkb ... I don't know... It doesn't appear in
  /usr/local/libdata/pkgconfig except in the xcb-xkb package itself. I have no
  idea why it didn't work before, but works now...
Comment 4 dfilter service freebsd_committer freebsd_triage 2014-05-12 14:51:09 UTC
Author: rakuco
Date: Mon May 12 13:51:04 2014
New Revision: 353821
URL: http://svnweb.freebsd.org/changeset/ports/353821
QAT: https://qat.redports.org/buildarchive/r353821/

Log:
  Explicitly disable evdev support.
  
  This is Linux-specific, and support for it may be accidentally enabled
  because the compiler test for it passes if multimedia/v4l_compat is
  installed, since it installs linux/input.h into ${LOCALBASE}/include.
  
  PR:		ports/187260
  MFH:		2014Q2

Modified:
  head/x11-toolkits/qt5-gui/Makefile

Modified: head/x11-toolkits/qt5-gui/Makefile
==============================================================================
--- head/x11-toolkits/qt5-gui/Makefile	Mon May 12 13:50:11 2014	(r353820)
+++ head/x11-toolkits/qt5-gui/Makefile	Mon May 12 13:51:04 2014	(r353821)
@@ -28,7 +28,8 @@ USE_QT5=	core dbus qmake_build buildtool
 QT_DIST=	base
 USE_XORG=	x11 xi xrender
 HAS_CONFIGURE=	yes
-CONFIGURE_ARGS=	-no-eglfs
+CONFIGURE_ARGS=	-no-eglfs \
+		-no-evdev
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
 
 BUILD_WRKSRC=	${WRKSRC}/src/${PORTNAME}
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 5 Raphael Kubo da Costa freebsd_committer freebsd_triage 2014-05-12 14:51:44 UTC
State Changed
From-To: feedback->closed

Fixed the linux/kd.h problem in r353821.
Comment 6 dfilter service freebsd_committer freebsd_triage 2014-05-14 22:37:21 UTC
Author: rakuco
Date: Wed May 14 21:37:18 2014
New Revision: 354088
URL: http://svnweb.freebsd.org/changeset/ports/354088
QAT: https://qat.redports.org/buildarchive/r354088/

Log:
  MFH: r353821
  
  Explicitly disable evdev support.
  
  This is Linux-specific, and support for it may be accidentally enabled
  because the compiler test for it passes if multimedia/v4l_compat is
  installed, since it installs linux/input.h into ${LOCALBASE}/include.
  
  PR:		ports/187260
  
  Approved by:	portmgr (antoine)

Modified:
  branches/2014Q2/x11-toolkits/qt5-gui/Makefile
Directory Properties:
  branches/2014Q2/   (props changed)

Modified: branches/2014Q2/x11-toolkits/qt5-gui/Makefile
==============================================================================
--- branches/2014Q2/x11-toolkits/qt5-gui/Makefile	Wed May 14 20:36:00 2014	(r354087)
+++ branches/2014Q2/x11-toolkits/qt5-gui/Makefile	Wed May 14 21:37:18 2014	(r354088)
@@ -27,7 +27,8 @@ USE_QT5=	core dbus qmake_build buildtool
 QT_DIST=	base
 USE_XORG=	x11 xi xrender
 HAS_CONFIGURE=	yes
-CONFIGURE_ARGS=	-no-eglfs
+CONFIGURE_ARGS=	-no-eglfs \
+		-no-evdev
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
 
 BUILD_WRKSRC=	${WRKSRC}/src/${PORTNAME}
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"