Comments on: Compiling Percona XtraBackup for ARM https://www.percona.com/blog/compiling-percona-xtrabackup-for-arm/ Sat, 17 Feb 2024 00:35:37 +0000 hourly 1 https://wordpress.org/?v=6.5.2 By: Jinxiao Zhang https://www.percona.com/blog/compiling-percona-xtrabackup-for-arm/#comment-10974020 Fri, 24 Feb 2023 13:50:06 +0000 https://www.percona.com/blog/?p=75770#comment-10974020 I encountered an error during compilation:

Building C object CMakeFiles/cmTC_1cfa3.dir/src.c.o
/usr/bin/cc -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fno-omit-frame-pointer -ffp-contract=off -ftls-model=initial-exec -g -O2 -fdebug-prefix-map=/percona-xtrabackup/build=. -fstack-protector-strong -Wformat -Werror=format-security  -Wdate-time -D_FORTIFY_SOURCE=2 -moutline-atomics -Wall -Wextra -Wformat-security -Wvla -Wundef -Wmissing-format-attribute -Wwrite-strings -Wjump-misses-init -Wstringop-truncation -Wmissing-include-dirs -fno-strict-aliasing -DHAVE_SOLARIS_AFFINITY -fPIE  -o CMakeFiles/cmTC_1cfa3.dir/src.c.o  -c /percona-xtrabackup/build/CMakeFiles/CMakeTmp/src.c
/percona-xtrabackup/build/CMakeFiles/CMakeTmp/src.c:3:10: fatal error: sys/lwp.h: No such file or directory
  3 | #include <sys/lwp.h>
   |     ^~~~~~~~~~~
compilation terminated.
make[1]: *** [CMakeFiles/cmTC_1cfa3.dir/build.make:66: CMakeFiles/cmTC_1cfa3.dir/src.c.o] Error 1
make[1]: Leaving directory '/percona-xtrabackup/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_1cfa3/fast] Error 2

Source file was:

#include <sys/types.h>
#include <sys/lwp.h>
#include <sys/processor.h>
#include <sys/procset.h>
int main()
{
 processorid_t cpu_id = (processorid_t)0;
 id_t tid = _lwp_self();
 processor_bind(P_LWPID, tid, cpu_id, 0);
}
Performing C++ SOURCE FILE Test HAVE_CXX_W_shadow_field failed with the following output:
Change Dir: /percona-xtrabackup/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC_478be/fast && /usr/bin/make -f CMakeFiles/cmTC_478be.dir/build.make CMakeFiles/cmTC_478be.dir/build
make[1]: Entering directory '/percona-xtrabackup/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_478be.dir/src.cxx.o
/usr/bin/c++ -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -std=c++17 -fno-omit-frame-pointer -ffp-contract=off -ftls-model=initial-exec -g -O2 -fdebug-prefix-map=/percona-xtrabackup/build=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -moutline-atomics -march=armv8-a+crc -Wall -Wextra -Wformat-security -Wvla -Wundef -Wmissing-format-attribute -Woverloaded-virtual -Wcast-qual -Wimplicit-fallthrough=5 -Wstringop-truncation -Wsuggest-override -Wmissing-include-dirs -Wextra-semi -Wlogical-op -DHAVE_CXX_W_shadow_field -Wshadow-field -fPIE  -o CMakeFiles/cmTC_478be.dir/src.cxx.o -c /percona-xtrabackup/build/CMakeFiles/CMakeTmp/src.cxx
c++: error: unrecognized command line option '-Wshadow-field'; did you mean '-Wshadow-ivar'?
make[1]: *** [CMakeFiles/cmTC_478be.dir/build.make:66: CMakeFiles/cmTC_478be.dir/src.cxx.o] Error 1
make[1]: Leaving directory '/percona-xtrabackup/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_478be/fast] Error 2

]]>