http://bugs.winehq.org/show_bug.cgi?id=58881
Bug ID: 58881 Summary: Linux: static link with libvkd3d-utils.a works, but libvkd3d-shader.a - doesn't Product: vkd3d Version: 1.17 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: vkd3d Assignee: wine-bugs@winehq.org Reporter: q4arus@ya.ru Distribution: ---
Created attachment 79543 --> http://bugs.winehq.org/attachment.cgi?id=79543 Full CI log - static link libvkd3d-utils.a works
I want to create simple app with static link of vkd3d on Linux. Test app with only 1 call of D3DCreateBlob and static link with libvkd3d-utils.a works fine. Example: ``` #include <iostream> #include <vkd3d_utils.h> int main() { ID3DBlob* codeBufferBlob = nullptr; D3DCreateBlob(5760, &codeBufferBlob); } ``` Full source code and CI here: https://github.com/q4a/vkd3d-test/tree/16ec3647cb403ecd78c1d79e8d7e0a9bfdaab... Build instructions: https://github.com/q4a/vkd3d-test/blob/16ec3647cb403ecd78c1d79e8d7e0a9bfdaab... Log is here: https://github.com/q4a/vkd3d-test/actions/runs/18818259522/job/53689750023 and same in file `libvkd3d-utils-static.txt`
If I add 1 call of and add static link with libvkd3d-shader.a I got error: ``` /usr/bin/g++ -g -Wl,--dependency-file=CMakeFiles/dxvk-test.dir/link.d CMakeFiles/dxvk-test.dir/source.cpp.o -o Debug/dxvk-test /home/runner/work/dxvk-test/dxvk-test/build/vkd3d-src/.libs/libvkd3d.a /home/runner/work/dxvk-test/dxvk-test/build/vkd3d-src/.libs/libvkd3d-shader.a /home/runner/work/dxvk-test/dxvk-test/build/vkd3d-src/.libs/libvkd3d-utils.a: /usr/bin/ld: /tmp/cc0FiCe9.ltrans0.ltrans.o: in function `D3DStripShader': /home/runner/work/dxvk-test/dxvk-test/build/Ninja-Debug/../vkd3d-src/libs/vkd3d-utils/vkd3d_utils_main.c:921:(.text+0xb88): undefined reference to `vkd3d_shader_parse_dxbc' /usr/bin/ld: /home/runner/work/dxvk-test/dxvk-test/build/Ninja-Debug/../vkd3d-src/libs/vkd3d-utils/vkd3d_utils_main.c:945:(.text+0xe05): undefined reference to `vkd3d_shader_serialize_dxbc' /usr/bin/ld: /home/runner/work/dxvk-test/dxvk-test/build/Ninja-Debug/../vkd3d-src/libs/vkd3d-utils/vkd3d_utils_main.c:956:(.text+0xe4d): undefined reference to `vkd3d_shader_free_shader_code' /usr/bin/ld: /home/runner/work/dxvk-test/dxvk-test/build/Ninja-Debug/../vkd3d-src/libs/vkd3d-utils/vkd3d_utils_main.c:960:(.text+0xe5f): undefined reference to `vkd3d_shader_free_dxbc' /usr/bin/ld: /home/runner/work/dxvk-test/dxvk-test/build/Ninja-Debug/../vkd3d-src/libs/vkd3d-utils/vkd3d_utils_main.c:930:(.text+0x127e): undefined reference to `vkd3d_shader_free_dxbc' collect2: error: ld returned 1 exit status ``` Example: ``` #include <iostream> #include <vkd3d_utils.h> int main() { ID3DBlob* codeBufferBlob = nullptr; D3DCreateBlob(5760, &codeBufferBlob); ID3DBlob* stripBuffer = nullptr; D3DStripShader(codeBufferBlob->GetBufferPointer(), codeBufferBlob->GetBufferSize(), D3DCOMPILER_STRIP_PRIVATE_DATA, &stripBuffer); } ``` Full source code and CI here: https://github.com/q4a/vkd3d-test/tree/6f8f6f45b68a0ac21c2c11041bffba0c7641c... Build instructions: https://github.com/q4a/vkd3d-test/blob/6f8f6f45b68a0ac21c2c11041bffba0c7641c... Log is here: https://github.com/q4a/vkd3d-test/actions/runs/18818628712/job/53690638034 and same in file `libvkd3d-shader-static.txt`
http://bugs.winehq.org/show_bug.cgi?id=58881
--- Comment #1 from Aleksey Komarov q4arus@ya.ru --- Created attachment 79544 --> http://bugs.winehq.org/attachment.cgi?id=79544 Full CI log - static link libvkd3d-shader.a failed
http://bugs.winehq.org/show_bug.cgi?id=58881
Aleksey Komarov q4arus@ya.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #79543|Full CI log - static link |libvkd3d-utils-static.txt - description|libvkd3d-utils.a works |static link | |libvkd3d-utils.a works
http://bugs.winehq.org/show_bug.cgi?id=58881
Aleksey Komarov q4arus@ya.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #79544|Full CI log - static link |libvkd3d-shader-static.txt description|libvkd3d-shader.a failed |- static link | |libvkd3d-shader.a failed
http://bugs.winehq.org/show_bug.cgi?id=58881
--- Comment #2 from Henri Verbeet hverbeet@gmail.com --- Created attachment 79647 --> http://bugs.winehq.org/attachment.cgi?id=79647 test program
I'm not quite able to reproduce the exact issue you reported here, but did find a different issue for which I've submitted https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1821
If you're still able to reproduce your issue with the changes from that merge request applied, could you attempt the build the attached test program and let me know whether that works? It's a slightly modified version of your example, but with a plain Makefile as build system. Note that you may need to set the PKG_CONFIG_PATH environment variable to the location where vkd3d installed its .pc files if that's not a standard location.