[Bug 240964] x11-toolkits/qt5-gui: 5.13.0 fails to build

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Oct 6 10:02:31 BST 2019


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240964

Ting-Wei Lan <lantw44 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lantw44 at gmail.com

--- Comment #13 from Ting-Wei Lan <lantw44 at gmail.com> ---
(In reply to Walter Schwarzenfeld from comment #7)
This is still a workaround. You just made the #ifdef check be always false
because you checked it before including files which could define it. Therefore,
the patch you wrote

+#ifdef Q_OS_FREEBSD
+#include <dev/evdev/input.h>
+#else
+#include <linux/input.h>
+#endif

is effectively

+#include <linux/input.h>

because the false branch is always taken.

The reason of the compilation error is that both dev/evdev/input.h (from base)
and linux/input.h (from devel/evdev-proto) declare the same things. They use
different macros as header guards, so including one does not prevent the other
one from being included. If a source file includes both header files, it cannot
be compiled because of the redefinition error shown above.

Qt uses dev/evdev/input.h here, while mtdev.h provided by devel/libmtdev uses
linux/input.h. Since Qt also includes mtdev.h in this file, it causes a
conflict. This doesn't happen in poudriere because devel/libmtdev does not
RUN_DEPENDS on devel/evdev-proto, so devel/evdev-proto isn't installed in the
poudriere environment. Therefore, even if devel/libmtdev is pulled in by
x11/libinput and installed in the poudriere environment, Qt still disables
mtdev because including mtdev.h causes an error due to missing linux/input.h.

I think devel/libmtdev should add devel/evdev-proto as RUN_DEPENDS, and headers
installed by devel/evdev-proto should probably guard equivalent headers from
base from being included.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the kde-freebsd mailing list