ashvin
April 20, 2023, 2:28pm
1
Hello there,
I am trying to compile from source rpm to build rpm that I can use on CentOS Stream 9 - ARM.
command:
rpmbuild --define 'dist .el9' --rebuild percona-xtrabackup-80-8.0.32-26.1.generic.src.rpm
Error at end of compilation
[100%] Building CXX object storage/innobase/xtrabackup/src/CMakeFiles/xtrabackup.dir/redo_log_consumer.cc.o
[100%] Building CXX object storage/innobase/xtrabackup/src/CMakeFiles/xtrabackup.dir/redo_log.cc.o
[100%] Building CXX object storage/innobase/xtrabackup/src/CMakeFiles/xtrabackup.dir/__/__/__/__/sql-common/client_authentication.cc.o
[100%] Building CXX object storage/innobase/xtrabackup/src/CMakeFiles/xtrabackup.dir/utils.cc.o
/home/ec2-user/rpmbuild/BUILD/percona-xtrabackup-8.0.32-26/storage/innobase/xtrabackup/src/utils.cc:26:10: fatal error: proc/sysinfo.h: No such file or directory
26 | #include <proc/sysinfo.h>
| ^~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [storage/innobase/xtrabackup/src/CMakeFiles/xtrabackup.dir/build.make:440: storage/innobase/xtrabackup/src/CMakeFiles/xtrabackup.dir/utils.cc.o] Error 1
I am sure there should be very little fix, I am just missing it! Also, let me know if any other way I should follow. Your feedback is most welcome!
Best regards,
Ashvin
Hi @ashvin .
Please check [PXB-2993] make PXB compatible with procps-4 - Percona JIRA . In summary you need to adjust storage/innobase/xtrabackup/src/utils.cc
and change:
#include <proc/sysinfo.h>
To
#include <proc/misc.h>
ashvin
April 20, 2023, 3:17pm
3
Marcelo,
Thanks for the update. I did that but still got the error. Sharing steps what I’ve done.
pwd
/home/ec2-user/rpmbuild/BUILD/percona-xtrabackup-8.0.32-26/storage/innobase/xtrabackup
vim src/utils.cc
Here are includes:
#include <my_alloc.h>
#include <my_default.h>
#include <mysqld.h>
#ifdef __APPLE__
#include <mach/mach_host.h>
#include <sys/sysctl.h>
#else
#include <proc/misc.h>
And this is the error I am getting:
/home/ec2-user/rpmbuild/BUILD/percona-xtrabackup-8.0.32-26/storage/innobase/xtrabackup/src/utils.cc:26:10: fatal error: proc/misc.h: No such file or directory
26 | #include <proc/misc.h>
| ^~~~~~~~~~~~~
compilation terminated.
I tried to lookup misc.h which I found at
../BUILD/percona-xtrabackup-8.0.32-26/storage/temptable/include/temptable/misc.h
Again, kindly help if I am doing any silly mistake.
Do you have procps-ng
installed ?
ashvin
April 20, 2023, 6:36pm
5
Yes it’s already installed.
sudo yum install procps-ng
Last metadata expiration check: 1:04:14 ago on Thu 20 Apr 2023 02:21:33 PM UTC.
Package procps-ng-3.3.17-11.el9.aarch64 is already installed.
Dependencies resolved.
Nothing to do.
Hi @ashvin .
That is strange - procps-3 provides proc/sysinfo.h
(original #include you tried)
Can you double check if the file is present in your system:
sudo find /usr/include/ -name '*sysinfo.h'
Mistake from my side,
you actually need the development headers - please install procps-ng-devel
. Since your version is procps-3, also revert back to the original #include proc/sysinfo.h
ashvin
April 20, 2023, 6:58pm
8
sudo find /usr/include/ -name '*sysinfo.h'
/usr/include/linux/sysinfo.h
/usr/include/sys/sysinfo.h
ashvin
April 20, 2023, 7:38pm
9
Thank you Marcelo for your help.
So the Solution is you have to install procps-ng-devel
1 Like