Unable to resolve this issue on CentOS 7.6.1810 (remi, epel repo). I even tried building Samba 4.10.5 from src to get the latest libs.
Using in-tree heimdal kerberos defines
Checking for program krb5-config.heimdal : not found
Checking for program krb5-config : /usr/bin/krb5-config
Checking for system com_err : yes
Checking for library com_err : yes
Checking for com_right_r : not found
Checking for library com_err : yes
Checking for com_right_r : not found
ERROR: System library com_err of version 0.0.0 not found, and bundling disabled
make[3]: *** [/home/openwrt/openwrt/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/samba-4.9.8/.configured_9c3a88b42534c1b36d8d0c14513fce96] Error 1
make[3]: Leaving directory `/home/openwrt/openwrt/feeds/packages/net/samba4'
time: package/feeds/packages/samba4/compile#17.18#10.73#24.73
make[2]: *** [package/feeds/packages/samba4/compile] Error 2
make[2]: Leaving directory `/home/openwrt/openwrt'
make[1]: *** [/home/openwrt/openwrt/staging_dir/target-arm_cortex-a9+vfpv3_musl_eabi/stamp/.package_compile] Error 2
make[1]: Leaving directory `/home/openwrt/openwrt'
make: *** [world] Error 2
[23:14][openwrt@serveme openwrt]$
Not really sure whats going on there, we explicitly build a working libcom_err for samba, which samba seems to pick up, yet the version number check fails.
mhh looks good, no clue than why the check fails.
Upload your openwrt/build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/samba-4.9.8/bin/config.log maybe something sticks out.
PS: I'm in the process on getting 4.10.6 ready, maybe the new version will fix your problem.
[1/2] Compiling test.c
In file included from /usr/include/features.h:399:0,
from /usr/include/stdio.h:27,
from /home/openwrt/openwrt/staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-7.4.0_musl_eabi/include/fortify/stdio.h:22,
from ../test.c:587:
/usr/include/gnu/stubs.h:7:11: fatal error: gnu/stubs-32.h: No such file or directory
# include <gnu/stubs-32.h>
^~~~~~~~~~~~~~~~
compilation terminated.
From what I've researched, that's i686 library which isn't available on CentOS 7 x86_64
After installing i686 library for gcc and dependencies, I was able to go through the library com_err issue but now it's failing at:
[1/2] Compiling e[32mtest.ce[0m
<command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
<command-line>:0:0: note: this is the location of the previous definition
cc1: all warnings being treated as errors
.........
1/2] Compiling e[32mtest.ce[0m
<command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
<command-line>:0:0: note: this is the location of the previous definition
cc1: all warnings being treated as errors
........
[1/2] Compiling e[32mtest.ce[0m
arm-openwrt-linux-muslgnueabi-gcc: error: unrecognized command line option '-fstack-clash-protection'; did you mean '-fstack-protector'?