Source: ltt-control Version: 2.13.15-1 Severity: serious Tags: FTBFS, patch User: debian-ri...@lists.debian.org Usertags: riscv64
Dear ltt-control maintainer, The package ltt-control build failed on riscv.The crucial buildd log below: ``` make[4]: Entering directory '/build/reproducible-path/ltt-control-2.13.15/src/common/health' /bin/bash ../../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I../../../include -I../../../include -I../../../src -I../../../src -include config.h -I/usr/include/riscv64-linux-gnu -I/usr/include/riscv64-linux-gnu -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wno-incomplete-setjmp-declaration -Wdiscarded-qualifiers -Wmissing-declarations -Wmissing-prototypes -Wmissing-parameter-type -Wold-style-definition -Wstrict-prototypes -Wshadow -fno-strict-aliasing -pthread -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/ltt-control-2.13.15=. -fstack-protector-strong -Wformat -Werror=format-security -c -o health.lo health.c libtool: compile: gcc -DHAVE_CONFIG_H -I../../../include -I../../../include -I../../../src -I../../../src -include config.h -I/usr/include/riscv64-linux-gnu -I/usr/include/riscv64-linux-gnu -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wno-incomplete-setjmp-declaration -Wdiscarded-qualifiers -Wmissing-declarations -Wmissing-prototypes -Wmissing-parameter-type -Wold-style-definition -Wstrict-prototypes -Wshadow -fno-strict-aliasing -pthread -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/ltt-control-2.13.15=. -fstack-protector-strong -Wformat -Werror=format-security -c health.c -fPIC -DPIC -o .libs/health.o health.c: In function 'health_register': health.c:266:9: error: 'health_state' undeclared (first use in this function) 266 | health_state.last = 0; | ^~~~~~~~~~~~ health.c:266:9: note: each undeclared identifier is reported only once for each function it appears in At top level: cc1: note: unrecognized command-line option '-Wno-incomplete-setjmp-declaration' may have been intended to silence earlier diagnostics make[4]: *** [Makefile:581: health.lo] Error 1 make[4]: Leaving directory '/build/reproducible-path/ltt-control-2.13.15/src/common/health' make[3]: *** [Makefile:1056: all-recursive] Error 1 make[3]: Leaving directory '/build/reproducible-path/ltt-control-2.13.15/src/common' make[2]: *** [Makefile:557: all-recursive] Error 1 make[2]: Leaving directory '/build/reproducible-path/ltt-control-2.13.15/src' make[1]: *** [Makefile:668: all-recursive] Error 1 make[1]: Leaving directory '/build/reproducible-path/ltt-control-2.13.15' dh_auto_build: error: make -j4 returned exit code 2 ``` The full buildd log is here: https://buildd.debian.org/status/fetch.php?pkg=ltt-control&arch=riscv64&ver=2.13.15-1&stamp=1744670366&raw=0 My solution to this issue: The error occurs specifically in the health_register function where the code attempts to access this TLS variable directly using its name (health_state.last = 0; etc.).However, other parts of health.c (e.g., in health_unregister) and inline functions within <lttng/health-internal.h> access the same TLS variable using the URCU_TLS(health_state) macro (e.g., URCU_TLS(health_state).flags).Accessing the variable through the URCU_TLS() macro works consistently across the codebase and presumably abstracts away these architecture-specific details.The fix is to modify the health_register function in src/common/health/health.c to consistently use the URCU_TLS() macro for accessing the health_state variable, aligning its usage with the rest of the code.I have tested this solution locally,and it works well.The debpatch is in the attachment.Please let me know whether this solution can be accepted. Gui-Yue Best Regards
fix_ltt-control_compile_on_riscv_error.patch
Description: Binary data