Skip to content
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

Rewrite KNXD to use Debian package during installation #651

Closed
holgerfriedrich opened this issue Aug 6, 2019 · 8 comments · Fixed by #1188
Closed

Rewrite KNXD to use Debian package during installation #651

holgerfriedrich opened this issue Aug 6, 2019 · 8 comments · Fixed by #1188
Labels
optional component Not part of the base system

Comments

@holgerfriedrich
Copy link
Member

Installing optional component knxd fails on RPI3B+ with Buster.
This is probably an issue with upstream repos.

/bin/bash ../../libtool --tag=CXX --mode=link g++ -g -O2 -std=c++0x -Wno-subobject-linkage -o findknxusb findknxusb.o -lusb-1.0 -lev -lfmt libtool: link: g++ -g -O2 -std=c++0x -Wno-subobject-linkage -o findknxusb findknxusb.o -lusb-1.0 -lev -lfmt g++ -DHAVE_CONFIG_H -I. -I../.. -I../../src/libserver -I../../src/common -I/usr/include/libusb-1.0 -I/root/knxdbuild/fmt -g -O2 -std=c++0x -Wno-subobject-linkage -MT usb.o -MD -MP -MF .deps/usb.Tpo -c -o usb.o usb.cpp In file included from /usr/lib/gcc/arm-linux-gnueabihf/8/include-fixed/limits.h:194, from /usr/lib/gcc/arm-linux-gnueabihf/8/include-fixed/syslimits.h:7, from /usr/lib/gcc/arm-linux-gnueabihf/8/include-fixed/limits.h:34, from /usr/include/libusb-1.0/libusb.h:62, from usb.h:24, from usb.cpp:23: /root/knxdbuild/fmt/fmt/format.h: In member function ‘void fmt::internal::ArgFormatterBase::visit_char(int)’: /root/knxdbuild/fmt/fmt/format.h:1825:20: error: expected unqualified-id before numeric constant const unsigned CHAR_WIDTH = 1; ^~~~~~~~~~ [...few more warnings...] make[3]: *** [Makefile:501: usb.o] Error 1 make[3]: Leaving directory '/root/knxdbuild/knxd/src/usb' make[2]: *** [Makefile:394: all-recursive] Error 1 make[2]: Leaving directory '/root/knxdbuild/knxd/src' make[1]: *** [Makefile:442: all-recursive] Error 1 make[1]: Leaving directory '/root/knxdbuild/knxd' make: *** [Makefile:378: all] Error 2 Created symlink /etc/systemd/system/multi-user.target.wants/knxd.service → /lib/systemd/system/knxd.service. Created symlink /etc/systemd/system/network-online.target.wants/knxd.service → /lib/systemd/system/knxd.service. Removed /etc/systemd/system/multi-user.target.wants/hciuart.service. Please reboot your device! OK. Please restart your system now...

Actually this is a weird error caused by a name conflict between libfmt and glibc. Newer glibc includes define CHAR_WIDTH to 8, resulting in the code const unsigned 8 = 1.
See also fmtlib/fmt#616
This is fixed in libfmt 5.0.0, though the script we download is using tags/3.0.0.

The question is how to get a hotfix for openhabian in here, either patching the header file or switching to a newer tag.

holgerfriedrich added a commit to holgerfriedrich/openhabian that referenced this issue Aug 6, 2019
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
holgerfriedrich added a commit to holgerfriedrich/openhabian that referenced this issue Aug 6, 2019
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
holgerfriedrich added a commit to holgerfriedrich/openhabian that referenced this issue Aug 6, 2019
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
holgerfriedrich added a commit to holgerfriedrich/openhabian that referenced this issue Aug 6, 2019
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
@EliasGabrielsson EliasGabrielsson changed the title knxd install fails due to build error Rewrite KNXD to use Debian package during installation Aug 8, 2019
@EliasGabrielsson
Copy link
Contributor

@EliasGabrielsson EliasGabrielsson added bug-regression optional component Not part of the base system labels Aug 8, 2019
@EliasGabrielsson EliasGabrielsson added this to the Upcoming Development milestone Aug 8, 2019
EliasGabrielsson pushed a commit that referenced this issue Aug 8, 2019
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
@mstormi
Copy link
Contributor

mstormi commented Jun 24, 2020

@holgerfriedrich please update us, is this still an issue with current openHABian ? Can we, should we move over to apt ?

@holgerfriedrich
Copy link
Member Author

@mstormi Just had a look at the script we fetch from the external repo. Still maintained, but also changing some other settings like bluetooth. Checks for RPI3, but will probably miss RPI4.
Anyway, we should move over to deb package, if there is one. https://packages.debian.org/buster/knxd

I cannot properly do this as I do not use knxd and do not know specifics about the knxd library.

@mstormi
Copy link
Contributor

mstormi commented Sep 25, 2020

@holgerfriedrich since you opened this issue do you still see a need to take action here ?
If no, please close.
If yes, would you be willing to jump in ? I wouldn't know who's capable of this if not you so would also close in that case as there's no point in carrying forward these sort of ghost issues.

@mstormi
Copy link
Contributor

mstormi commented Oct 11, 2020

On https://michlstechblog.info/blog/raspberry-pi-eibknx-ip-gateway-and-router-with-knxd/#more-3759 the author says
"I agree with you that on debian systems the install-debian.sh script is the prefered way. I also give interested user the hint that knxd is already included in debian and that its no longer needed to compile it yourself."
I just checked yes knxd package is available and installs fine.

So we should move there. Can you replace the code with a package install? Nothing else, it's not our business to configure it and get it running.

@holgerfriedrich
Copy link
Member Author

Let me summarize:

We have an implementation based on a script which is loaded from github. It compiles and installs current master of knxd and cares for udev rules which eases connection of the hardware interface. It depends on the script developer, especially when it comes to new hardware or other changes. Updates will not be installed. Installation is done using make install, no wrapper like checkinstall is used to build and install a package, so uninstall only possible manually. Though, it installs latest master version, typically newer than any package can do. It is known to be working, at least in the past.

Debian/Raspberry PI OS provides knxd package from the standard repo, Ubuntu does starting with 20.04. This would be the clean approach. However, it may be the case that for installs of openHABian on custom Linux systems the package is not available. As I don't want to offer two ways of installing knxd, so this solution would just point towards the official knxd manual in this case.

I have a better feeling to go with an official package here. I don't have hardware at hand to test.
@EliasGabrielsson @mstormi WDYT?

@holgerfriedrich
Copy link
Member Author

btw: Hotfixes that we introduced to fix the build are obsolete and can be removed.

@mstormi
Copy link
Contributor

mstormi commented Oct 13, 2020

I have a better feeling to go with an official package here.

So do I. Was my comment ambiguous ?

I don't have hardware at hand to test.

Neither do I nor any other maintainer. That's why I said anything beyond pure installation of the package is not our business hence this PR should be a matter of minutes only, shouldn't it.

holgerfriedrich added a commit to holgerfriedrich/openhabian that referenced this issue Oct 14, 2020
standard package repository

Changed from building and installing latest source to installing the
knxd package provided by several distrubutions. Package is available
in Debian, Raspberry Pi OS, and Ubuntu (starting 20.04). Closes openhab#651.

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
holgerfriedrich added a commit to holgerfriedrich/openhabian that referenced this issue Oct 14, 2020
standard package repository

Changed from building and installing latest source to installing the
knxd package provided by several distrubutions. Package is available
in Debian, Raspberry Pi OS, and Ubuntu (starting 20.04). Closes openhab#651.

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
holgerfriedrich added a commit to holgerfriedrich/openhabian that referenced this issue Oct 14, 2020
standard package repository

Changed from building and installing latest source to installing the
knxd package provided by several distrubutions. Package is available
in Debian, Raspberry Pi OS, and Ubuntu (starting 20.04). Closes openhab#651.

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
holgerfriedrich added a commit to holgerfriedrich/openhabian that referenced this issue Oct 14, 2020
…ository

Changed from building and installing latest source to installing the
knxd package provided by several distrubutions. Package is available
in Debian, Raspberry Pi OS, and Ubuntu (starting 20.04). Closes openhab#651.

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
holgerfriedrich added a commit to holgerfriedrich/openhabian that referenced this issue Oct 14, 2020
…ository

Changed from building and installing latest source to installing the
knxd package provided by several distrubutions. Package is available
in Debian, Raspberry Pi OS, and Ubuntu (starting 20.04). Closes openhab#651.

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
holgerfriedrich added a commit to holgerfriedrich/openhabian that referenced this issue Oct 14, 2020
…ository

Changed from building and installing latest source to installing the
knxd package provided by several distrubutions. Package is available
in Debian, Raspberry Pi OS, and Ubuntu (starting 20.04). Closes openhab#651.
Added bats test case.

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
holgerfriedrich added a commit to holgerfriedrich/openhabian that referenced this issue Oct 14, 2020
…sitory

Changed from building and installing latest source to installing the
knxd package provided by several distrubutions. Package is available
in Debian, Raspberry Pi OS, and Ubuntu (starting 20.04). Closes openhab#651.
Added bats test case.

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
holgerfriedrich added a commit that referenced this issue Oct 15, 2020
…sitory

Changed from building and installing latest source to installing the
knxd package provided by several distrubutions. Package is available
in Debian, Raspberry Pi OS, and Ubuntu (starting 20.04). Closes #651.
Added bats test case.

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
optional component Not part of the base system
Projects
None yet
3 participants