Any interest to port knxd to FreeBSD?

60 views
Skip to first unread message

Michael Kefeder

unread,
Dec 11, 2018, 10:38:23 AM12/11/18
to knxd
Hi

Today I was trying to find out if I can get knxd running on FreeBSD 11.2. My idea was to get it running on a FreeNAS jail and therefore consolidate servers into one box. Question is, is this worth pursuing further or is nobody else interested in a FreeBSD port?

I hacked away a few compiling problems to see how much work it is, looks like the biggest part is how to fetch the MAC-Address on BSD vs Linux (which I hardcoded as a quickhack to the systems MAC), the rest are just some missing #defines and #includes.

I got it to compile but knxd or knxd_args doesn't even run, it fails with a segmentation fault right away (googling says this could be a "static initialization order" problem) and I am stumped how to fix this:

Reading symbols from src/server/knxd_args...done.
(gdb) run
Starting program: /usr/home/osboxes/knxd-upstream-0.14.27/src/server/knxd_args

Program received signal SIGSEGV, Segmentation fault.
0x0000000801edad98 in vtable for __cxxabiv1::__si_class_type_info () from /lib/libcxxrt.so.1
(gdb) bt
#0  0x0000000801edad98 in vtable for __cxxabiv1::__si_class_type_info () from /lib/libcxxrt.so.1
#1  0x0000000800ef6451 in __dynamic_cast () from /usr/local/lib/gcc7/libstdc++.so.6
#2  0x0000000800f78fb0 in bool std::has_facet<std::ctype<char> >(std::locale const&) () from /usr/local/lib/gcc7/libstdc++.so.6
#3  0x0000000800f6c4e4 in std::basic_ios<char, std::char_traits<char> >::_M_cache_locale(std::locale const&) () from /usr/local/lib/gcc7/libstdc++.so.6
#4  0x0000000800f6c970 in std::basic_ios<char, std::char_traits<char> >::init(std::basic_streambuf<char, std::char_traits<char> >*) () from /usr/local/lib/gcc7/libstdc++.so.6
#5  0x0000000800f0a551 in std::ios_base::Init::Init() () from /usr/local/lib/gcc7/libstdc++.so.6
#6  0x0000000000405347 in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at /usr/local/lib/gcc7/include/c++/iostream:74
#7  0x00000000004053ad in _GLOBAL__sub_I_ini () at knxd_args.cpp:671
#8  0x000000080061971b in ?? () from /libexec/ld-elf.so.1
#9  0x0000000800638800 in ?? ()
#10 0x00007fffffffdc80 in ?? ()
#11 0x0000000801642ac8 in ?? () from /lib/libc.so.7
#12 0x000000000000004a in ?? ()
#13 0x0000000801654a38 in ?? () from /lib/libc.so.7
#14 0x000000080163f3ec in ?? () from /lib/libc.so.7
#15 0x00007fffffffdbd8 in ?? ()
#16 0x000000080063bc00 in ?? ()
#17 0x0000000000000003 in ?? ()
#18 0x00007fffffffdc80 in ?? ()
#19 0x00007fffffffdc60 in ?? ()
#20 0x000000080061bb5d in ?? () from /libexec/ld-elf.so.1
#21 0x00007fffffffdc80 in ?? ()
#22 0x0000000000000000 in ?? ()

br
 mike

Matthias Urlichs

unread,
Dec 11, 2018, 11:18:28 AM12/11/18
to kn...@googlegroups.com
Hi,

On 11.12.18 16:38, Michael Kefeder wrote:
> I got it to compile but knxd or knxd_args doesn't even run, it fails
> with a segmentation fault right away (googling says this could be a
> "static initialization order" problem) and I am stumped how to fix this:

Fascinating. :-/ Looks like a compiler problem. knxd_args is not *that*
complicated.

MAy I ask why you're not using the system compiler?

--
-- Matthias Urlichs

Michael Kefeder

unread,
Dec 11, 2018, 2:28:02 PM12/11/18
to knxd
Good question, finding argp was hard with clang so I used gcc thinking that'll help (it did, it compiled ;))
alright redone with clang, doesn't die right away therefore looks good (access to knx hardware will be over x-mas so I can't tell for sure). Thanks for the push in the right direction!

back to my orginal question, should I keep trying to get this to run on FreeBSD and submit a pull request or is that wasted energy?

br
 mike

Matthias Urlichs

unread,
Dec 11, 2018, 3:54:29 PM12/11/18
to kn...@googlegroups.com
Hi,

On 11.12.18 20:28, Michael Kefeder wrote:
> back to my orginal question, should I keep trying to get this to run
> on FreeBSD and submit a pull request or is that wasted energy?

I'll gladly accept pull requests, assuming that they don't disrupt
anything else. ;-)

--
-- Matthias Urlichs

Matthias Fechner

unread,
Aug 18, 2019, 4:44:58 PM8/18/19
to knxd
Hi Matthias,


Am Dienstag, 11. Dezember 2018 21:54:29 UTC+1 schrieb Matthias Urlichs:
I'll gladly accept pull requests, assuming that they don't disrupt
anything else. ;-)

I created already some time ago a port for FreeBSD:
https://www.freshports.org/net/knxd/

I already got some feedback that knxd does not work for powerpc I created a pull request here:
https://github.com/knxd/knxd/pull/407

But it seems that all that are allowed to merge this are on holiday?

Happy to get some feedback.

Thanks
Matthias 

Michael Markstaller

unread,
Aug 18, 2019, 4:58:46 PM8/18/19
to kn...@googlegroups.com
Hi,

I appreciate your work (using FreeNAS running FreeBSD myself), but I'm
currently much too far away from this stuff in detail to judge your pull
request.
I'd want to wait on smurfix to look at it, worst case, remember me..

Greets,

Michael


Am 18.08.19 um 22:44 schrieb Matthias Fechner:
signature.asc
Reply all
Reply to author
Forward
0 new messages