Closed kaijk closed 2 years ago
lirc documentation lirc source (message by IssueLinks)
I looked at this a bit more.
/usr/include/lirc/
within the HA container, although maybe this directory would be created by gcc.gcc
itself is missing from HA's alpine OS. I added it with apk add gcc
python-lirc==1.2.3
installation process then gets a bit further, but fails when it cannot find <limits.h>
to #include
linux-headers
(apk add linux-headers
) and limits.h
is now found at /usr/include/linux
.
However, that library is still not found during the buildalpine-sdk
by apk add alpine-sdk
. This cleared the <limits.h>
not found error.However, now the build fails trying to #include "lirc/lirc_client.h"
which is not found.
I don't know how to proceed from there, but I hope this is helpful.
Here's the relevant bit of the log:
│ exit code: 1
╰─> [12 lines of output]
running bdist_wheel
running build
running build_ext
creating build
creating build/temp.linux-armv7l-3.9
creating build/temp.linux-armv7l-3.9/lirc
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fno-semantic-interposition -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/usr/include/lirc/ -I/usr/local/include/python3.9 -c lirc/lirc.c -o build/temp.linux-armv7l-3.9/lirc/lirc.o
lirc/lirc.c:276:10: fatal error: lirc/lirc_client.h: No such file or directory
276 | #include "lirc/lirc_client.h"
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for python-lirc
error: subprocess-exited-with-error
× Running setup.py install for python-lirc did not run successfully.
│ exit code: 1
╰─> [14 lines of output]
running install
/usr/local/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_ext
creating build
creating build/temp.linux-armv7l-3.9
creating build/temp.linux-armv7l-3.9/lirc
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fno-semantic-interposition -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/usr/include/lirc/ -I/usr/local/include/python3.9 -c lirc/lirc.c -o build/temp.linux-armv7l-3.9/lirc/lirc.o
lirc/lirc.c:276:10: fatal error: lirc/lirc_client.h: No such file or directory
276 | #include "lirc/lirc_client.h"
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> python-lirc
The problem
I'm attempting to blast IR commands from HA to my IR controlled devices, largely replicating the
irsend
example shown in the lirc integration page's documentation.irsend
is the LIRC component that issues IR commands.Including
lirc:
inconfiguration.yaml
causes HA to attempt to installpython-lirc==1.2.3
.Note the following from the lirc integration manifest:
"requirements": ["python-lirc==1.2.3"]
Python-lirc installation fails and the LIRC integration cannot be loaded.
Please see logs below.
Note: I have lirc 0.10.1 installed in my RasPi Debian Buster environment. It works fine, but
irsend
is not available to the HA container due to missing lirc libraries that, perhaps, python-lirc used to install. So, HA cannot use ashell_command
to directly or indirectly runirsend
.As a test, I docker exec'd into the HA container, symbolically linked
irsend
and ran it. A number of lirc libraries then report as missing. binding those libraries from the host to the container in my docker-compose file didn't help.THANKS!
What version of Home Assistant Core has the issue?
2022.4.7
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Container
Integration causing the issue
lirc
Link to integration documentation on our website
https://www.home-assistant.io/integrations/lirc/
Diagnostics information
No response
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
No response