d/BUILD/lockdev-scm-2011-10-07/src/lockdev.c:647: undefined reference to `minor' BUILDSTDERR: sample.o: In function `dev_relock': BUILDSTDERR: /builddir/build/BUILD/lockdev-scm-2011-10-07/src/lockdev.c:782: undefined reference to `major' BUILDSTDERR: /builddir/build/BUILD/lockdev-scm-2011-10-07/src/lockdev.c:782: undefined reference to `major' BUILDSTDERR: sample.o: In function `strcpy': BUILDSTDERR: /usr/include/bits/string_fortified.h:90: undefined reference to `minor' BUILDSTDERR: sample.o: In function `_dl_filename_1': BUILDSTDERR: /builddir/build/BUILD/lockdev-scm-2011-10-07/src/lockdev.c:226: undefined reference to `major' BUILDSTDERR: sample.o: In function `dev_relock': BUILDSTDERR: /builddir/build/BUILD/lockdev-scm-2011-10-07/src/lockdev.c:847: undefined reference to `major' sample.o: In /bin/sh ../libtool --tag=CC --mode=link 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 -fasynchronous-unwind-tables -fstack-clash-protection -D_PATH_LOCK=\"/run/lock/lockdev\" -version-info 1:0:0 -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -o liblockdev.la -rpath /usr/lib64 lockdev.lo BUILDSTDERR: function `dev_unlock': BUILDSTDERR: /builddir/build/BUILD/lockdev-scm-2011-10-07/src/lockdev.c:854: undefined reference to `minor' BUILDSTDERR: sample.o: In function `strcat': BUILDSTDERR: /usr/include/bits/string_fortified.h:128: undefined reference to `major' BUILDSTDERR: sample.o: In function `stat': BUILDSTDERR: /usr/include/sys/stat.h:451: undefined reference to `major' BUILDSTDERR: /usr/include/sys/stat.h:451: undefined reference to `minor' BUILDSTDERR: sample.o: In function `_dl_filename_2': BUILDSTDERR: /builddir/build/BUILD/lockdev-scm-2011-10-07/src/lockdev.c:255: undefined reference to `major' BUILDSTDERR: /builddir/build/BUILD/lockdev-scm-2011-10-07/src/lockdev.c:257: undefined reference to `major' BUILDSTDERR: /builddir/build/BUILD/lockdev-scm-2011-10-07/src/lockdev.c:255: undefined reference to `minor' BUILDSTDERR: collect2: error: ld returned 1 exit status BUILDSTDERR: make[2]: *** [Makefile:487: lockdev] Error 1 BUILDSTDERR: make[2]: *** Waiting for unfinished jobs.... libtool: link: gcc -shared -fPIC -DPIC .libs/lockdev.o -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -O2 -g -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,-z -Wl,relro -Wl,-z -Wl,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-soname -Wl,liblockdev.so.1 -o .libs/liblockdev.so.1.0.0 libtool: link: (cd ".libs" && rm -f "liblockdev.so.1" && ln -s "liblockdev.so.1.0.0" "liblockdev.so.1") libtool: link: (cd ".libs" && rm -f "liblockdev.so" && ln -s "liblockdev.so.1.0.0" "liblockdev.so") libtool: link: ( cd ".libs" && rm -f "liblockdev.la" && ln -s "../liblockdev.la" "liblockdev.la" ) make[2]: Leaving directory '/builddir/build/BUILD/lockdev-scm-2011-10-07/src' BUILDSTDERR: make[1]: *** [Makefile:464: all-recursive] Error 1 make[1]: Leaving directory '/builddir/build/BUILD/lockdev-scm-2011-10-07' BUILDSTDERR: make: *** [Makefile:373: all] Error 2 BUILDSTDERR: error: Bad exit status from /var/tmp/rpm-tmp.8FlDja (%build) BUILDSTDERR: Bad exit status from /var/tmp/rpm-tmp.8FlDja (%build) RPM build errors: Child return code was: 1 EXCEPTION: [Error()] Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/mockbuild/trace_decorator.py", line 96, in trace result = func(*args, **kw) File "/usr/lib/python3.6/site-packages/mockbuild/util.py", line 626, in do 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/lockdev.spec