gfxreconstruct icon indicating copy to clipboard operation
gfxreconstruct copied to clipboard

Linux custom path installation is somewhat broken

Open per-mathisen-arm opened this issue 10 months ago • 0 comments

This might not be the most important issue, but it is a bit annoying. If you do a 'make install' of gfxreconstruct into a custom folder - lets say, '/opt/gfxr', then gfxrecon-capture-vulkan.py will end up in /opt/gfxr/bin while libVkLayer_gfxreconstruct.so ends up in /opt/gfxr/lib and VkLayer_gfxreconstruct.json in /opt/gfxr/share/vulkan/explicit_layer.d. Now if you run gfxrecon-capture-vulkan.py without any options it will find and use the system installed library if any, and if not, it will fail. If you give it the --capture-layer option and point it to your newly installed json, it will still use the system installed library or fail if there is none. The option does tell you (if you run it with -h or --help) that you should put the json and .so file in the same folder to use the --capture-layer option - but that's not what gfxr did for you on 'make install'. This seems... less than ideal, especially in the case where it quietly uses a different library than you would expect.

I think the most reliable fix for this would be to add the path to the .so file in both the python script and the json upon running 'make install' and inject an absolute path pointing to where it is going to install the .so binary. This will work both for the custom path case and the system install case, and ensures that you never accidentally use the wrong library.

per-mathisen-arm avatar Apr 23 '24 15:04 per-mathisen-arm