Closed yslys closed 3 years ago
"apt list" shows all packages. "apt list --installed" shows only installed packages. I would expect libpmem-dev to contain the missing header file. qemu configure uses "pkg-config --exists libpmem" to check if pmem is available, and if so tries to use it. pkg-config libpmem returns 1 (no) on my system. You perhaps have some uncommon package installed that makes the pkg-config libpmem check succeed, and then the build requires the header file.
Thanks a lot for your reply. I execute pkg-config --exists libpmem
, and there is no output; I then execute with the print-errors
flag on: pkg-config --exists libpmem --print-errors
, there is no return either. May I know if that means the pkg-config libpmem check succeeds?
If I execute pkg-config --exists libpmem-dev --print-errors
, the output is:
Package libpmem-dev was not found in the pkg-config search path.
Perhaps you should add the directory containing `libpmem-dev.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libpmem-dev' found
However, when I checked the installed packages by executing apt list --installed | grep libpmem-dev
, the output is:
libpmem-dev/bionic-updates,bionic-updates,now 1.4.1-0ubuntu1~18.04.1 amd64 [installed]
pkg-config returns true or false. If using bash, you can do "pkg-config --exists libpmem; echo $?". A 0 means success/true and a 1 means failure/false.
If you have libpmem-dev installed then you should have the /usr/include/libpmem.h file. https://packages.ubuntu.com/bionic-updates/libpmem-dev Under "list of files" it does include /usr/include/libpmem.h. Maybe you should check to see if the file is there? If not, maybe something is wrong with your system. You would try reinstalling the package.
Hi Jim,
Thanks a lot for your guidance. I executed pkg-config --exists libpmem; echo $?
and it returned 0.
I checked under the /usr/include directory, and the file libpmem.h is there; hence, I might need reinstall the package. Since I do not have the permission to run in sudo mode, I might have to wait until Monday or Tuesday to have the package reinstalled. Thanks again for your help.
If you do have the /usr/include/libpmem.h file, then why is the qemu build failing with an error saying that it can't find it?
I am not sure why this error occurs. I have tried to build it twice, and failed for the same reason.
Is it because of the kernel version, which is 4.15.0-142-generic?
I notice that the last modification date of libpmem.h is 6/29/2018. I would try to reinstall then.
The problem is solved by reinstalling the libpmem package.
I have encountered the same problem on Ubuntu 20.04. I have the /usr/include/libpmem.h
file, but BitBake still cannot find the header. I tried to append /usr/include
to the include path, then I got even more compiler errors probably because of other header files in that directory.
My kernel version is 5.8.0-61-generic. Below is the result of sudo apt list --installed | grep libpmem
:
libpmem-dev/focal,now 1.8-1ubuntu1 amd64 [installed]
libpmem1/focal,now 1.8-1ubuntu1 amd64 [installed]
libpmemblk-dev/focal,now 1.8-1ubuntu1 amd64 [installed]
libpmemblk1/focal,now 1.8-1ubuntu1 amd64 [installed]
libpmemlog-dev/focal,now 1.8-1ubuntu1 amd64 [installed]
libpmemlog1/focal,now 1.8-1ubuntu1 amd64 [installed]
libpmemobj-dev/focal,now 1.8-1ubuntu1 amd64 [installed]
libpmemobj1/focal,now 1.8-1ubuntu1 amd64 [installed]
libpmempool-dev/focal,now 1.8-1ubuntu1 amd64 [installed]
libpmempool1/focal,now 1.8-1ubuntu1 amd64 [installed]
You might try modifying https://github.com/openembedded/openembedded-core/blob/master/meta/recipes-devtools/qemu/qemu.inc
Add something like: PACKAGECONFIG[pmem] = "--enable-libpmem,--disable-libpmem,libpmem"
Oh, it works. Thank you very much!
Hi all, I tried to build following the instructions but it showed that
libpmem.h
not found. My system is Ubuntu 18.04, with kernel version 4.15.0-142-generic.Part of the error message is shown below:
I checked the packages installed using
apt list | grep pmem
. The corresponding output is:I am not sure why this error occurs. May I know if it is because I have some packages not installed? Thanks in advance.