Yup and I just reproduced the error using the latest dpdk and confirmed by switching to 17.02 leaving SPDK alone it compiled fine…

 

From: SPDK [mailto:spdk-bounces@lists.01.org] On Behalf Of Harris, James R
Sent: April 28, 2017 9:11 AM
To: Storage Performance Development Kit <spdk@lists.01.org>
Subject: Re: [SPDK] Compile ERROR: ‘pci_device_list’ undeclared

 

Hi Linwen,

 

For now I would suggest going back to DPDK 17.02.  pci_device_list has changed in recent DPDK commits and SPDK needs to be updated to accommodate.

 

Thanks,

 

-Jim

 

 

From: SPDK <spdk-bounces@lists.01.org> on behalf of 邓林文 <dlworld0@163.com>
Reply-To: Storage Performance Development Kit <spdk@lists.01.org>
Date: Friday, April 28, 2017 at 12:03 AM
To: "spdk@lists.01.org" <spdk@lists.01.org>
Subject: [SPDK] Compile ERROR: ‘pci_device_list’ undeclared

 

 

Hi all, there's a compile error when I tried to test the latest SPDK. Is that a code bug or a misconfigure in my environment?

 

Here is the log:

 

dpdk# make install T=x86_64-native-linuxapp-gcc DESTDIR=.

dpdk# cd ../spdk

spdk# ./configure --with-dpdk=../dpdk/x86_64-native-linuxapp-gcc

spdk# make

...

 LIB libspdk_log_rpc.a

 CC lib/env_dpdk/pci.o

In file included from /home/src/dpdk/x86_64-native-linuxapp-gcc/include/rte_pci.h:81:0,

        from env_internal.h:55,

        from pci.c:34:

pci.c: In function ‘spdk_pci_get_device’:

pci.c:173:22: error: ‘pci_device_list’ undeclared (first use in this function)

 TAILQ_FOREACH(dev, &pci_device_list, next) {

             ^

pci.c:173:22: note: each undeclared identifier is reported only once for each function it appears in

/home/src/spdk/mk/spdk.common.mk:159: recipe for target 'pci.o' failed

make[2]: *** [pci.o] Error 1

/home/src/spdk/mk/spdk.subdirs.mk:35: recipe for target 'env_dpdk' failed

make[1]: *** [env_dpdk] Error 2

/home/src/spdk/mk/spdk.subdirs.mk:35: recipe for target 'lib' failed

make: *** [lib] Error 2

 

 

The codes are all latest:

dpdk commit eba33e87ad37626604be7186e746751f99691084

spdk commit 6c172475609120c293b265522c395c52fc5a3bb5

 

Regards,

Linwen Deng