Skip to contentSkip to conversation

Building dpdk with rte_vhost sometimes fails due to missing rte_hash.h

dpdk-dev [email protected] 1 participant 2 messages Oct 23, 2019 – Nov 21, 2019

lore
Share & tools
lore
#0 lore raw

https://bugs.dpdk.org/show_bug.cgi?id=356

            Bug ID: 356
           Summary: Building dpdk with rte_vhost sometimes fails due to
                    missing rte_hash.h
           Product: DPDK
           Version: 19.05
          Hardware: x86
                OS: Linux
            Status: UNCONFIRMED
          Severity: minor
          Priority: Normal
         Component: vhost/virtio
          Assignee: [email protected]
          Reporter: [email protected]

Target Milestone: ---

This is because rte_vhost does not name rte_hash as its dependency in lib/Makefile. Depending on -j and how knows what else the build either succeeds or fails and is nondeterministic.

Quoted 13 lines

== Build lib/librte_vhost
SYMLINK-FILE include/rte_vhost.h
SYMLINK-FILE include/rte_vdpa.h
SYMLINK-FILE include/rte_vhost_crypto.h
CC fd_man.o
CC iotlb.o
CC socket.o
CC vhost.o
CC vhost_user.o
CC virtio_net.o
CC vdpa.o
CC vhost_crypto.o

Quoted 5 lines

/tmp/nix-build-libspdk.drv-0/source/dpdk/lib/librte_vhost/vhost_crypto.c:5:10:

Quoted 1 line

fatal error: rte_hash.h: No such file or directory

#include <rte_hash.h>
         ^~~~~~~~~~~~

compilation terminated.

The fix is simple. DEPDIRS for librte_vhost in lib/Makefile needs to explicitly mention librte_hash:

Quoted 2 lines

DEPDIRS-librte_vhost := librte_eal librte_mempool librte_mbuf librte_ethdev \
librte_net librte_hash

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.
author Reviewed-by Tiwei Bie Reviewed-by Maxime Coquelin
#1 lore raw

https://bugs.dpdk.org/show_bug.cgi?id=356

Maxime Coquelin ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |[email protected]
         Resolution|---                         |FIXED

--- Comment #1 from Maxime Coquelin ([email protected]) --- Patch fixing the issue merged in v19.11-rc3:

commit 201e7482674551aeee27d0ff28e7bbd3fbfbbcf2

Author: Jin Yu <[email protected]>
Date:   Wed Oct 30 17:40:55 2019 +0800

vhost: fix build dependency on hash lib

Compile librte_vhost/vhost_crypto.c needs the rte_hash.h So we need the librte_hash to be compiled before vhost. Add the DEPDIRs to make sure this.

Bugzilla ID: 356

Fixes 939066d96563 ("vhost/crypto: add public function implementation")
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.