Compile ERROR: ‘pci_device_list’ undeclared
邓林文 <dlworld0 at 163.com>
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
Luse
Hi Linwen,
I’m new to the project so don’t have an immediate answer for you but if nobody else gets you one within the next few hours I’ll grab these specific versions and try on my end.
Also note that we’re pushing to use IRC for these kinds of Q&A in the future. #spdk on freenode (Ben sent an email out with full details a few days ago)
Thanks,
Paul
From: SPDK [mailto:spdk-bounces(a)lists.01.org] On Behalf Of ???
Sent: April 28, 2017 12:04 AM
To: spdk(a)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 2The codes are all latest:
dpdk commit eba33e87ad37626604be7186e746751f99691084 spdk commit 6c172475609120c293b265522c395c52fc5a3bb5
Regards,
Linwen Deng
Harris
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(a)lists.01.org> on behalf of 邓林文 <dlworld0(a)163.com>
Reply-To: Storage Performance Development Kit <spdk(a)lists.01.org>
Date: Friday, April 28, 2017 at 12:03 AM
To: "spdk(a)lists.01.org" <spdk(a)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
Luse
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(a)lists.01.org] On Behalf Of Harris, James R
Sent: April 28, 2017 9:11 AM
To: Storage Performance Development Kit <spdk(a)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(a)lists.01.org> on behalf of 邓林文 <dlworld0(a)163.com>
Reply-To: Storage Performance Development Kit <spdk(a)lists.01.org>
Date: Friday, April 28, 2017 at 12:03 AM
To: "spdk(a)lists.01.org" <spdk(a)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
Walker
Quoted 4 lines · 邓林文
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?
We merged a patch this morning that fixes the issue, but in general stick to the latest released DPDK instead of tracking master. The DPDK team can potentially change the API on each new commit on master, so we can't guarantee that it will always be working. We'll make sure that SPDK works with any released version of DPDK though.