CentOS 7 - Samba Server + Utils build failing

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]$

Just tested with latest dev version (samba4 + utils) and compiled fine for me?
Try do a clean got clone for the openwrt dev branch and rebuild.

Did a complete new git clone and build, seems to be the same issue. Here's the full log from e2fs compilation

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.

Can you check if there is a valid:

openwrt/staging_dir/target-arm_cortex-a9+vfpv3_musl_eabi/usr/lib/pkgconfig/com_err.pc
openwrt/staging_dir/target-arm_cortex-a9+vfpv3_musl_eabi/pkginfo/libcomerr.provides

Here it is:

[openwrt@servme ~]$ cat openwrt/staging_dir/target-arm_cortex-a9+vfpv3_musl_eabi/usr/lib/pkgconfig/com_err.pc
prefix=/usr
exec_prefix=/usr
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: com_err
Description: Common error description library
Version: 1.44.5
Requires:
Cflags: -I${includedir}/et -I${includedir}
Libs: -L${libdir} -lcom_err
Libs.private: 
[openwrt@servme ~]$ cat openwrt/staging_dir/target-arm_cortex-a9+vfpv3_musl_eabi/pkginfo/libcomerr.provides
libc.so
libcom_err.so.0
libcom_err.so.0.0
libgcc_s.so.1
libuuid.so.1
libuuid.so.1.3.0

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.

Could this be related to gnutls version in any case? Here's the config.log you've requested. https://gist.github.com/gxgani/1abdfb52aeaacdac8cb36d200cc7b320

I am able to build on debian 10 rc2 (vm) but my server's on CentOS 7.

Only if you build with SERVER_AD_DC otherwise gnutls is not needed.

Hmm..
The config log ends

[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'?

Any clue?

not really looks like something is breaking the openwrt build system, since _FORTIFY_SOURCE is defined by the global openwrt sdk.

PS: Maybe its better to use one of the openwrt docker containers to build openwrt, to avoid those problems.

Thanks, switched Openwrt docker container to build for now.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.