New: KODI: --enable-lirc needs "HAVE_LIRC" compiler definition to use the lirc subsystem
https://bugs.busybox.net/show_bug.cgi?id=9596
Bug ID: 9596
Summary: KODI: --enable-lirc needs "HAVE_LIRC" compiler
definition to use the lirc subsystem
Product: buildroot
Version: unspecified
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: unassigned at buildroot.uclibc.org
Reporter: lipkegu at gmail.com
CC: buildroot at uclibc.org
Target Milestone: ---
When compiling kodi, with option --enable-lirc, the Lirc subsystem doesnt get initialized when "-DHAVE_LIRC isnt set. normaly --enable-lirc should set it but it doesnt.
Reproduce case:
https://github.com/xbmc/xbmc/blob/8d4a5bba55638dfd0bdc5e7de34f3e5293f99933/xbmc/input/ButtonTranslator.cpp#L601
I removed the "HAVE_LIRC" definition from the code and the result was clear:
01:00:26.239 T:3016212480 INFO: Loading special://xbmc/system/Lircmap.xml 01:00:26.263 T:3016212480 INFO: * Adding remote mapping for device 'mceusb' 01:00:26.265 T:3016212480 INFO: * Adding remote mapping for device
'XboxDVDDongle'
01:00:26.265 T:3016212480 INFO: * Adding remote mapping for device
'Microsoft_Xbox'
01:00:26.266 T:3016212480 INFO: * Adding remote mapping for device
'PinnacleSysPCTVRemote'
01:00:26.266 T:3016212480 INFO: * Adding remote mapping for device 'anysee'
01:00:26.267 T:3016212480 INFO: * Adding remote mapping for device
'iMON-PAD'
01:00:26.267 T:3016212480 INFO: * Adding remote mapping for device
'Antec_Veris_RM200'
01:00:26.268 T:3016212480 INFO: * Adding remote mapping for device
'MCE_via_iMON'
01:00:26.268 T:3016212480 INFO: * Adding remote mapping for device
'TwinHanRemote'
01:00:26.269 T:3016212480 INFO: * Adding remote mapping for device
'linux-input-layer'
01:00:26.270 T:3016212480 INFO: * Linking remote mapping for
'linux-input-layer' to 'cx23885_remote'
01:00:26.270 T:3016212480 INFO: * Adding remote mapping for device
'mediacenter'
01:00:26.271 T:3016212480 INFO: * Adding remote mapping for device
'devinput'
01:00:26.276 T:3016212480 INFO: Loading special://profile/Lircmap.xml 01:00:26.282 T:3016212480 INFO: * Adding remote mapping for device 'mceusb' 01:00:26.283 T:3016212480 INFO: * Adding remote mapping for device
'devinput'
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 9596] KODI: --enable-lirc needs "HAVE_LIRC" compiler definition to use the lirc subsystem
https://bugs.busybox.net/show_bug.cgi?id=9596
--- Comment #1 from lipkegu at gmail.com ---
Solution:
ifeq ($(BR2_PACKAGE_KODI_LIRC),y)KODI_CONF_ENV += CXXFLAGS="$(TARGET_CXXFLAGS) $(PKG_CONFIG_HOST_BINARY) --cflags --libs egl -DHAVE_LIRC"KODI_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) $(PKG_CONFIG_HOST_BINARY) --cflags --libs egl -DHAVE_LIRC"KODI_CONF_OPTS += --enable-lirc
elseKODI_CONF_OPTS += --disable-lirc
endif
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 9596] KODI: --enable-lirc needs "HAVE_LIRC" compiler definition to use the lirc subsystem
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=9596
Bernd Kuhls <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at buildroot.uclibc |bernd.kuhls at t-online.de
|.org |
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 9596] KODI: --enable-lirc needs "HAVE_LIRC" compiler definition to use the lirc subsystem
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=9596
--- Comment #2 from Thomas Petazzoni <[email protected]> --- I don't see why this is needed: when --enable-lirc is passed, and the lirc library is found, the configure script defines HAVE_LIRC:
AC_ARG_ENABLE([lirc],
[AS_HELP_STRING([--disable-lirc], [disable lirc support (default is enabled)])], [AC_MSG_RESULT("Lirc disabled")], [AC_DEFINE([HAVE_LIRC], [1], ["Lirc enabled"])])
And then, when HAVE_LIRC is defined, HAS_LIRC gets defined by xbmc/system.h:
#ifdef HAVE_LIRC
#define HAS_LIRC
#endif
And HAS_LIRC is the define being tested at the code you point to.
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 9596] KODI: --enable-lirc needs "HAVE_LIRC" compiler definition to use the lirc subsystem
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=9596
--- Comment #3 from Thomas Petazzoni <[email protected]> --- Ok, so I had a closer look, and the configure.ac code is completely wrong:
AC_ARG_ENABLE([lirc],
[AS_HELP_STRING([--disable-lirc], [disable lirc support (default is enabled)])], [AC_MSG_RESULT("Lirc disabled")], [AC_DEFINE([HAVE_LIRC], [1], ["Lirc enabled"])])
So what this does is:
* If a --enable-lirc or --disable-lirc option is passed, prints "Lirc
disabled"
* If none of --enable-lirc or --disable-lirc is passed, it defines HAVE_LIRC.
As you can see, this is completely bogus. It should instead be something like:
AC_ARG_ENABLE([lirc],
[AS_HELP_STRING([--disable-lirc],
[disable lirc support (default is enabled)])],
[use_lirc=$enableval])
if "${use_lirc}" = "yes" ; then
AC_DEFINE([HAVE_LIRC], [1], ["Lirc enabled"])]
fi
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 9596] KODI: --enable-lirc needs "HAVE_LIRC" compiler definition to use the lirc subsystem
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=9596
--- Comment #4 from Bernd Kuhls <[email protected]> --- Meanwhile Kodi was bumped to 17.1, the build system was changed to CMake. Please try again and report whether the bug is solved or not, thanks!
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 9596] KODI: --enable-lirc needs "HAVE_LIRC" compiler definition to use the lirc subsystem
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=9596
Thomas Petazzoni <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED--- Comment #5 from Thomas Petazzoni <[email protected]> --- OK, let's mark the bug as fixed. The bug submitter can reopen the bug if it still exists with Kodi 17.
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.