openvswitch / ovs-issues

Issue tracker repo for Open vSwitch
10 stars 3 forks source link

how to build rpm package on centos8.4? #241

Closed bettswang closed 2 years ago

bettswang commented 2 years ago

[root@CentOS8 openvswitch-2.16.1]# make rpm-fedora make dist-gzip ampost_remove_distdir='@:' make[1]: Entering directory '/root/openvswitch-2.16.1' make distdir-am make[2]: Entering directory '/root/openvswitch-2.16.1' if test -d "openvswitch-2.16.1"; then find "openvswitch-2.16.1" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -rf "openvswitch-2.16.1" || { sleep 5 && rm -rf "openvswitch-2.16.1"; }; else :; fi test -d "openvswitch-2.16.1" || mkdir "openvswitch-2.16.1" (cd datapath && make top_distdir=../openvswitch-2.16.1 distdir=../openvswitch-2.16.1/datapath \ am__remove_distdir=: amskip_length_check=: amskip_mode_fix=: distdir) make[3]: Entering directory '/root/openvswitch-2.16.1/datapath' make distdir-am make[4]: Entering directory '/root/openvswitch-2.16.1/datapath' (cd linux && make top_distdir=../../openvswitch-2.16.1 distdir=../../openvswitch-2.16.1/datapath/linux \ am__remove_distdir=: amskip_length_check=: am__skip_mode_fix=: distdir) make[5]: Entering directory '/root/openvswitch-2.16.1/datapath/linux' rm -f .o .ko .mod. ..gcno ..d ..cmd kcompat.h.new \ .cache.mk Module.symvers modules.order .tmp_versions/.mod for d in actions.c conntrack.c datapath.c dp_notify.c flow.c flow_netlink.c flow_table.c vport.c vport-internal_dev.c vport-netdev.c nsh.c meter.c dev-openvswitch.c dst_cache.c exthdrs_core.c geneve.c gre.c gso.c genetlink-openvswitch.c inet_fragment.c ip_gre.c ip_fragment.c ip_output.c ip_tunnel.c ip_tunnels_core.c ip6_output.c ip6_gre.c ip6_tunnel.c lisp.c netdevice.c nf_conncount.c nf_conntrack_core.c nf_conntrack_proto.c nf_conntrack_reasm.c nf_conntrack_timeout.c reciprocal_div.c skbuff-openvswitch.c socket.c stt.c udp.c udp_tunnel.c vxlan.c utils.c vport-geneve.c vport-gre.c vport-lisp.c vport-stt.c vport-vxlan.c; do if test -h $d; then rm $d; fi; done make[5]: Leaving directory '/root/openvswitch-2.16.1/datapath/linux' make[4]: Leaving directory '/root/openvswitch-2.16.1/datapath' make[3]: Leaving directory '/root/openvswitch-2.16.1/datapath' make \ top_distdir="openvswitch-2.16.1" distdir="openvswitch-2.16.1" \ dist-hook make[3]: Entering directory '/root/openvswitch-2.16.1' make[3]: Leaving directory '/root/openvswitch-2.16.1' test -n "" \ || find "openvswitch-2.16.1" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec /bin/sh /root/openvswitch-2.16.1/build-aux/install-sh -c -m a+r {} {} \; \ || chmod -R a+r "openvswitch-2.16.1" make[2]: Leaving directory '/root/openvswitch-2.16.1' tardir=openvswitch-2.16.1 && tar --format=posix -chf - "$tardir" | eval GZIP= gzip --best -c >openvswitch-2.16.1.tar.gz make[1]: Leaving directory '/root/openvswitch-2.16.1' if test -d "openvswitch-2.16.1"; then find "openvswitch-2.16.1" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -rf "openvswitch-2.16.1" || { sleep 5 && rm -rf "openvswitch-2.16.1"; }; else :; fi /usr/bin/mkdir -p /root/openvswitch-2.16.1/rpm/rpmbuild/SOURCES cp openvswitch-2.16.1.tar.gz /root/openvswitch-2.16.1/rpm/rpmbuild/SOURCES rpmbuild --without check \ -D "_topdir /root/openvswitch-2.16.1/rpm/rpmbuild" \ -ba ./rhel/openvswitch-fedora.spec warning: Macro expanded in comment on line 25: %define kernel 2.6.40.4-5.fc15.x86_64

error: Failed build dependencies: /usr/bin/sphinx-build-3 is needed by openvswitch-2.16.1-1.el8.x86_64 groff is needed by openvswitch-2.16.1-1.el8.x86_64 make: *** [Makefile:7209: rpm-fedora] Error 1

[root@CentOS8 openvswitch-2.16.1]# groff --version GNU groff version 1.22.4 Copyright (C) 2018 Free Software Foundation, Inc. GNU groff comes with ABSOLUTELY NO WARRANTY. You may redistribute copies of groff and its subprograms under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING.

called subprograms:

GNU grops (groff) version 1.22.4 GNU troff (groff) version 1.22.4

[root@CentOS8 openvswitch-2.16.1]# rpm -qa | grep sphinx sphinx-2.2.11-15.el8.x86_64

I had installed grofff, but it didn‘t be detected. And how to install /usr/bin/sphinx-build-3 , python3 had installed. I google that but get nothing.

bettswang commented 2 years ago

anyone could help me ????

igsilya commented 2 years ago

Please, follow the instructions in order to install build requirements: https://docs.openvswitch.org/en/latest/intro/install/fedora/?highlight=fedora#build-requirements Also, you may use dnf provides /usr/bin/sphinx-build-3 to find out what package you need to install to have it. It's typically a python3-sphinx package.

bettswang commented 2 years ago

thank you for your reply . I did as you said, but it didn't work.

[root@CentOS8 openvswitch-2.16.1]# dnf builddep /tmp/ovs.spec Last metadata expiration check: 0:06:00 ago on Thu 27 Jan 2022 01:10:21 AM EST. No matching package to install: '/usr/bin/sphinx-build-3' Package autoconf-2.69-29.el8.noarch is already installed. Package automake-1.16.1-7.el8.noarch is already installed. Package checkpolicy-2.9-1.el8.x86_64 is already installed. Package desktop-file-utils-0.23-8.el8.x86_64 is already installed. Package gcc-8.5.0-4.el8_5.x86_64 is already installed. Package gcc-c++-8.5.0-4.el8_5.x86_64 is already installed. Package graphviz-2.40.1-43.el8.x86_64 is already installed. No matching package to install: 'groff' Package libcap-ng-0.7.9-5.el8.x86_64 is already installed. Package libtool-2.4.6-25.el8.x86_64 is already installed. Package openssl-1:1.1.1k-4.el8.x86_64 is already installed. Package procps-ng-3.3.15-6.el8.x86_64 is already installed. Package systemd-239-45.el8.x86_64 is already installed. Not all dependencies satisfied Error: Some packages could not be found.

[root@CentOS8 openvswitch-2.16.1]# dnf provides /usr/bin/sphinx-build-3 Last metadata expiration check: 0:06:14 ago on Thu 27 Jan 2022 01:10:21 AM EST. Error: No Matches found [root@CentOS8 openvswitch-2.16.1]#

bettswang commented 2 years ago

I have found it . i will closed this issue.

dnf install epel-release dnf config-manager --enable powertools appstream baseos *epel dnf install python3-sphinx