Trouble building 5.10.3

Build System info:

  • OS: CentOS 7.7
  • nodejs: v10.19.0
  • npm: 6.13.4
  • mock: 2.1

Hello,

I’m having trouble building OpenNebula 5.10.3 from source using this guide: https://github.com/OpenNebula/packages

I’m able to create the opennebula-5.10.3.tar.gz file fine (I believe). However, when i run the centos7.sh script it fails with this error:

running install_egg_info
running egg_info
writing pyone.egg-info/PKG-INFO
writing dependency_links to pyone.egg-info/dependency_links.txt
writing requirements to pyone.egg-info/requires.txt
writing top-level names to pyone.egg-info/top_level.txt
reading manifest file 'pyone.egg-info/SOURCES.txt'
writing manifest file 'pyone.egg-info/SOURCES.txt'
Copying pyone.egg-info to /builddir/build/BUILDROOT/opennebula-5.10.3-1.el7.x86_64/usr/lib/python3.6/site-packages/pyone-5.10.3-py3.6.egg-info
running install_scripts
+ cd -
/builddir/build/BUILD/opennebula-5.10.3
+ /usr/bin/chmod -R o-rwx /builddir/build/BUILDROOT/opennebula-5.10.3-1.el7.x86_64/var/lib/one/remotes
+ /usr/lib/rpm/find-debuginfo.sh --strict-build-id -m --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 110000000 /builddir/build/BUILD/opennebula-5.10.3
extracting debug info from /builddir/build/BUILDROOT/opennebula-5.10.3-1.el7.x86_64/usr/bin/oned
extracting debug info from /builddir/build/BUILDROOT/opennebula-5.10.3-1.el7.x86_64/usr/bin/mm_sched
extracting debug info from /builddir/build/BUILDROOT/opennebula-5.10.3-1.el7.x86_64/usr/lib/one/mads/collectd
/usr/lib/rpm/sepdebugcrcfix: Updated 3 CRC32s, 0 CRC32s did match.
cpio: opennebula-5.10.3/expr_arith.cc: Cannot stat: No such file or directory
cpio: opennebula-5.10.3/expr_arith.hh: Cannot stat: No such file or directory
cpio: opennebula-5.10.3/expr_arith.y: Cannot stat: No such file or directory
cpio: opennebula-5.10.3/expr_bool.cc: Cannot stat: No such file or directory
cpio: opennebula-5.10.3/expr_bool.hh: Cannot stat: No such file or directory
cpio: opennebula-5.10.3/expr_bool.y: Cannot stat: No such file or directory
cpio: opennebula-5.10.3/expr_parser.cc: Cannot stat: No such file or directory
cpio: opennebula-5.10.3/expr_parser.h: Cannot stat: No such file or directory
cpio: opennebula-5.10.3/expr_parser.l: Cannot stat: No such file or directory
cpio: opennebula-5.10.3/template_parser.cc: Cannot stat: No such file or directory
cpio: opennebula-5.10.3/template_parser.h: Cannot stat: No such file or directory
cpio: opennebula-5.10.3/template_parser.l: Cannot stat: No such file or directory
cpio: opennebula-5.10.3/template_syntax.cc: Cannot stat: No such file or directory
cpio: opennebula-5.10.3/template_syntax.hh: Cannot stat: No such file or directory
cpio: opennebula-5.10.3/template_syntax.y: Cannot stat: No such file or directory
cpio: opennebula-5.10.3/vm_file_var_syntax.cc: Cannot stat: No such file or directory
cpio: opennebula-5.10.3/vm_file_var_syntax.hh: Cannot stat: No such file or directory
cpio: opennebula-5.10.3/vm_file_var_syntax.y: Cannot stat: No such file or directory
cpio: opennebula-5.10.3/vm_var_parser.cc: Cannot stat: No such file or directory
cpio: opennebula-5.10.3/vm_var_parser.h: Cannot stat: No such file or directory
cpio: opennebula-5.10.3/vm_var_parser.l: Cannot stat: No such file or directory
cpio: opennebula-5.10.3/vm_var_syntax.cc: Cannot stat: No such file or directory
cpio: opennebula-5.10.3/vm_var_syntax.hh: Cannot stat: No such file or directory
cpio: opennebula-5.10.3/vm_var_syntax.y: Cannot stat: No such file or directory
11232 blocks
+ /usr/lib/rpm/check-buildroot
+ /usr/lib/rpm/redhat/brp-compress
+ /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1
Bytecompiling .py files below /builddir/build/BUILDROOT/opennebula-5.10.3-1.el7.x86_64/usr/lib/python2.7 using /usr/bin/python2.7
Bytecompiling .py files below /builddir/build/BUILDROOT/opennebula-5.10.3-1.el7.x86_64/usr/lib/python3.6 using /usr/bin/python3.6
+ /usr/lib/rpm/redhat/brp-python-hardlink
+ /usr/lib/rpm/redhat/brp-java-repack-jars
Processing files: opennebula-5.10.3-1.el7.x86_64


RPM build errors:
error: File not found: /builddir/build/BUILDROOT/opennebula-5.10.3-1.el7.x86_64/usr/lib/one/ruby/cli/one_helper/oneflow_helper.rb
error: File not found: /builddir/build/BUILDROOT/opennebula-5.10.3-1.el7.x86_64/usr/lib/one/ruby/cli/one_helper/oneflowtemplate_helper.rb
    File not found: /builddir/build/BUILDROOT/opennebula-5.10.3-1.el7.x86_64/usr/lib/one/ruby/cli/one_helper/oneflow_helper.rb
    File not found: /builddir/build/BUILDROOT/opennebula-5.10.3-1.el7.x86_64/usr/lib/one/ruby/cli/one_helper/oneflowtemplate_helper.rb
DEBUG: Child return code was: 1
INFO: EXCEPTION: [Error()]
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/mockbuild/trace_decorator.py", line 93, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.6/site-packages/mockbuild/util.py", line 755, in do_with_status
    raise exception.Error("Command failed: \n # %s\n%s" % (command, output), child.returncode)
mockbuild.exception.Error: Command failed:
 # /usr/bin/systemd-nspawn -q -M f8fdae02a2ae41ffbdafa1e6b1d3b106 -D /var/lib/mock/epel-7-x86_64/root --capability=cap_ipc_lock --bind=/tmp/mock-resolv.u02rt1m7:/etc/resolv.conf --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=en_US.UTF-8 --setenv=http_proxy=http://proxy:8888 --setenv=https_proxy=http://proxy:8888 -u mockbuild bash --login -c /usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/centos7.spec

Finish: rpmbuild opennebula-5.10.3-1.el7.src.rpm
Finish: build phase for opennebula-5.10.3-1.el7.src.rpm
ERROR: Exception(/tmp/tmp.GItqlbIyxf/src/opennebula-5.10.3-1.el7.src.rpm) Config(epel-7-x86_64) 6 minutes 21 seconds
INFO: Results and/or logs in: /tmp/tmp.1e9MqdG46F
INFO: Cleaning up build root ('cleanup_on_failure=True')
Start: clean chroot
DEBUG: kill orphans
DEBUG: child environment: None
DEBUG: Executing command: ['/bin/umount', '-n', '-l', '/var/lib/mock/epel-7-x86_64-bootstrap/root/var/lib/mock/epel-7-x86_64/root'] with env {'TERM': 'vt100', 'SHELL': '/bin/sh', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'LANG': 'en_US.UTF-8'} and shell False
DEBUG: Child return code was: 0
DEBUG: child environment: None
DEBUG: Executing command: ['/bin/umount', '-n', '-l', '/var/lib/mock/epel-7-x86_64-bootstrap/root/var/lib/mock/epel-7-x86_64/root'] with env {'TERM': 'vt100', 'SHELL': '/bin/sh', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'LANG': 'en_US.UTF-8'} and shell False
DEBUG: Child return code was: 0
DEBUG: child environment: None
DEBUG: Executing command: ['/bin/umount', '-n', '/var/lib/mock/epel-7-x86_64/root/proc/filesystems'] with env {'TERM': 'vt100', 'SHELL': '/bin/sh', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'LANG': 'en_US.UTF-8'} and shell False
DEBUG: Child return code was: 0
DEBUG: child environment: None
DEBUG: Executing command: ['/bin/umount', '-n', '/var/lib/mock/epel-7-x86_64/root/var/cache/dnf'] with env {'TERM': 'vt100', 'SHELL': '/bin/sh', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'LANG': 'en_US.UTF-8'} and shell False
DEBUG: Child return code was: 0
DEBUG: child environment: None
DEBUG: Executing command: ['/bin/umount', '-n', '/var/lib/mock/epel-7-x86_64/root/var/cache/yum'] with env {'TERM': 'vt100', 'SHELL': '/bin/sh', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'LANG': 'en_US.UTF-8'} and shell False
DEBUG: Child return code was: 0
DEBUG: child environment: None
DEBUG: Executing command: ['btrfs', 'subv', 'list', '/var/lib/mock'] with env {'TERM': 'vt100', 'SHELL': '/bin/sh', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'LANG': 'en_US.UTF-8'} and shell False
DEBUG: ERROR: not a btrfs filesystem: /var/lib/mock
DEBUG: ERROR: can't access '/var/lib/mock'
DEBUG: Child return code was: 1
DEBUG: Please ignore the error above above about btrfs.
Finish: clean chroot
DEBUG: kill orphans
DEBUG: child environment: None
DEBUG: Executing command: ['/bin/umount', '-n', '/var/lib/mock/epel-7-x86_64-bootstrap/root/proc/filesystems'] with env {'TERM': 'vt100', 'SHELL': '/bin/sh', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'LANG': 'en_US.UTF-8'} and shell False
DEBUG: Child return code was: 0
DEBUG: child environment: None
DEBUG: Executing command: ['/bin/umount', '-n', '/var/lib/mock/epel-7-x86_64-bootstrap/root/var/cache/dnf'] with env {'TERM': 'vt100', 'SHELL': '/bin/sh', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'LANG': 'en_US.UTF-8'} and shell False
DEBUG: Child return code was: 0
DEBUG: child environment: None
DEBUG: Executing command: ['/bin/umount', '-n', '/var/lib/mock/epel-7-x86_64-bootstrap/root/var/cache/yum'] with env {'TERM': 'vt100', 'SHELL': '/bin/sh', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'LANG': 'en_US.UTF-8'} and shell False
DEBUG: Child return code was: 0
ERROR: Command failed:
 # /usr/bin/systemd-nspawn -q -M f8fdae02a2ae41ffbdafa1e6b1d3b106 -D /var/lib/mock/epel-7-x86_64/root --capability=cap_ipc_lock --bind=/tmp/mock-resolv.u02rt1m7:/etc/resolv.conf --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=en_US.UTF-8 --setenv=http_proxy=http://proxy:8888 --setenv=https_proxy=http://proxy:8888 -u mockbuild bash --login -c /usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/centos7.spec

Thanks in advance for your assistance!

Hello, as docs in the repo says:

IMPORTANT: Always use the correct branch with the scripts corresponding to the OpenNebula you are going to build! For example, to build development OpenNebula, use the master branch. To build the latest yet unreleased OpenNebula 5.8.x, use the one-5.8 branch. Or, to build OpenNebula 5.8.2 release, use the repository state referenced by the tag release-5.8.2.

You are using master branch to build 5.10.3 packages. Best, Vlastimil

I posted a working recipe for building rpms under Build opennebula-5.10.2 from source but I don’t know whether anything relevant has changed in 5.10.3.

That did it! I missed that paragraph at the top of the page. Maybe update the example in README.md to include the git checkout (it does not look like I can submit a PR/branch):

cd packages/
git checkout tags/release-5.10.0
./centos7.sh ../opennebula-5.10.0.tar.gz
./debian9.sh ../opennebula-5.10.0.tar.gz
./ubuntu1610.sh https://downloads.opennebula.org/packages/opennebula-5.10.0/opennebula-5.10.0.tar.gz
BUILD_COMPONENTS='rubygems docker_machine' ./centos7.sh http://downloads.opennebula.org/packages/opennebula-5.10.0/opennebula-5.10.0.tar.gz http://downloads.opennebula.org/packages/opennebula-5.10.0/opennebula-docker-machine-5.10.0.tar.gz

Thanks for the quick response Vlastimil!
–Dave