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 ?? ()