[ovs-discuss] [ovs-dev] rpmbuild failure for ovs_dpdk

Darrell Ball dball at vmware.com
Tue Jun 20 16:01:26 UTC 2017


Again, send to discuss at openvswitch.org

Do you see something like this ?

darrell at prmh-nsx-perf-server125:~/ovs/ovs_master$ grep -nr LDFLAGS _gcc/config.status 
846:S["OVS_LDFLAGS"]=" -L/usr/src/dpdk-16.11/x86_64-native-linuxapp-gcc/lib"

with dpdk-16.07 instead of dpdk-16.11
.
.
.

On 6/20/17, 5:43 AM, "ovs-dev-bounces at openvswitch.org on behalf of 王志克" <ovs-dev-bounces at openvswitch.org on behalf of wangzhike at jd.com> wrote:

    Hi All,
    
    I try to build rpm for ovs+dpdk, but met below compiling issue. Does someone know how to fix it? I guess it is related to LDFLAGS='-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld, but no idea how to fix it.
    
    If I follow below guide (non-rpm), everything is OK.
    https://urldefense.proofpoint.com/v2/url?u=http-3A__docs.openvswitch.org_en_latest_intro_install_dpdk_&d=DwICAg&c=uilaK90D4TOVoH58JNXRgQ&r=BVhFA09CGX7JQ5Ih-uZnsw&m=U_c6DG0MU2EKiNSi8V100nCZs5fqmWt3JWLXzyMTsCE&s=3m7uHcguxmbP_bpOW5kMPStCjz2C4mE5DPJSy1wYINY&e= 
    
    I use dpdk-16.07 and ovs 2.6 without any change.
    
    [root at A01-R06-I187-15 openvswitch-2.6.0]# rpmbuild -bb --without check --with dpdk rhel/openvswitch-fedora.spec
    Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.PBk26t
    + umask 022
    + cd /root/rpmbuild/BUILD
    + cd /root/rpmbuild/BUILD
    + rm -rf openvswitch-2.6.0
    + /usr/bin/gzip -dc /root/rpmbuild/SOURCES/openvswitch-2.6.0.tar.gz
    + /usr/bin/tar -xf -
    + STATUS=0
    + '[' 0 -ne 0 ']'
    + cd openvswitch-2.6.0
    + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
    + exit 0
    Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.ZxDsjh
    + umask 022
    + cd /root/rpmbuild/BUILD
    + cd openvswitch-2.6.0
    + CFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1  -m64 -mtune=generic'
    + export CFLAGS
    + CXXFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1  -m64 -mtune=generic'
    + export CXXFLAGS
    + FFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1  -m64 -mtune=generic -I/usr/lib64/gfortran/modules'
    + export FFLAGS
    + FCFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1  -m64 -mtune=generic -I/usr/lib64/gfortran/modules'
    + export FCFLAGS
    + LDFLAGS='-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld'
    + export LDFLAGS
    + '[' 1 == 1 ']'
    + '[' x86_64 == ppc64le ']'
    ++ find . -name config.guess -o -name config.sub
    + for i in '$(find . -name config.guess -o -name config.sub)'
    ++ basename ./build-aux/config.guess
    + '[' -f /usr/lib/rpm/redhat/config.guess ']'
    + /usr/bin/rm -f ./build-aux/config.guess
    ++ basename ./build-aux/config.guess
    + /usr/bin/cp -fv /usr/lib/rpm/redhat/config.guess ./build-aux/config.guess
    '/usr/lib/rpm/redhat/config.guess' -> './build-aux/config.guess'
    + for i in '$(find . -name config.guess -o -name config.sub)'
    ++ basename ./build-aux/config.sub
    + '[' -f /usr/lib/rpm/redhat/config.sub ']'
    + /usr/bin/rm -f ./build-aux/config.sub
    ++ basename ./build-aux/config.sub
    + /usr/bin/cp -fv /usr/lib/rpm/redhat/config.sub ./build-aux/config.sub
    '/usr/lib/rpm/redhat/config.sub' -> './build-aux/config.sub'
    ++ dirname /usr/share/dpdk/x86_64-default-linuxapp-gcc/.config
    + ./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-libcapng --with-dpdk=/usr/share/dpdk/x86_64-default-linuxapp-gcc --enable-ssl --with-pkidir=/var/lib/openvswitch/pki
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking whether make supports nested variables... yes
    checking how to create a pax tar archive... gnutar
    checking for style of include used by make... GNU
    checking for x86_64-redhat-linux-gnu-gcc... no
    checking for gcc... gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    checking whether gcc understands -c and -o together... yes
    checking dependency style of gcc... none
    checking for gcc option to accept ISO C99... -std=gnu99
    checking how to run the C preprocessor... gcc -std=gnu99 -E
    checking for grep that handles long lines and -e... /usr/bin/grep
    checking for fgrep... /usr/bin/grep -F
    checking for egrep... /usr/bin/grep -E
    checking for perl... /usr/bin/perl
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking minix/config.h usability... no
    checking minix/config.h presence... no
    checking for minix/config.h... no
    checking whether it is safe to define __EXTENSIONS__... yes
    checking whether byte ordering is bigendian... no
    checking for special C compiler options needed for large files... no
    checking for _FILE_OFFSET_BITS value needed for large files... no
    checking build system type... x86_64-redhat-linux-gnu
    checking host system type... x86_64-redhat-linux-gnu
    checking how to print strings... printf
    checking for a sed that does not truncate output... /usr/bin/sed
    checking for ld used by gcc -std=gnu99... /usr/bin/ld
    checking if the linker (/usr/bin/ld) is GNU ld... yes
    checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
    checking the name lister (/usr/bin/nm -B) interface... BSD nm
    checking whether ln -s works... yes
    checking the maximum length of command line arguments... 1966080
    checking whether the shell understands some XSI constructs... yes
    checking whether the shell understands "+="... yes
    checking how to convert x86_64-redhat-linux-gnu file names to x86_64-redhat-linux-gnu format... func_convert_file_noop
    checking how to convert x86_64-redhat-linux-gnu file names to toolchain format... func_convert_file_noop
    checking for /usr/bin/ld option to reload object files... -r
    checking for x86_64-redhat-linux-gnu-objdump... no
    checking for objdump... objdump
    checking how to recognize dependent libraries... pass_all
    checking for x86_64-redhat-linux-gnu-dlltool... no
    checking for dlltool... no
    checking how to associate runtime and link libraries... printf %s\n
    checking for x86_64-redhat-linux-gnu-ar... no
    checking for ar... ar
    checking for archiver @FILE support... @
    checking for x86_64-redhat-linux-gnu-strip... no
    checking for strip... strip
    checking for x86_64-redhat-linux-gnu-ranlib... no
    checking for ranlib... ranlib
    checking command to parse /usr/bin/nm -B output from gcc -std=gnu99 object... ok
    checking for sysroot... no
    checking for x86_64-redhat-linux-gnu-mt... no
    checking for mt... no
    checking if : is a manifest tool... no
    checking for dlfcn.h... yes
    checking for objdir... .libs
    checking if gcc -std=gnu99 supports -fno-rtti -fno-exceptions... no
    checking for gcc -std=gnu99 option to produce PIC... -fPIC -DPIC
    checking if gcc -std=gnu99 PIC flag -fPIC -DPIC works... yes
    checking if gcc -std=gnu99 static flag -static works... no
    checking if gcc -std=gnu99 supports -c -o file.o... yes
    checking if gcc -std=gnu99 supports -c -o file.o... (cached) yes
    checking whether the gcc -std=gnu99 linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
    checking dynamic linker characteristics... GNU/Linux ld.so
    checking how to hardcode library paths into programs... immediate
    checking whether stripping libraries is possible... yes
    checking if libtool supports shared libraries... yes
    checking whether to build shared libraries... no
    checking whether to build static libraries... yes
    checking for library containing pow... -lm
    checking for library containing clock_gettime... none required
    checking for library containing timer_create... -lrt
    checking for library containing pthread_create... -lpthread
    checking whether strerror_r is declared... yes
    checking for strerror_r... yes
    checking whether strerror_r returns char *... yes
    checking vmware.h usability... no
    checking vmware.h presence... no
    checking for vmware.h... no
    checking for MSVC x64 compiler... no
    checking windows.h usability... no
    checking windows.h presence... no
    checking for windows.h... no
    checking for linux/netlink.h... yes
    checking for pkg-config... /usr/bin/pkg-config
    checking whether compiling and linking against OpenSSL works... yes
    checking for capng_clear in -lcap-ng... yes
    checking for Python 2.x for x >= 7... /usr/bin/python
    checking for Python 3.x for x >= 4... no
    checking for flake8... no
    checking for dot... yes
    checking net/if_packet.h usability... yes
    checking net/if_packet.h presence... yes
    checking for net/if_packet.h... yes
    checking net/if_dl.h usability... no
    checking net/if_dl.h presence... no
    checking for net/if_dl.h... no
    checking whether strtok_r macro segfaults on some inputs... no
    checking whether sys_siglist is declared... yes
    checking for struct stat.st_mtim.tv_nsec... yes
    checking for struct stat.st_mtimensec... no
    checking for struct ifreq.ifr_flagshigh... no
    checking for mlockall... yes
    checking for strnlen... yes
    checking for getloadavg... yes
    checking for statvfs... yes
    checking for getmntent_r... yes
    checking mntent.h usability... yes
    checking mntent.h presence... yes
    checking for mntent.h... yes
    checking sys/statvfs.h usability... yes
    checking sys/statvfs.h presence... yes
    checking for sys/statvfs.h... yes
    checking linux/types.h usability... yes
    checking linux/types.h presence... yes
    checking for linux/types.h... yes
    checking linux/if_ether.h usability... yes
    checking linux/if_ether.h presence... yes
    checking for linux/if_ether.h... yes
    checking stdatomic.h usability... no
    checking stdatomic.h presence... no
    checking for stdatomic.h... no
    checking for net/if_mib.h... no
    checking for library containing backtrace... none required
    checking linux/perf_event.h usability... yes
    checking linux/perf_event.h presence... yes
    checking for linux/perf_event.h... yes
    checking valgrind/valgrind.h usability... no
    checking valgrind/valgrind.h presence... no
    checking for valgrind/valgrind.h... no
    checking for connect in -lsocket... no
    checking for library containing gethostbyname... none required
    checking XenServer release... none
    checking for groff... yes
    checking whether make is GNU make... yes
    checking whether gcc -std=gnu99 has <threads.h> that supports thread_local... no
    checking whether gcc -std=gnu99 supports __thread... yes
    checking for library containing __atomic_load_8... no
    checking whether gcc -std=gnu99 supports GCC 4.0+ atomic built-ins... yes
    checking value of __atomic_always_lock_free(1)... 1
    checking value of __atomic_always_lock_free(2)... 1
    checking value of __atomic_always_lock_free(4)... 1
    checking value of __atomic_always_lock_free(8)... 1
    checking for library containing aio_write... none required
    checking for pthread_set_name_np... no
    checking for pthread_setname_np() variant... glibc
    checking whether __linux__ is defined... true
    checking for working posix_memalign... yes
    checking whether the preprocessor supports include_next... yes
    checking whether system header files limit the line length... no
    checking for stdio.h... yes
    checking for string.h... (cached) yes
    checking whether gcc -std=gnu99 accepts -Werror... yes
    checking whether gcc -std=gnu99 accepts -Wall... yes
    checking whether gcc -std=gnu99 accepts -Wextra... yes
    checking whether gcc -std=gnu99 accepts -Wno-sign-compare... yes
    checking whether gcc -std=gnu99 accepts -Wpointer-arith... yes
    checking whether gcc -std=gnu99 accepts -Wformat-security... yes
    checking whether gcc -std=gnu99 accepts -Wswitch-enum... yes
    checking whether gcc -std=gnu99 accepts -Wunused-parameter... yes
    checking whether gcc -std=gnu99 accepts -Wbad-function-cast... yes
    checking whether gcc -std=gnu99 accepts -Wcast-align... yes
    checking whether gcc -std=gnu99 accepts -Wstrict-prototypes... no
    checking whether gcc -std=gnu99 accepts -Wold-style-definition... no
    checking whether gcc -std=gnu99 accepts -Wmissing-prototypes... yes
    checking whether gcc -std=gnu99 accepts -Wmissing-field-initializers... yes
    checking whether gcc -std=gnu99 accepts -Wthread-safety... no
    checking whether gcc -std=gnu99 accepts -fno-strict-aliasing... yes
    checking whether gcc -std=gnu99 accepts -Qunused-arguments... no
    checking whether gcc -std=gnu99 accepts -Wno-unused... yes
    checking whether gcc -std=gnu99 accepts -Wno-unused-parameter... yes
    checking target hint for cgcc... x86_64
    checking whether make has GNU make $(if) extension... yes
    checking whether dpdk datapath is enabled... yes
    checking for /usr/share/dpdk/x86_64-default-linuxapp-gcc/include/rte_config.h... yes
    configure: error: Could not find DPDK libraries in /usr/share/dpdk/x86_64-default-linuxapp-gcc/lib
    error: Bad exit status from /var/tmp/rpm-tmp.ZxDsjh (%build)
    
    
    RPM build errors:
        Bad exit status from /var/tmp/rpm-tmp.ZxDsjh (%build)
    
    
    [root at A01-R06-I187-15 openvswitch-2.6.0]# ls /usr/share/dpdk/x86_64-default-linuxapp-gcc/lib/
    binfmt.d       libgio-2.0.la               librte_acl.a            librte_pmd_cxgbe.a        librte_vhost.a
    cpp            libgio-2.0.so               librte_cfgfile.a        librte_pmd_e1000.a        locale
    crda           libgio-2.0.so.0             librte_cmdline.a        librte_pmd_ena.a          modprobe.d
    debug          libgio-2.0.so.0.3600.0      librte_cryptodev.a      librte_pmd_enic.a         modules
    dracut         libglib-2.0.la              librte_distributor.a    librte_pmd_fm10k.a        modules-load.d
    firewalld      libglib-2.0.so              librte_eal.a            librte_pmd_i40e.a         pkgconfig
    firmware       libglib-2.0.so.0            librte_hash.a           librte_pmd_ixgbe.a        polkit-1
    games          libglib-2.0.so.0.3600.0     librte_ip_frag.a        librte_pmd_null.a         python2.7
    gcc            libgmodule-2.0.la           librte_jobstats.a       librte_pmd_null_crypto.a  rpm
    gems           libgmodule-2.0.so           librte_kni.a            librte_pmd_ring.a         sse2
    gio            libgmodule-2.0.so.0         librte_kvargs.a         librte_pmd_vhost.a        sysctl.d
    glib-2.0       libgmodule-2.0.so.0.3600.0  librte_lpm.a            librte_pmd_virtio.a       systemd
    golang         libgobject-2.0.la           librte_mbuf.a           librte_pmd_vmxnet3_uio.a  tmpfiles.d
    grub           libgobject-2.0.so           librte_mempool.a        librte_port.a             tuned
    kbd            libgobject-2.0.so.0         librte_meter.a          librte_power.a            udev
    kdump          libgobject-2.0.so.0.3600.0  librte_pdump.a          librte_reorder.a          yum-plugins
    kernel         libgthread-2.0.la           librte_pipeline.a       librte_ring.a
    libdpdk.a      libgthread-2.0.so           librte_pmd_af_packet.a  librte_sched.a
    libethdev.a    libgthread-2.0.so.0         librte_pmd_bnxt.a       librte_table.a
    libffi-3.0.13  libgthread-2.0.so.0.3600.0  librte_pmd_bond.a       librte_timer.a
    
    [root at A01-R06-I187-15 openvswitch-2.6.0]# uname -r
    3.10.0-327.36.3.el7.x86_64
    
    Br,
    Wang Zhike
    _______________________________________________
    dev mailing list
    dev at openvswitch.org
    https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.openvswitch.org_mailman_listinfo_ovs-2Ddev&d=DwICAg&c=uilaK90D4TOVoH58JNXRgQ&r=BVhFA09CGX7JQ5Ih-uZnsw&m=U_c6DG0MU2EKiNSi8V100nCZs5fqmWt3JWLXzyMTsCE&s=6HpmS7Vewi5w7mFbt7NStTF6Ypw9Z_QpxCrele5BnI4&e= 
    





More information about the discuss mailing list