Cuda target cannot find color functions in libsac
For the cuda target, the linker cannot find the color functions.
test.sac:
int main()
{
return 42;
}
thomas@debian:~$ sac2c_p -t cuda test.sac
ptxas warning : For profile sm_86 adjusting per thread register count of 20 to lower bound of 24
/usr/bin/ld: /home/thomas/a.out.o: in function `main':
a.out.ii:(.text.startup+0x75): undefined reference to `SAC_ColorWanted()'
collect2: error: ld returned 1 exit status
Abort:
System failed to execute shell command
/usr/bin/cc /home/thomas/a.out.o -Wl,-allow-shlib-undefined
-L/home/thomas/repos/Stdlib/build/lib/host/cuda
-Wl,-rpath,/home/thomas/repos/Stdlib/build/lib/host/cuda
-L/home/thomas/repos/sac2c/build_p/runtime_build/src/runtime_libraries-build/lib/host/cuda
-Wl,-rpath,/home/thomas/repos/sac2c/build_p/runtime_build/src/runtime_libraries-build/lib/host/cuda
-L/home/thomas/repos/sac2c/build_d/runtime_build/src/runtime_libraries-build/lib/prelude/host/cuda
-Wl,-rpath,/home/thomas/repos/sac2c/build_d/runtime_build/src/runtime_libraries-build/lib/prelude/host/cuda
-L/home/thomas/repos/sac2c/build_p/runtime_build/src/runtime_libraries-build/lib/prelude/host/cuda
-Wl,-rpath,/home/thomas/repos/sac2c/build_p/runtime_build/src/runtime_libraries-build/lib/prelude/host/cuda
-lsacprelude_pMod -L/usr/lib/x86_64-linux-gnu -Wl,-rpath,/usr/lib/x86_64-linux-gnu
-L/usr/local/cuda-12.6/lib64 -Wl,-rpath,/usr/local/cuda-12.6/lib64 -lsac_p -lsacphmc_p
-lm -lhwloc -lcudart -lcublas -ldl -lstdc++ -o /home/thomas/a.out
with exit code 1
Compilation failed while Creating binary code.
Version
thomas@debian:~$ sac2c_p -V
sac2c 2.0.0-Tintigny-224-gf15f3
build-type: RELEASE
built-by: "thomas" at 2025-11-25T10:00:15