n.c: In function 'monitor_device': gpio-event-mon.c:40:8: warning: implicit declaration of function 'asprintf'; did you mean 'vsprintf'? [-Wimplicit-function-declaration] 40 | ret = asprintf(&chrdev_name, "/dev/%s", device_name); | ^~~~~~~~ | vsprintf ld -r -o gpio-event-mon-in.o gpio-event-mon.o gpio-utils.o make[1]: Leaving directory '/builddir/build/BUILD/kernel-5.6.fc33/linux-5.6/tools/gpio' gcc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fcommon -fasynchronous-unwind-tables -fstack-clash-protection -O2 -Wall -g -D_GNU_SOURCE -Iinclude -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld gpio-event-mon-in.o -o gpio-event-mon make -f /builddir/build/BUILD/kernel-5.6.fc33/linux-5.6/tools/build/Makefile.build dir=. obj=gpio-watch make[1]: Entering directory '/builddir/build/BUILD/kernel-5.6.fc33/linux-5.6/tools/gpio' gcc -Wp,-MD,./.gpio-watch.o.d -Wp,-MT,gpio-watch.o -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fcommon -fasynchronous-unwind-tables -fstack-clash-protection -D"BUILD_STR(s)=#s" -c -o gpio-watch.o gpio-watch.c gpio-watch.c: In function 'main': gpio-watch.c:24:31: error: storage size of 'chg' isn't known 24 | struct gpioline_info_changed chg; | ^~~ gpio-watch.c:47:19: error: 'GPIO_GET_LINEINFO_WATCH_IOCTL' undeclared (first use in this function); did you mean 'GPIO_GET_LINEINFO_IOCTL'? 47 | ret = ioctl(fd, GPIO_GET_LINEINFO_WATCH_IOCTL, &req); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | GPIO_GET_LINEINFO_IOCTL gpio-watch.c:47:19: note: each undeclared identifier is reported only once for each function it appears in gpio-watch.c:74:9: error: 'GPIOLINE_CHANGED_REQUESTED' undeclared (first use in this function) 74 | case GPIOLINE_CHANGED_REQUESTED: | ^~~~~~~~~~~~~~~~~~~~~~~~~~ gpio-watch.c:77:9: error: 'GPIOLINE_CHANGED_RELEASED' undeclared (first use in this function) 77 | case GPIOLINE_CHANGED_RELEASED: | ^~~~~~~~~~~~~~~~~~~~~~~~~ gpio-watch.c:80:9: error: 'GPIOLINE_CHANGED_CONFIG' undeclared (first use in this function) 80 | case GPIOLINE_CHANGED_CONFIG: | ^~~~~~~~~~~~~~~~~~~~~~~ gpio-watch.c:24:31: warning: unused variable 'chg' [-Wunused-variable] 24 | struct gpioline_info_changed chg; | ^~~ mv: cannot stat './.gpio-watch.o.tmp': No such file or directory make[1]: *** [/builddir/build/BUILD/kernel-5.6.fc33/linux-5.6/tools/build/Makefile.build:97: gpio-watch.o] Error 1 make[1]: Leaving directory '/builddir/build/BUILD/kernel-5.6.fc33/linux-5.6/tools/gpio' make: *** [Makefile:74: gpio-watch-in.o] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.40I9Gu (%build) RPM build errors: extra tokens at the end of %endif directive in line 266: %endif #turbostat/x86_energy_perf_policy extra tokens at the end of %endif directive in line 356: %endif #turbostat/x86_energy_perf_policy Bad exit status from /var/tmp/rpm-tmp.40I9Gu (%build) Child return code was: 1 EXCEPTION: [Error()] Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/mockbuild/trace_decorator.py", line 95, in trace result = func(*args, **kw) File "/usr/lib/python3.8/site-packages/mockbuild/util.py", line 746, 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 riscv64 --nodeps /builddir/build/SPECS/kernel-tools.spec