Mock Version: 3.5 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/libgmem.spec'], chrootPath='/var/lib/mock/openeuler-23.03-x86_64-1695608905.247266/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=0uid=1000gid=135user='mockbuild'nspawn_args=[]unshare_net=TrueprintOutput=True) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/libgmem.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False Building target platforms: x86_64 Building for target x86_64 Wrote: /builddir/build/SRPMS/libgmem-0.1-5.src.rpm Child return code was: 0 Mock Version: 3.5 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/libgmem.spec'], chrootPath='/var/lib/mock/openeuler-23.03-x86_64-1695608905.247266/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=0uid=1000gid=135user='mockbuild'nspawn_args=[]unshare_net=TrueprintOutput=True) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/libgmem.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False Building target platforms: x86_64 Building for target x86_64 Wrote: /builddir/build/SRPMS/libgmem-0.1-5.src.rpm Child return code was: 0 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/libgmem.spec'], chrootPath='/var/lib/mock/openeuler-23.03-x86_64-1695608905.247266/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=0uid=1000gid=135user='mockbuild'nspawn_args=[]unshare_net=TrueprintOutput=True) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/libgmem.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False Building target platforms: x86_64 Building for target x86_64 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.nkAast + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + rm -rf libgmem-v0.1 + /usr/lib/rpm/rpmuncompress -x /builddir/build/SOURCES/libgmem-v0.1.tar.gz + STATUS=0 + '[' 0 -ne 0 ']' + cd libgmem-v0.1 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + /usr/lib/rpm/rpmuncompress /builddir/build/SOURCES/use-ioctl-instead-of-syscall.patch + /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f + /usr/lib/rpm/rpmuncompress /builddir/build/SOURCES/fix-three-issue-I7YV2X-I7XQMW-I7Z2RF.patch + /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f + /usr/lib/rpm/rpmuncompress /builddir/build/SOURCES/Structures-and-macros-use-the-default-definition-of-.patch + /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f + /usr/lib/rpm/rpmuncompress /builddir/build/SOURCES/optimize-headers-file.patch + /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f + /usr/lib/rpm/rpmuncompress /builddir/build/SOURCES/add-install_npu_driver.sh.patch + /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f + RPM_EC=0 ++ jobs -p + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.G7l2qN + umask 022 + cd /builddir/build/BUILD + cd libgmem-v0.1 + sh ./autogen.sh + libtoolize --copy libtoolize: putting auxiliary files in '.'. libtoolize: copying file './ltmain.sh' libtoolize: You should add the contents of the following files to 'aclocal.m4': libtoolize: '/usr/share/aclocal/libtool.m4' libtoolize: '/usr/share/aclocal/ltoptions.m4' libtoolize: '/usr/share/aclocal/ltsugar.m4' libtoolize: '/usr/share/aclocal/ltversion.m4' libtoolize: '/usr/share/aclocal/lt~obsolete.m4' libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac, libtoolize: and rerunning libtoolize and aclocal. libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am. + aclocal + autoconf + autoheader + automake --add-missing --copy configure.ac:21: installing './compile' configure.ac:26: installing './config.guess' configure.ac:26: installing './config.sub' configure.ac:24: installing './install-sh' configure.ac:24: installing './missing' Makefile.am: installing './depcomp' + CFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/generic-hardened-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection ' + export CFLAGS + CXXFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/generic-hardened-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fexceptions' + export CXXFLAGS + FFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/generic-hardened-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fexceptions -I/usr/lib64/gfortran/modules' + export FFLAGS + FCFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/generic-hardened-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fexceptions -I/usr/lib64/gfortran/modules' + export FCFLAGS + LDFLAGS='-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/generic-hardened-ld' + export LDFLAGS + '[' 1 = 1 ']' +++ dirname ./configure ++ find . -name config.guess -o -name config.sub + for i in $(find $(dirname ./configure) -name config.guess -o -name config.sub) ++ basename ./config.sub + '[' -f /usr/lib/rpm/openEuler/config.sub ']' + /usr/bin/rm -f ./config.sub ++ basename ./config.sub + /usr/bin/cp -fv /usr/lib/rpm/openEuler/config.sub ./config.sub '/usr/lib/rpm/openEuler/config.sub' -> './config.sub' + for i in $(find $(dirname ./configure) -name config.guess -o -name config.sub) ++ basename ./config.guess + '[' -f /usr/lib/rpm/openEuler/config.guess ']' + /usr/bin/rm -f ./config.guess ++ basename ./config.guess + /usr/bin/cp -fv /usr/lib/rpm/openEuler/config.guess ./config.guess '/usr/lib/rpm/openEuler/config.guess' -> './config.guess' + '[' 1 = 1 ']' + '[' x '!=' 'x-Wl,-z,now -specs=/usr/lib/rpm/generic-hardened-ld' ']' ++ find . -name ltmain.sh + for i in $(find . -name ltmain.sh) + /usr/bin/sed -i.backup -e 's~compiler_flags=$~compiler_flags="-Wl,-z,now -specs=/usr/lib/rpm/generic-hardened-ld"~' ./ltmain.sh + ./configure --build=x86_64-openEuler-linux-gnu --host=x86_64-openEuler-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-device=Ascend checking for x86_64-openEuler-linux-gnu-gcc... no checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether the compiler supports GNU C... yes checking whether gcc accepts -g... yes checking for gcc option to enable C11 features... none needed checking whether gcc understands -c and -o together... yes checking for stdio.h... yes checking for stdlib.h... yes checking for string.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for strings.h... yes checking for sys/stat.h... yes checking for sys/types.h... yes checking for unistd.h... yes checking for wchar.h... yes checking for minix/config.h... no checking whether it is safe to define __EXTENSIONS__... yes checking whether _XOPEN_SOURCE should be defined... no checking whether to enable maintainer-specific portions of Makefiles... yes checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a race-free mkdir -p... /usr/bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether make supports the include directive... yes (GNU style) checking whether make supports nested variables... yes checking dependency style of gcc... none checking whether make supports nested variables... (cached) yes checking build system type... x86_64-openEuler-linux-gnu checking host system type... x86_64-openEuler-linux-gnu checking how to print strings... printf checking for a sed that does not truncate output... /usr/bin/sed checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for fgrep... /usr/bin/grep -F checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 1572864 checking how to convert x86_64-openEuler-linux-gnu file names to x86_64-openEuler-linux-gnu format... func_convert_file_noop checking how to convert x86_64-openEuler-linux-gnu file names to toolchain format... func_convert_file_noop checking for /usr/bin/ld option to reload object files... -r checking for x86_64-openEuler-linux-gnu-file... no checking for file... file checking for x86_64-openEuler-linux-gnu-objdump... no checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for x86_64-openEuler-linux-gnu-dlltool... no checking for dlltool... no checking how to associate runtime and link libraries... printf %s\n checking for x86_64-openEuler-linux-gnu-ar... no checking for ar... ar checking for archiver @FILE support... @ checking for x86_64-openEuler-linux-gnu-strip... no checking for strip... strip checking for x86_64-openEuler-linux-gnu-ranlib... no checking for ranlib... ranlib checking command to parse /usr/bin/nm -B output from gcc object... ok checking for sysroot... no checking for a working dd... /usr/bin/dd checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1 checking for x86_64-openEuler-linux-gnu-mt... no checking for mt... no checking if : is a manifest tool... no checking for dlfcn.h... yes checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC -DPIC checking if gcc PIC flag -fPIC -DPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for x86_64-openEuler-linux-gnu-gcc... gcc checking whether the compiler supports GNU C... (cached) yes checking whether gcc accepts -g... (cached) yes checking for gcc option to enable C11 features... (cached) none needed checking whether gcc understands -c and -o together... (cached) yes checking for x86_64-openEuler-linux-gnu-pkg-config... /usr/bin/x86_64-openEuler-linux-gnu-pkg-config checking pkg-config is at least version 0.9.0... yes checking for stdlib.h... (cached) yes checking for unistd.h... (cached) yes checking for linux/mman.h... yes checking for size_t... yes checking for GNU libc compatible malloc... yes checking for syscall... yes checking whether _Noreturn is supported... yes checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: executing depfiles commands config.status: executing libtool commands libgmem 1 ======= prefix: /usr sysconfdir: /etc libdir: ${prefix}/lib64 rootlibdir: includedir: /usr/include bindir: /usr/bin compiler: gcc cflags: -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/generic-hardened-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection ldflags: -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/generic-hardened-ld + /usr/bin/make -O -j4 V=1 VERBOSE=1 /usr/bin/make all-am make[1]: Entering directory '/builddir/build/BUILD/libgmem-v0.1' /bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -Wall -Werror -I./src/ascend -I./include -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/generic-hardened-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -c -o src/libgmem_la-libgmem.lo `test -f 'src/libgmem.c' || echo './'`src/libgmem.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -Wall -Werror -I./src/ascend -I./include -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/generic-hardened-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -c src/libgmem.c -fPIC -DPIC -o src/.libs/libgmem_la-libgmem.o make[1]: Leaving directory '/builddir/build/BUILD/libgmem-v0.1' In file included from src/libgmem.c:20: ./include/gmem_common.h:19:10: fatal error: linux/gmem_dev.h: No such file or directory 19 | #include | ^~~~~~~~~~~~~~~~~~ compilation terminated. make[1]: *** [Makefile:548: src/libgmem_la-libgmem.lo] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Entering directory '/builddir/build/BUILD/libgmem-v0.1' /bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -Wall -Werror -I./src/ascend -I./include -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/generic-hardened-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -c -o src/libgmem_la-init.lo `test -f 'src/init.c' || echo './'`src/init.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -Wall -Werror -I./src/ascend -I./include -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/generic-hardened-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -c src/init.c -fPIC -DPIC -o src/.libs/libgmem_la-init.o make[1]: Leaving directory '/builddir/build/BUILD/libgmem-v0.1' In file included from src/init.c:20: ./include/gmem_common.h:19:10: fatal error: linux/gmem_dev.h: No such file or directory 19 | #include | ^~~~~~~~~~~~~~~~~~ compilation terminated. make[1]: *** [Makefile:555: src/libgmem_la-init.lo] Error 1 make[1]: Entering directory '/builddir/build/BUILD/libgmem-v0.1' /bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -Wall -Werror -I./src/ascend -I./include -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/generic-hardened-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -c -o src/ascend/libgmem_la-gmem_ascend.lo `test -f 'src/ascend/gmem_ascend.c' || echo './'`src/ascend/gmem_ascend.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -Wall -Werror -I./src/ascend -I./include -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/generic-hardened-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -c src/ascend/gmem_ascend.c -fPIC -DPIC -o src/ascend/.libs/libgmem_la-gmem_ascend.o make[1]: Leaving directory '/builddir/build/BUILD/libgmem-v0.1' In file included from src/ascend/gmem_ascend.c:20: ./include/gmem_common.h:19:10: fatal error: linux/gmem_dev.h: No such file or directory 19 | #include | ^~~~~~~~~~~~~~~~~~ compilation terminated. make[1]: *** [Makefile:562: src/ascend/libgmem_la-gmem_ascend.lo] Error 1 make: *** [Makefile:390: all] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.G7l2qN (%build) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.G7l2qN (%build) Child return code was: 1 EXCEPTION: [Error('Command failed: \n # bash --login -c /usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/libgmem.spec\n', 1)] Traceback (most recent call last): File "/usr/lib/python3.9/site-packages/mockbuild/trace_decorator.py", line 93, in trace result = func(*args, **kw) File "/usr/lib/python3.9/site-packages/mockbuild/util.py", line 598, in do_with_status raise exception.Error("Command failed: \n # %s\n%s" % (command, output), child.returncode) mockbuild.exception.Error: Command failed: # bash --login -c /usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/libgmem.spec