nkadel / samba4repo

Wrapper for SRPM building tools for Samba with domain controller on RHEL and Fedora
13 stars 11 forks source link

Compilation error on CentOS-7 #8

Closed swalterfub closed 3 years ago

swalterfub commented 3 years ago

Hi, First thanks for the great effort! I seem to be on the right path... everything installs and compiles fine (I disabled all alien targets in the Makefiles manually), except at the actual samba-4.13.x-srpm. The src rpm is getting built, but when I try to install it, I get the following error:

[root@samba4a rpmbuild]# rpmbuild --rebuild SRPMS/samba-4.13.2-0.el7.src.rpm 
Installing SRPMS/samba-4.13.2-0.el7.src.rpm
error: Failed build dependencies:
    avahi-devel is needed by samba-0:4.13.2-0.el7.x86_64
    bison is needed by samba-0:4.13.2-0.el7.x86_64
    cups-devel is needed by samba-0:4.13.2-0.el7.x86_64
    dbus-devel is needed by samba-0:4.13.2-0.el7.x86_64
    e2fsprogs-devel is needed by samba-0:4.13.2-0.el7.x86_64
    flex is needed by samba-0:4.13.2-0.el7.x86_64
    krb5-devel >= 1.15.1 is needed by samba-0:4.13.2-0.el7.x86_64
    libcap-devel is needed by samba-0:4.13.2-0.el7.x86_64
    libcmocka-devel is needed by samba-0:4.13.2-0.el7.x86_64
    rpcbind is needed by samba-0:4.13.2-0.el7.x86_64
    libtirpc-devel is needed by samba-0:4.13.2-0.el7.x86_64
    perl-generators is needed by samba-0:4.13.2-0.el7.x86_64
    perl(Archive::Tar) is needed by samba-0:4.13.2-0.el7.x86_64
    perl(Test::More) is needed by samba-0:4.13.2-0.el7.x86_64
    quota-devel is needed by samba-0:4.13.2-0.el7.x86_64
    xfsprogs-devel is needed by samba-0:4.13.2-0.el7.x86_64
    python3-iso8601 is needed by samba-0:4.13.2-0.el7.x86_64
    libtalloc-devel >= 2.3.1 is needed by samba-0:4.13.2-0.el7.x86_64
    python3-talloc-devel >= 2.3.1 is needed by samba-0:4.13.2-0.el7.x86_64
    libtevent-devel >= 0.10.2 is needed by samba-0:4.13.2-0.el7.x86_64
    python3-tevent >= 0.10.2 is needed by samba-0:4.13.2-0.el7.x86_64
    libtdb-devel >= 1.4.3 is needed by samba-0:4.13.2-0.el7.x86_64
    python3-tdb >= 1.4.3 is needed by samba-0:4.13.2-0.el7.x86_64
    libldb-devel >= 2.2.0 is needed by samba-0:4.13.2-0.el7.x86_64
    python3-ldb-devel >= 2.2.0 is needed by samba-0:4.13.2-0.el7.x86_64
    ldb-tools is needed by samba-0:4.13.2-0.el7.x86_64
    tdb-tools is needed by samba-0:4.13.2-0.el7.x86_64
    python3-markdown is needed by samba-0:4.13.2-0.el7.x86_64

Actually, this was a second step for getting a more in-depth error message. The first regular "make" in the parent directory (samba4repo) gave me:

(cd samba-4.13.x-srpm && make  install)
make[1]: Entering directory `/root/samba4repo/samba-4.13.x-srpm'
Actally building src.rpm in samba4repo-7-x86_64

ERROR: Exception(src.rpm) Config(samba4repo-7-x86_64) 9 minutes 0 seconds
ERROR: Command failed: 
 # /usr/bin/systemd-nspawn -q -M c95dfe8458714c1f84decf8dfb8fb97d -D /var/lib/mock/samba4repo-7-x86_64/root -u mockbuild --capability=cap_ipc_lock --bind=/tmp/mock-resolv.1pi8q4um:/etc/resolv.conf --bind=/dev/btrfs-control --bind=/dev/loop-control --bind=/dev/loop0 --bind=/dev/loop1 --bind=/dev/loop2 --bind=/dev/loop3 --bind=/dev/loop4 --bind=/dev/loop5 --bind=/dev/loop6 --bind=/dev/loop7 --bind=/dev/loop8 --bind=/dev/loop9 --bind=/dev/loop10 --bind=/dev/loop11 --setenv=TERM=vt100 --setenv=SHELL=/bin/bash --setenv=HOME=/builddir --setenv=HOSTNAME=mock --setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin --setenv=PROMPT_COMMAND=printf "\033]0;<mock-chroot>\007" --setenv=PS1=<mock-chroot> \s-\v\$  --setenv=LANG=C.UTF-8 bash --login -c /usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/samba.spec

make[1]: *** [samba4repo-7-x86_64] Error 1
make[1]: Leaving directory `/root/samba4repo/samba-4.13.x-srpm'
make: *** [samba-4.13.x-srpm] Error 2
[root@samba4a samba4repo]# 

Any clue? Thanks for your help!

nkadel commented 3 years ago

"make build" relies on having all the dependencies. all of them, including the ones that I set up to build automatically, the other ordered dependencies to build for CentOS 7. That is exactly why I suggested using "mock" to build dependencies, and assemble them in the right order, with a local yum repo to hold the locally compiled dependencies. When it's done, you can use the "make repo" command to verify that an "/etc/yum.repos.d/samba4repo.repo" matches the locally built one.

"make" failed precisely because you disabled all the other dependencies. It's like trying to start your car after you took out the battery and the carburetor. It's not likely to work well, even if you put in the standard CentOS 7 and EPEL 7 versions of all the dependencies that are available.

swalterfub commented 3 years ago

Thank you for your help. I did not disable the dependencies, but the "alien" repos (as I drive CentOS7, I disabled CentOS8, fedora and amz) and the mock configs to the distributions other than mine (epel-8, fedora-33, amazonlinux-2). The packages compat-nettle34, libtalloc, libtdb, libtevent, compat-gnultls36 are all built fine without problems (I had to disable the foreign distributions in the subfolder's Makefiles as well).

nkadel commented 3 years ago

Sounds like it's working for you. Good.