Hello, I encountered errors when building rpm on fedora33: Versions: libvirt: v6.9.0-rc2 gcc-10.2.1-5.fc33.x86_64 meson-0.55.3-1.fc33.noarch ninja-build-1.10.1-2.fc33.x86_64 binutils-2.35-11.fc33.x86_64 Steps: 1. Archive libvirt source code to ~/rpmbuild/SOURCES/libvirt-6.9.0.tar.xz 2. Copy libvirt.spec.in to ~/rpmbuild/SPECS/libvirt.spec. Then `sed -i s/@VERSION@/6.9.0/g ~/rpmbuild/SPECS/libvirt.spec` 3. Build rpm: $ rpmbuild -ba ~/rpmbuild/SPECS/libvirt.spec Then errors happen: [1071/1255] gcc -o tests/qemucapsprobe tests/qemucapsprobe.p/qemucapsprobe.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,-export-dynamic -pie -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,--start-group tests/libtest_qemu_driver.so src/libvirt.so.0.6009.0 -Wl,-export-dynamic -ldl /usr/lib64/libglib-2.0.so /usr/lib64/ libgobject-2.0.so /usr/lib64/libgio-2.0.so /usr/lib64/libgnutls.so /usr/lib64/libnl-3.so /usr/lib64/libnl-route-3.so /usr/lib64/libxml2.so /usr/lib64/libsasl2.so -lselinux /usr/lib64/libtirpc.so /usr/lib64/libyajl.so -Wl,--end-group '-Wl,-rpath,$ORIGIN/:$ORIGIN/../src' -Wl,-rpath-link,/home/hhan/rpmbuild/BUILD/libvirt-6.9.0/x86_64-redhat-linux-gnu/tests -Wl,-rpath-link,/home/hhan/rpmbuild/BUILD/libvirt-6.9.0/x86_64-redhat-linux-gnu/src FAILED: tests/qemucapsprobe gcc -o tests/qemucapsprobe tests/qemucapsprobe.p/qemucapsprobe.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,-export-dynamic -pie -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,--start-group tests/libtest_qemu_driver.so src/libvirt.so.0.6009.0 -Wl,-export-dynamic -ldl /usr/lib64/libglib-2.0.so /usr/lib64/ libgobject-2.0.so /usr/lib64/libgio-2.0.so /usr/lib64/libgnutls.so /usr/lib64/libnl-3.so /usr/lib64/libnl-route-3.so /usr/lib64/libxml2.so /usr/lib64/libsasl2.so -lselinux /usr/lib64/libtirpc.so /usr/lib64/libyajl.so -Wl,--end-group '-Wl,-rpath,$ORIGIN/:$ORIGIN/../src' -Wl,-rpath-link,/home/hhan/rpmbuild/BUILD/libvirt-6.9.0/x86_64-redhat-linux-gnu/tests -Wl,-rpath-link,/home/hhan/rpmbuild/BUILD/libvirt-6.9.0/x86_64-redhat-linux-gnu/src /usr/bin/ld: tests/libtest_qemu_driver.so: undefined reference to `__open_missing_mode' collect2: error: ld returned 1 exit status [1072/1255] gcc -o tests/virtimetest src/libvirt_probes.o tests/virtimetest.p/virtimetest.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,-export-dynamic -pie -Wl,--whole-archive -Wl,--start-group tests/libtest_utils.a -Wl,--no-whole-archive -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld src/libvirt.so.0.6009.0 -Wl,--no-copy-dt-needed-entries -Wl,-export-dynamic -ldl /usr/lib64/libglib-2.0.so /usr/lib64/libgobject-2.0.so /usr/lib64/ libgio-2.0.so /usr/lib64/libgnutls.so /usr/lib64/libnl-3.so /usr/lib64/libnl-route-3.so /usr/lib64/libxml2.so /usr/lib64/libsasl2.so -lselinux /usr/lib64/libtirpc.so /usr/lib64/libyajl.so -Wl,-export-dynamic -lselinux -Wl,--end-group '-Wl,-rpath,$ORIGIN/../src' -Wl,-rpath-link,/home/hhan/rpmbuild/BUILD/libvirt-6.9.0/x86_64-redhat-linux-gnu/src [1073/1255] gcc -o tests/virstringtest src/libvirt_probes.o tests/virstringtest.p/virstringtest.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,-export-dynamic -pie -Wl,--whole-archive -Wl,--start-group tests/libtest_utils.a -Wl,--no-whole-archive -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld src/libvirt.so.0.6009.0 -Wl,--no-copy-dt-needed-entries -Wl,-export-dynamic -ldl /usr/lib64/libglib-2.0.so /usr/lib64/libgobject-2.0.so /usr/lib64/ libgio-2.0.so /usr/lib64/libgnutls.so /usr/lib64/libnl-3.so /usr/lib64/libnl-route-3.so /usr/lib64/libxml2.so /usr/lib64/libsasl2.so -lselinux /usr/lib64/libtirpc.so /usr/lib64/libyajl.so -Wl,-export-dynamic -lselinux -Wl,--end-group '-Wl,-rpath,$ORIGIN/../src' -Wl,-rpath-link,/home/hhan/rpmbuild/BUILD/libvirt-6.9.0/x86_64-redhat-linux-gnu/src [1074/1255] gcc -o tests/virsystemdtest src/libvirt_probes.o tests/virsystemdtest.p/virsystemdtest.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,-export-dynamic -pie -Wl,--whole-archive -Wl,--start-group tests/libtest_utils.a -Wl,--no-whole-archive -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld src/libvirt.so.0.6009.0 -Wl,--no-copy-dt-needed-entries -Wl,-export-dynamic -ldl /usr/lib64/ libglib-2.0.so /usr/lib64/libgobject-2.0.so /usr/lib64/libgio-2.0.so /usr/lib64/libgnutls.so /usr/lib64/libnl-3.so /usr/lib64/libnl-route-3.so /usr/lib64/libxml2.so /usr/lib64/libsasl2.so -lselinux /usr/lib64/libtirpc.so /usr/lib64/libyajl.so -Wl,-export-dynamic -lselinux -Wl,--end-group '-Wl,-rpath,$ORIGIN/../src' -Wl,-rpath-link,/home/hhan/rpmbuild/BUILD/libvirt-6.9.0/x86_64-redhat-linux-gnu/src [1075/1255] gcc -o tests/virtypedparamtest src/libvirt_probes.o tests/virtypedparamtest.p/virtypedparamtest.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,-export-dynamic -pie -Wl,--whole-archive -Wl,--start-group tests/libtest_utils.a -Wl,--no-whole-archive -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld src/libvirt.so.0.6009.0 -Wl,--no-copy-dt-needed-entries -Wl,-export-dynamic -ldl /usr/lib64/ libglib-2.0.so /usr/lib64/libgobject-2.0.so /usr/lib64/libgio-2.0.so /usr/lib64/libgnutls.so /usr/lib64/libnl-3.so /usr/lib64/libnl-route-3.so /usr/lib64/libxml2.so /usr/lib64/libsasl2.so -lselinux /usr/lib64/libtirpc.so /usr/lib64/libyajl.so -Wl,-export-dynamic -lselinux -Wl,--end-group '-Wl,-rpath,$ORIGIN/../src' -Wl,-rpath-link,/home/hhan/rpmbuild/BUILD/libvirt-6.9.0/x86_64-redhat-linux-gnu/src [1076/1255] gcc -o tests/domaincapstest src/libvirt_probes.o tests/domaincapstest.p/domaincapstest.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,-export-dynamic -pie -Wl,--whole-archive -Wl,--start-group tests/libtest_utils.a tests/libtest_file_wrapper.a tests/libtest_utils_xen.a tests/libtest_utils_qemu.a -Wl,--no-whole-archive -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld src/libvirt.so.0.6009.0 tests/libtest_xen_driver.so tests/libtest_qemu_driver.so -Wl,--no-copy-dt-needed-entries -Wl,-export-dynamic -ldl /usr/lib64/ libglib-2.0.so /usr/lib64/libgobject-2.0.so /usr/lib64/libgio-2.0.so /usr/lib64/libgnutls.so /usr/lib64/libnl-3.so /usr/lib64/libnl-route-3.so /usr/lib64/libxml2.so /usr/lib64/libsasl2.so -lselinux /usr/lib64/libtirpc.so /usr/lib64/libyajl.so -Wl,-export-dynamic -lselinux -Wl,-export-dynamic -lselinux -Wl,-export-dynamic -lselinux -Wl,-export-dynamic -lselinux -Wl,--end-group '-Wl,-rpath,$ORIGIN/../src:$ORIGIN/' -Wl,-rpath-link,/home/hhan/rpmbuild/BUILD/libvirt-6.9.0/x86_64-redhat-linux-gnu/src -Wl,-rpath-link,/home/hhan/rpmbuild/BUILD/libvirt-6.9.0/x86_64-redhat-linux-gnu/tests FAILED: tests/domaincapstest gcc -o tests/domaincapstest src/libvirt_probes.o tests/domaincapstest.p/domaincapstest.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,-export-dynamic -pie -Wl,--whole-archive -Wl,--start-group tests/libtest_utils.a tests/libtest_file_wrapper.a tests/libtest_utils_xen.a tests/libtest_utils_qemu.a -Wl,--no-whole-archive -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld src/libvirt.so.0.6009.0 tests/libtest_xen_driver.so tests/libtest_qemu_driver.so -Wl,--no-copy-dt-needed-entries -Wl,-export-dynamic -ldl /usr/lib64/ libglib-2.0.so /usr/lib64/libgobject-2.0.so /usr/lib64/libgio-2.0.so /usr/lib64/libgnutls.so /usr/lib64/libnl-3.so /usr/lib64/libnl-route-3.so /usr/lib64/libxml2.so /usr/lib64/libsasl2.so -lselinux /usr/lib64/libtirpc.so /usr/lib64/libyajl.so -Wl,-export-dynamic -lselinux -Wl,-export-dynamic -lselinux -Wl,-export-dynamic -lselinux -Wl,-export-dynamic -lselinux -Wl,--end-group '-Wl,-rpath,$ORIGIN/../src:$ORIGIN/' -Wl,-rpath-link,/home/hhan/rpmbuild/BUILD/libvirt-6.9.0/x86_64-redhat-linux-gnu/src -Wl,-rpath-link,/home/hhan/rpmbuild/BUILD/libvirt-6.9.0/x86_64-redhat-linux-gnu/tests /usr/bin/ld: tests/libtest_qemu_driver.so: undefined reference to `__open_missing_mode' collect2: error: ld returned 1 exit status [1077/1255] gcc -o tests/vircapstest src/qemu/libvirt_qemu_probes.o src/libvirt_probes.o tests/vircapstest.p/vircapstest.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,-export-dynamic -pie -Wl,--whole-archive -Wl,--start-group tests/libtest_utils.a tests/libtest_utils_lxc.a tests/libtest_utils_qemu.a -Wl,--no-whole-archive -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld src/libvirt.so.0.6009.0 src/lxc/libvirt_driver_lxc_impl.a src/qemu/libvirt_driver_qemu_impl.a -Wl,--no-copy-dt-needed-entries -Wl,-export-dynamic -ldl /usr/lib64/libglib-2.0.so /usr/lib64/ libgobject-2.0.so /usr/lib64/libgio-2.0.so /usr/lib64/libgnutls.so /usr/lib64/libnl-3.so /usr/lib64/libnl-route-3.so /usr/lib64/libxml2.so /usr/lib64/libsasl2.so -lselinux /usr/lib64/libtirpc.so /usr/lib64/libyajl.so /usr/lib64/libblkid.so -lcap-ng /usr/lib64/libfuse.so -pthread -lselinux -Wl,-z,relro -Wl,-z,now -Wl,--no-copy-dt-needed-entries -Wl,-export-dynamic -lcap-ng -lselinux -Wl,-z,relro -Wl,-z,now -Wl,--no-copy-dt-needed-entries -Wl,-export-dynamic -Wl,-export-dynamic -lselinux -Wl,-export-dynamic -lselinux -Wl,-export-dynamic -lselinux -Wl,--end-group '-Wl,-rpath,$ORIGIN/../src' -Wl,-rpath-link,/home/hhan/rpmbuild/BUILD/libvirt-6.9.0/x86_64-redhat-linux-gnu/src [1078/1255] gcc -o tests/cputest src/libvirt_probes.o tests/cputest.p/cputest.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,-export-dynamic -pie -Wl,--whole-archive -Wl,--start-group tests/libtest_utils.a tests/libtest_utils_qemu.a -Wl,--no-whole-archive -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld src/libvirt.so.0.6009.0 tests/libtest_utils_qemu_monitor.a tests/libtest_qemu_driver.so -Wl,--no-copy-dt-needed-entries -Wl,-export-dynamic -ldl /usr/lib64/ libglib-2.0.so /usr/lib64/libgobject-2.0.so /usr/lib64/libgio-2.0.so /usr/lib64/libgnutls.so /usr/lib64/libnl-3.so /usr/lib64/libnl-route-3.so /usr/lib64/libxml2.so /usr/lib64/libsasl2.so -lselinux /usr/lib64/libtirpc.so /usr/lib64/libyajl.so -Wl,-export-dynamic -lselinux -Wl,-export-dynamic -lselinux -Wl,-export-dynamic -lselinux -Wl,--end-group '-Wl,-rpath,$ORIGIN/../src:$ORIGIN/' -Wl,-rpath-link,/home/hhan/rpmbuild/BUILD/libvirt-6.9.0/x86_64-redhat-linux-gnu/src -Wl,-rpath-link,/home/hhan/rpmbuild/BUILD/libvirt-6.9.0/x86_64-redhat-linux-gnu/tests FAILED: tests/cputest gcc -o tests/cputest src/libvirt_probes.o tests/cputest.p/cputest.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,-export-dynamic -pie -Wl,--whole-archive -Wl,--start-group tests/libtest_utils.a tests/libtest_utils_qemu.a -Wl,--no-whole-archive -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld src/libvirt.so.0.6009.0 tests/libtest_utils_qemu_monitor.a tests/libtest_qemu_driver.so -Wl,--no-copy-dt-needed-entries -Wl,-export-dynamic -ldl /usr/lib64/libglib-2.0.so /usr/lib64/ libgobject-2.0.so /usr/lib64/libgio-2.0.so /usr/lib64/libgnutls.so /usr/lib64/libnl-3.so /usr/lib64/libnl-route-3.so /usr/lib64/libxml2.so /usr/lib64/libsasl2.so -lselinux /usr/lib64/libtirpc.so /usr/lib64/libyajl.so -Wl,-export-dynamic -lselinux -Wl,-export-dynamic -lselinux -Wl,-export-dynamic -lselinux -Wl,--end-group '-Wl,-rpath,$ORIGIN/../src:$ORIGIN/' -Wl,-rpath-link,/home/hhan/rpmbuild/BUILD/libvirt-6.9.0/x86_64-redhat-linux-gnu/src -Wl,-rpath-link,/home/hhan/rpmbuild/BUILD/libvirt-6.9.0/x86_64-redhat-linux-gnu/tests /usr/bin/ld: tests/libtest_qemu_driver.so: undefined reference to `__open_missing_mode' collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed. error: Bad exit status from /var/tmp/rpm-tmp.xEqkEF (%build) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.xEqkEF (%build)
Daniel P. Berrangé
2020-Oct-30 09:12 UTC
Re: Fail to build libvirt upstream rpm on fedora 33
On Fri, Oct 30, 2020 at 10:30:00AM +0800, Han Han wrote:> Hello, > I encountered errors when building rpm on fedora33: > > Versions: > libvirt: v6.9.0-rc2 > gcc-10.2.1-5.fc33.x86_64 > meson-0.55.3-1.fc33.noarch > ninja-build-1.10.1-2.fc33.x86_64 > binutils-2.35-11.fc33.x86_64 > > Steps: > 1. Archive libvirt source code to ~/rpmbuild/SOURCES/libvirt-6.9.0.tar.xz > 2. Copy libvirt.spec.in to ~/rpmbuild/SPECS/libvirt.spec. Then `sed -i > s/@VERSION@/6.9.0/g ~/rpmbuild/SPECS/libvirt.spec` > 3. Build rpm: > $ rpmbuild -ba ~/rpmbuild/SPECS/libvirt.spec> FAILED: tests/cputest > gcc -o tests/cputest src/libvirt_probes.o tests/cputest.p/cputest.c.o > -Wl,--as-needed -Wl,--no-undefined -Wl,-export-dynamic -pie > -Wl,--whole-archive -Wl,--start-group tests/libtest_utils.a > tests/libtest_utils_qemu.a -Wl,--no-whole-archive -O2 -flto=auto > -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall > -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS > -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong > -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic > -fasynchronous-unwind-tables -fstack-clash-protection -Wl,-z,relro > -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld > src/libvirt.so.0.6009.0 tests/libtest_utils_qemu_monitor.a > tests/libtest_qemu_driver.so -Wl,--no-copy-dt-needed-entries > -Wl,-export-dynamic -ldl /usr/lib64/libglib-2.0.so /usr/lib64/ > libgobject-2.0.so /usr/lib64/libgio-2.0.so /usr/lib64/libgnutls.so > /usr/lib64/libnl-3.so /usr/lib64/libnl-route-3.so /usr/lib64/libxml2.so > /usr/lib64/libsasl2.so -lselinux /usr/lib64/libtirpc.so > /usr/lib64/libyajl.so -Wl,-export-dynamic -lselinux -Wl,-export-dynamic > -lselinux -Wl,-export-dynamic -lselinux -Wl,--end-group > '-Wl,-rpath,$ORIGIN/../src:$ORIGIN/' > -Wl,-rpath-link,/home/hhan/rpmbuild/BUILD/libvirt-6.9.0/x86_64-redhat-linux-gnu/src > -Wl,-rpath-link,/home/hhan/rpmbuild/BUILD/libvirt-6.9.0/x86_64-redhat-linux-gnu/tests > /usr/bin/ld: tests/libtest_qemu_driver.so: undefined reference to > `__open_missing_mode' > collect2: error: ld returned 1 exit status > ninja: build stopped: subcommand failed. > error: Bad exit status from /var/tmp/rpm-tmp.xEqkEF (%build)Hmm, same binutils problem we're seeing on F34 https://bugzilla.redhat.com/show_bug.cgi?id=1889763 Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
On Fri, Oct 30, 2020 at 5:12 PM Daniel P. Berrangé <berrange@redhat.com> wrote:> On Fri, Oct 30, 2020 at 10:30:00AM +0800, Han Han wrote: > > Hello, > > I encountered errors when building rpm on fedora33: > > > > Versions: > > libvirt: v6.9.0-rc2 > > gcc-10.2.1-5.fc33.x86_64 > > meson-0.55.3-1.fc33.noarch > > ninja-build-1.10.1-2.fc33.x86_64 > > binutils-2.35-11.fc33.x86_64 > > > > Steps: > > 1. Archive libvirt source code to ~/rpmbuild/SOURCES/libvirt-6.9.0.tar.xz > > 2. Copy libvirt.spec.in to ~/rpmbuild/SPECS/libvirt.spec. Then `sed -i > > s/@VERSION@/6.9.0/g ~/rpmbuild/SPECS/libvirt.spec` > > 3. Build rpm: > > $ rpmbuild -ba ~/rpmbuild/SPECS/libvirt.spec > > > > FAILED: tests/cputest > > gcc -o tests/cputest src/libvirt_probes.o tests/cputest.p/cputest.c.o > > -Wl,--as-needed -Wl,--no-undefined -Wl,-export-dynamic -pie > > -Wl,--whole-archive -Wl,--start-group tests/libtest_utils.a > > tests/libtest_utils_qemu.a -Wl,--no-whole-archive -O2 -flto=auto > > -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall > > -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS > > -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong > > -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic > > -fasynchronous-unwind-tables -fstack-clash-protection -Wl,-z,relro > > -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld > > src/libvirt.so.0.6009.0 tests/libtest_utils_qemu_monitor.a > > tests/libtest_qemu_driver.so -Wl,--no-copy-dt-needed-entries > > -Wl,-export-dynamic -ldl /usr/lib64/libglib-2.0.so /usr/lib64/ > > libgobject-2.0.so /usr/lib64/libgio-2.0.so /usr/lib64/libgnutls.so > > /usr/lib64/libnl-3.so /usr/lib64/libnl-route-3.so /usr/lib64/libxml2.so > > /usr/lib64/libsasl2.so -lselinux /usr/lib64/libtirpc.so > > /usr/lib64/libyajl.so -Wl,-export-dynamic -lselinux -Wl,-export-dynamic > > -lselinux -Wl,-export-dynamic -lselinux -Wl,--end-group > > '-Wl,-rpath,$ORIGIN/../src:$ORIGIN/' > > > -Wl,-rpath-link,/home/hhan/rpmbuild/BUILD/libvirt-6.9.0/x86_64-redhat-linux-gnu/src > > > -Wl,-rpath-link,/home/hhan/rpmbuild/BUILD/libvirt-6.9.0/x86_64-redhat-linux-gnu/tests > > /usr/bin/ld: tests/libtest_qemu_driver.so: undefined reference to > > `__open_missing_mode' > > collect2: error: ld returned 1 exit status > > ninja: build stopped: subcommand failed. > > error: Bad exit status from /var/tmp/rpm-tmp.xEqkEF (%build) > > Hmm, same binutils problem we're seeing on F34 > > Thx :)> > https://bugzilla.redhat.com/show_bug.cgi?id=1889763 > > Regards, > Daniel > -- > |: https://berrange.com -o- > https://www.flickr.com/photos/dberrange :| > |: https://libvirt.org -o- > https://fstop138.berrange.com :| > |: https://entangle-photo.org -o- > https://www.instagram.com/dberrange :| > >