-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compilation error for IR on ubuntu 17.10 #38
Comments
Thank you for reporting this problem. |
OK - Thanks. |
Commit 33aa1d1 fixes the compilation issue with ir.c without changing most of the files in the squeezelite project. |
Works for me. Thanks very much. What would we do without you and a handful of others on LMS? |
Hi,
Having installed your own build of squeezelite from lms_clients (for which many thanks) I thought I'd had a go at compiling one myself with all the bells and whistles. All went fine except for IR. I have installed liblirc-dev 0.10.0-2, and my build line is:
OPTS="-DFFMPEG -DRESAMPLE -DVISEXPORT -DIR -DGPIO -DDSD -DLINKALL" make -B
The errors I get are all for LOG_DEBUG as below:
In file included from /usr/include/syslog.h:1:0,
from /usr/include/lirc/lirc_client.h:119,
from ir.c:28:
ir.c: In function ‘ir_key_map’:
ir.c:119:4: error: called object is not a function or function pointer
LOG_DEBUG("repeat suppressed");
^
ir.c: In function ‘ir_thread’:
ir.c:143:6: error: called object is not a function or function pointer
LOG_DEBUG("ir cmd: %s -> %x", c, ir_code);
^
ir.c:157:5: error: called object is not a function or function pointer
LOG_DEBUG("ir lirc: %s [%s] -> %x", b, r, ir_code);
^
ir.c:164:5: error: called object is not a function or function pointer
LOG_DEBUG("code dropped");
^
Makefile:87: recipe for target 'ir.o' failed
make: *** [ir.o] Error 1
After many experiments and searching, I found I could overcome this by changing ir.c to include squeezelite.h after lirc/lirc)client.h, as follows:
#if IR
#include <lirc/lirc_client.h>
#include "squeezelite.h"
I then get warnings as follows:
_In file included from ir.c:29:0:
squeezelite.h:397:0: warning: "LOG_INFO" redefined
#define LOG_INFO(fmt, ...) if (loglevel >= lINFO) logprint("%s %s:%d " fmt "\n", logtime(), FUNCTION, LINE, ##VA_ARGS)
In file included from /usr/include/syslog.h:1:0,
from /usr/include/lirc/lirc_client.h:119,
from ir.c:28:
/usr/include/x86_64-linux-gnu/sys/syslog.h:57:0: note: this is the location of the previous definition
#define LOG_INFO 6 /* informational */
In file included from ir.c:29:0:
squeezelite.h:398:0: warning: "LOG_DEBUG" redefined
#define LOG_DEBUG(fmt, ...) if (loglevel >= lDEBUG) logprint("%s %s:%d " fmt "\n", logtime(), FUNCTION, LINE, ##VA_ARGS)
In file included from /usr/include/syslog.h:1:0,
from /usr/include/lirc/lirc_client.h:119,
from ir.c:28:
/usr/include/x86_64-linux-gnu/sys/syslog.h:58:0: note: this is the location of the previous definition
#define LOG_DEBUG 7 /* debug-level messages */_
I assume that the version of liblirc on ubuntu 17.10, or the presence of some other library on my system, means that in your version of ir.c the definition of LOG_DEBUG from squeezelite.h is overridden by something in lirc/lirc_client.h.
I don't actually have IR on my system, so this is not a problem for me, but it might be for others in due course.
The text was updated successfully, but these errors were encountered: