Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • sac2c sac2c
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 401
    • Issues 401
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 18
    • Merge requests 18
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • sac-group
  • sac2csac2c
  • Issues
  • #2518
Closed
Open
Created Nov 25, 2025 by Thomas Koopman@thomasDeveloper

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
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking