IBCXX_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 -c -o ddpt_sgl.o ddpt_sgl.cpp gcc -Wall -W -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 -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -o ddptctl ddptctl.o ddpt_com.o ddpt_pt.o ddpt_xcopy.o -lsgutils2 -lrt gcc -Wall -W -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 -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -o ddpt ddpt.o ddpt_cl.o ddpt_com.o ddpt_pt.o ddpt_xcopy.o -lsgutils2 -lrt /usr/bin/ld: ddpt_pt.o: in function `pt_low_read': /builddir/build/BUILD/ddpt-0.96/src/ddpt_pt.c:562: undefined reference to `sg_get_command_str' /usr/bin/ld: ddpt_pt.o: in function `pt_read': /builddir/build/BUILD/ddpt-0.96/src/ddpt_pt.c:875: undefined reference to `sg_get_command_str' /usr/bin/ld: ddpt_pt.o: in function `pt_low_write': /builddir/build/BUILD/ddpt-0.96/src/ddpt_pt.c:928: undefined reference to `sg_get_command_str' /usr/bin/ld: ddpt_pt.o: in function `pt_write_same16': /builddir/build/BUILD/ddpt-0.96/src/ddpt_pt.c:1102: undefined reference to `sg_get_command_str' /usr/bin/ld: ddpt_pt.o: in function `__bswap_32': /usr/include/bits/byteswap.h:52: undefined reference to `sg_get_command_str' /usr/bin/ld: ddpt_pt.o:/builddir/build/BUILD/ddpt-0.96/src/ddpt_pt.c:1361: more undefined references to `sg_get_command_str' follow /usr/bin/ld: collect2: error: ld returned 1 exit status make[2]: *** [Makefile:517: ddptctl] Error 1 make[2]: *** Waiting for unfinished jobs.... ddpt_pt.o: in function `pt_low_read': /builddir/build/BUILD/ddpt-0.96/src/ddpt_pt.c:562: undefined reference to `sg_get_command_str' /usr/bin/ld: ddpt_pt.o: in function `pt_read': /builddir/build/BUILD/ddpt-0.96/src/ddpt_pt.c:875: undefined reference to `sg_get_command_str' /usr/bin/ld: ddpt_pt.o: in function `pt_low_write': /builddir/build/BUILD/ddpt-0.96/src/ddpt_pt.c:928: undefined reference to `sg_get_command_str' /usr/bin/ld: ddpt_pt.o: in function `pt_write_same16': /builddir/build/BUILD/ddpt-0.96/src/ddpt_pt.c:1102: undefined reference to `sg_get_command_str' /usr/bin/ld: ddpt_pt.o: in function `__bswap_32': /usr/include/bits/byteswap.h:52: undefined reference to `sg_get_command_str' /usr/bin/ld: ddpt_pt.o:/builddir/build/BUILD/ddpt-0.96/src/ddpt_pt.c:1361: more undefined references to `sg_get_command_str' follow collect2: error: ld returned 1 exit status make[2]: *** [Makefile:509: ddpt] Error 1 make[2]: Leaving directory '/builddir/build/BUILD/ddpt-0.96/src' make[1]: *** [Makefile:372: all-recursive] Error 1 make[1]: Leaving directory '/builddir/build/BUILD/ddpt-0.96' make: *** [Makefile:313: all] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.MDy3CU (%build) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.MDy3CU (%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/ddpt.spec