Skip to content

Remove hardcoded absolute file paths #820

@Kuratius

Description

@Kuratius

It appears the built library contains hardcoded absolute file paths and will not run if the directory contents are no longer in the same absolute path they had when they were compiled.

I tested with
https://github.com/rsnemmen/OpenCL-examples/tree/master/add_numbers

after copying the build artifacts from a pc with rocm and a rx 6700xt (rdna 2 architecture) to a steam deck (also rdna 2 architecture) and I get the following error, presumably from the .so file:

LD_LIBRARY_PATH=. ./add_numbers
sh: line 1: /home/USERNAME/Documents/SteamDeck/clvk/build/clspv: No such file or directory

whereas on my steam deck the correct path is /home/steamuser/devkit-game/testing/add_numbers/clspv

Simple_test also fails:

LD_LIBRARY_PATH=. ./simple_test
Platform: clvk
Device: AMD Custom GPU 0405 (RADV VANGOGH)
/home/dk/Documents/SteamDeck/clvk/tests/simple/simple.cpp:76 error after CL call: -11

LD_LIBRARY_PATH=. ./simple_test
Platform: clvk
Device: AMD Custom GPU 0405 (RADV VANGOGH)
/home/dk/Documents/SteamDeck/clvk/tests/simple/simple.cpp:76 error after CL call: -11

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions